center correctly

master
Mark MacKay 2021-08-05 18:54:23 -05:00
parent 0f8c718756
commit 0b0829eebd
1 changed files with 3 additions and 10 deletions

View File

@ -125,16 +125,9 @@ MD.Canvas = function(){
}
if(center) {
// Go to top-left for larger documents
if(svgCanvas.contentW > $(workarea).width()) {
// Top-left
workarea.scrollLeft = offset.x - 10;
workarea.scrollTop = offset.y - 10;
} else {
// Center
workarea.scrollLeft = scroll_x;
workarea.scrollTop = scroll_y;
}
workarea.scrollLeft = scroll_x;
workarea.scrollTop = scroll_y;
} else {
workarea.scrollLeft = new_ctr.x - w_orig/2;
workarea.scrollTop = new_ctr.y - h_orig/2;