Skip to content

Commit

Permalink
Include #39 in master
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
miqrogroove authored Jun 27, 2022
1 parent cbc10b2 commit dfaf9fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions assets/jquery/jquery-tileviewer/jquery.tileviewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dfaf9fe

Please sign in to comment.