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

index 16092d1..4684ed1 100644 (file)
@@ -53,80 +53,6 @@ Roo.extend(Roo.tree.TreeDragZone, Roo.dd.DragZone, {
         var sm = this.tree.getSelectionModel();
         sm.clearSelections();
         sm.select(this.dragData.node);
-    }/*,
-    autoScroll: function(x, y, h, w) {
-        Roo.log("drop zone - autoscroll called");
-        
-        Roo.log( [ x, y, h , w, this.scroll ] );
-        Roo.log(this.el.getBox());
-         Roo.log(this.el.getScroll());
-        if (this.scroll) {
-            
-            var box = this.el.getBox();
-            var scroll = this.el.getScroll();
-            
-             // The client height
-            var clientH = box.height;
-
-            // The client width
-            var clientW = box.width;
-
-            // The amt scrolled down
-            var st = scroll.top;
-
-            // The amt scrolled right
-            var sl = scroll.left;
-
-            // Location of the bottom of the element
-            var bot = h + y;
-
-            // Location of the right of the element
-            var right = w + x;
-
-            // The distance from the cursor to the bottom of the visible area,
-            // adjusted so that we don't scroll if the cursor is beyond the
-            // element drag constraints
-            var toBot = (clientH + st - y - this.deltaY);
-
-            // The distance from the cursor to the right of the visible area
-            var toRight = (clientW + sl - x - this.deltaX);
-
-
-            // How close to the edge the cursor must be before we scroll
-            // var thresh = (document.all) ? 100 : 40;
-            var thresh = 40;
-
-            // How many pixels to scroll per autoscroll op.  This helps to reduce
-            // clunky scrolling. IE is more sensitive about this ... it needs this
-            // value to be higher.
-            var scrAmt = 80; //(document.all) ? 80 : 30;
-
-            // Scroll down if we are near the bottom of the visible page and the
-            // obj extends below the crease
-            if ( bot > clientH && toBot < thresh ) {
-                this.el.scroll('d', 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 ) {
-                this.el.scroll('t', scrAmt);
-            }
-
-            // Scroll right if the obj is beyond the right border and the cursor is
-            // near the border.
-            if ( right > clientW && toRight < thresh ) {
-                this.el.scroll('r', scrAmt);
-            }
-
-            // 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 ) {
-                this.el.scroll('l', scrAmt);
-            }
-        }
-        
     }
-     */
 });
 }
\ No newline at end of file