Skip to content

Commit

Permalink
Update wheel-zoom.js
Browse files Browse the repository at this point in the history
  • Loading branch information
worka authored Jul 26, 2019
1 parent bfae8f2 commit 0fc52d2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions wheel-zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,22 @@
var shift_y = new_y - y;

this.window.scrollTop += shift_y + (scroll_top_before_rescale - scroll_top_after_rescale);
},
_zoomUp: function () {
var event = new Event('mousewheel');

event.wheelDelta = 1;
event.detail = -1;

this._rescale(event);
},
_zoomDown: function () {
var event = new Event('mousewheel');

event.wheelDelta = -1;
event.detail = 1;

this._rescale(event);
}
};

Expand Down

0 comments on commit 0fc52d2

Please sign in to comment.