From 0b0829eebd42338bdb12bacf492d562305a6666e Mon Sep 17 00:00:00 2001 From: Mark MacKay Date: Thu, 5 Aug 2021 18:54:23 -0500 Subject: [PATCH] center correctly --- src/js/Canvas.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/js/Canvas.js b/src/js/Canvas.js index c6286a9..5850ad5 100644 --- a/src/js/Canvas.js +++ b/src/js/Canvas.js @@ -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;