Alien-Web-ExtJS-V3

 view release on metacpan or  search on metacpan

share/docs/source/DragTracker.html  view on Meta::CPAN

                mousemove: this.onMouseMove,
                selectstart: this.stopSelect
            });
            if(this.autoStart){
                this.timer = this.triggerStart.defer(this.autoStart === true ? 1000 : this.autoStart, this, [e]);
            }
        }
    },

<span id='Ext-dd-DragTracker-method-onMouseMove'>    onMouseMove: function(e, target){
</span>        // HACK: IE hack to see if button was released outside of window. Resolved in IE9.
        var ieCheck = Ext.isIE6 || Ext.isIE7 || Ext.isIE8;
        if(this.active &amp;&amp; ieCheck &amp;&amp; !e.browserEvent.button){
            e.preventDefault();
            this.onMouseUp(e);
            return;
        }

        e.preventDefault();
        var xy = e.getXY(), s = this.startXY;
        this.lastXY = xy;
        if(!this.active){
            if(Math.abs(s[0]-xy[0]) &gt; this.tolerance || Math.abs(s[1]-xy[1]) &gt; this.tolerance){
                this.triggerStart(e);
            }else{
                return;
            }
        }
        this.fireEvent('mousemove', this, e);
        this.onDrag(e);
        this.fireEvent('drag', this, e);
    },

<span id='Ext-dd-DragTracker-method-onMouseUp'>    onMouseUp: function(e) {
</span>        var doc = Ext.getDoc(),
            wasActive = this.active;
            
        doc.un('mousemove', this.onMouseMove, this);
        doc.un('mouseup', this.onMouseUp, this);
        doc.un('selectstart', this.stopSelect, this);
        e.preventDefault();
        this.clearStart();
        this.active = false;
        delete this.elRegion;
        this.fireEvent('mouseup', this, e);
        if(wasActive){
            this.onEnd(e);
            this.fireEvent('dragend', this, e);
        }
    },

<span id='Ext-dd-DragTracker-method-triggerStart'>    triggerStart: function(e) {
</span>        this.clearStart();
        this.active = true;
        this.onStart(e);
        this.fireEvent('dragstart', this, e);
    },

<span id='Ext-dd-DragTracker-method-clearStart'>    clearStart : function() {
</span>        if(this.timer){
            clearTimeout(this.timer);
            delete this.timer;
        }
    },

<span id='Ext-dd-DragTracker-method-stopSelect'>    stopSelect : function(e) {
</span>        e.stopEvent();
        return false;
    },
    
<span id='Ext-dd-DragTracker-method-onBeforeStart'>    /**
</span>     * Template method which should be overridden by each DragTracker instance. Called when the user first clicks and
     * holds the mouse button down. Return false to disallow the drag
     * @param {Ext.EventObject} e The event object
     */
    onBeforeStart : function(e) {

    },

<span id='Ext-dd-DragTracker-method-onStart'>    /**
</span>     * Template method which should be overridden by each DragTracker instance. Called when a drag operation starts
     * (e.g. the user has moved the tracked element beyond the specified tolerance)
     * @param {Ext.EventObject} e The event object
     */
    onStart : function(xy) {

    },

<span id='Ext-dd-DragTracker-method-onDrag'>    /**
</span>     * Template method which should be overridden by each DragTracker instance. Called whenever a drag has been detected.
     * @param {Ext.EventObject} e The event object
     */
    onDrag : function(e) {

    },

<span id='Ext-dd-DragTracker-method-onEnd'>    /**
</span>     * Template method which should be overridden by each DragTracker instance. Called when a drag operation has been completed
     * (e.g. the user clicked and held the mouse down, dragged the element and then released the mouse button)
     * @param {Ext.EventObject} e The event object
     */
    onEnd : function(e) {

    },

<span id='Ext-dd-DragTracker-method-getDragTarget'>    /**
</span>     * Returns the drag target
     * @return {Ext.Element} The element currently being tracked
     */
    getDragTarget : function(){
        return this.dragTarget;
    },

<span id='Ext-dd-DragTracker-method-getDragCt'>    getDragCt : function(){
</span>        return this.el;
    },

<span id='Ext-dd-DragTracker-method-getXY'>    getXY : function(constrain){
</span>        return constrain ?
               this.constrainModes[constrain].call(this, this.lastXY) : this.lastXY;
    },



( run in 0.704 second using v1.01-cache-2.11-cpan-ceb78f64989 )