]> source.dussan.org Git - svg.js.git/commit
Offset rbox by window scroll, because getBoundingClientRect changes when window is... 207/head
authorbryhoyt <bryan@brush.co.nz>
Thu, 12 Jun 2014 01:27:33 +0000 (13:27 +1200)
committerbryhoyt <bryan@brush.co.nz>
Thu, 12 Jun 2014 01:27:33 +0000 (13:27 +1200)
commitff6089410a03acda00fb8cb2f09ed94d7228dd4c
tree02dddd2bdfe142d366499f5b448a5a67940fa4ba
parente3a0f3a887a398a87356f63253830e1baf67823e
Offset rbox by window scroll, because getBoundingClientRect changes when window is scrolled

As per https://developer.mozilla.org/en-US/docs/Web/API/Element.getBoundingClientRect "If this is not the desired behaviour just add the current scrolling position to the top and left property (via window.scrollX and window.scrollY) to get constant values independent from the current scrolling position."
src/rbox.js