Fix ghosting position in scrolled element
authorMichael M Slusarz <slusarz@curecanti.org>
Mon, 2 Mar 2009 23:30:41 +0000 (16:30 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 3 Mar 2009 07:02:40 +0000 (00:02 -0700)
imp/js/src/dragdrop.js

index 5b14303..2700828 100644 (file)
@@ -270,7 +270,7 @@ Drag = Class.create({
                 otop = this.element.offsetTop;
                 this.ghost = $(this.element.cloneNode(true)).writeAttribute('id', null).setOpacity(0.7).clonePosition(this.element, { setLeft: false, setTop: false }).setStyle({ left: oleft + 'px', position: 'absolute', top: otop + 'px', zIndex: parseInt(this.element.getStyle('zIndex')) + 1 });
                 this.element.insert({ before: this.ghost });
-                vo = this.ghost.viewportOffset();
+                vo = this.ghost.cumulativeOffset();
                 this.ghostOffset = [ vo[0] - oleft, vo[1] - otop ];
             }