From dfaf9fef3365f45a59d3f86116e4dec7f214f6da Mon Sep 17 00:00:00 2001 From: miqrogroove <1371835+miqrogroove@users.noreply.github.com> Date: Mon, 27 Jun 2022 15:36:45 -0400 Subject: [PATCH] Include #39 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;