Skip to content

Commit

Permalink
just use scrollTop
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Thornton authored and Jacob Thornton committed Jun 6, 2015
1 parent e6f9c48 commit 154920e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/zoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
this._targetImage.offsetWidth // repaint before animating

var imageOffset = $(this._targetImage).offset()
var scrollTop = window.scrollY || window.pageYOffset
var scrollTop = $(window).scrollTop()

var viewportY = scrollTop + (window.innerHeight / 2)
var viewportX = (window.innerWidth / 2)
Expand Down

0 comments on commit 154920e

Please sign in to comment.