Roo/tree/TreeDragZone.js
authorAlan Knowles <alan@roojs.com>
Tue, 10 Jul 2012 10:15:48 +0000 (18:15 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 10 Jul 2012 10:15:48 +0000 (18:15 +0800)
Roo/tree/TreeDragZone.js

index 9d87cb9..d814cfb 100644 (file)
@@ -59,7 +59,7 @@ Roo.extend(Roo.tree.TreeDragZone, Roo.dd.DragZone, {
         
         Roo.log(this.scroll ? "scroll=y": "scroll=m" );
         if (this.scroll) {
-            // The client height
+             // The client height
             var clientH = Roo.lib.Dom.getViewWidth();
 
             // The client width
@@ -98,25 +98,25 @@ Roo.extend(Roo.tree.TreeDragZone, Roo.dd.DragZone, {
             // Scroll down if we are near the bottom of the visible page and the
             // obj extends below the crease
             if ( bot > clientH && toBot < thresh ) {
-                window.scrollTo(sl, st + scrAmt);
+                this.el.scrollTo(sl, st + scrAmt);
             }
 
             // Scroll up if the window is scrolled down and the top of the object
             // goes above the top border
             if ( y < st && st > 0 && y - st < thresh ) {
-                window.scrollTo(sl, st - scrAmt);
+                this.el.scrollTo(sl, st - scrAmt);
             }
 
             // Scroll right if the obj is beyond the right border and the cursor is
             // near the border.
             if ( right > clientW && toRight < thresh ) {
-                window.scrollTo(sl + scrAmt, st);
+                this.el.scrollTo(sl + scrAmt, st);
             }
 
             // Scroll left if the window has been scrolled to the right and the obj
             // extends past the left border
             if ( x < sl && sl > 0 && x - sl < thresh ) {
-                window.scrollTo(sl - scrAmt, st);
+                this.el.scrollTo(sl - scrAmt, st);
             }
         }
     }