Skip to content

Commit

Permalink
Merge pull request #1350 from miqrogroove/patch-1
Browse files Browse the repository at this point in the history
Include fix for tileviewer scrolling in master
  • Loading branch information
collectiveaccess authored Dec 20, 2022
2 parents b4550bc + e5a80d1 commit ab203cf
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 ab203cf

Please sign in to comment.