Skip to content

Commit

Permalink
Merge pull request #46 from miqrogroove/patch-1
Browse files Browse the repository at this point in the history
Include #39 in master
  • Loading branch information
collectiveaccess authored Feb 27, 2024
2 parents f34cb7c + dfaf9fe commit 25f628c
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 25f628c

Please sign in to comment.