to reproduce, resize the window so that there are
vertical and horizontal scrollbars. now scroll to the
middle of the page (i.e., scrollbar buttons are about in
the middle).
when you drag a layer it won't drag correctly to the
edge of the screen anymore. it appears the dragging
code is not taking into account document.body.scrollLeft
and document.body.scrollTop.