From e5a80d19e77cbbe1a31326dc334e2ff433833612 Mon Sep 17 00:00:00 2001 From: miqrogroove <1371835+miqrogroove@users.noreply.github.com> Date: Mon, 27 Jun 2022 15:41:08 -0400 Subject: [PATCH] Include fix for tileviewer scrolling in master All other parts of this system use a parabolic coefficient when calculating the relative position. It was missing here and simply needed to be added. --- assets/jquery/jquery-tileviewer/jquery.tileviewer.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/jquery/jquery-tileviewer/jquery.tileviewer.js b/assets/jquery/jquery-tileviewer/jquery.tileviewer.js index 7b7a87f51a..0d27bee855 100644 --- a/assets/jquery/jquery-tileviewer/jquery.tileviewer.js +++ b/assets/jquery/jquery-tileviewer/jquery.tileviewer.js @@ -3298,10 +3298,11 @@ var methods = { // Handle scrolling due to click on the overview var tw = layer.thumb.width; var th = layer.thumb.height; + var factor = Math.pow(2,layer.level); if ((x >= 0) && (x <= tw) && (y >= 0) && (y <= th)) { - view.pan.xdest = ((x/tw) * layer.info.width); - view.pan.ydest = ((y/th) * layer.info.height); + view.pan.xdest = ((x/tw) * layer.info.width / factor); + view.pan.ydest = ((y/th) * layer.info.height / factor); view.pan.level = layer.level; view.needdraw = true; return;