Alien-Web-ExtJS-V3

 view release on metacpan or  search on metacpan

share/docs/source/Element.position.html  view on Meta::CPAN

     */
    clearPositioning : function(value){
        value = value || '';
        this.setStyle({
            left : value,
            right : value,
            top : value,
            bottom : value,
            "z-index" : "",
            position : STATIC
        });
        return this;
    },

<span id='Ext-Element-method-getPositioning'>    /**
</span>    * Gets an object with all CSS positioning properties. Useful along with setPostioning to get
    * snapshot before performing an update and then restoring the element.
    * @return {Object}
    */
    getPositioning : function(){
        var l = this.getStyle(LEFT);
        var t = this.getStyle(TOP);
        return {
            &quot;position&quot; : this.getStyle(POSITION),
            &quot;left&quot; : l,
            &quot;right&quot; : l ? &quot;&quot; : this.getStyle(RIGHT),
            &quot;top&quot; : t,
            &quot;bottom&quot; : t ? &quot;&quot; : this.getStyle(BOTTOM),
            &quot;z-index&quot; : this.getStyle(ZINDEX)
        };
    },
    
<span id='Ext-Element-method-setPositioning'>    /**
</span>    * Set positioning with an object returned by getPositioning().
    * @param {Object} posCfg
    * @return {Ext.Element} this
     */
    setPositioning : function(pc){
	    var me = this,
	    	style = me.dom.style;
	    	
        me.setStyle(pc);
        
        if(pc.right == AUTO){
            style.right = &quot;&quot;;
        }
        if(pc.bottom == AUTO){
            style.bottom = &quot;&quot;;
        }
        
        return me;
    },    
	
<span id='Ext-Element-method-translatePoints'>    /**
</span>     * Translates the passed page coordinates into left/top css values for this element
     * @param {Number/Array} x The page x or an array containing [x, y]
     * @param {Number} y (optional) The page y, required if x is not an array
     * @return {Object} An object with left and top properties. e.g. {left: (value), top: (value)}
     */
    translatePoints : function(x, y){        	     
	    y = isNaN(x[1]) ? y : x[1];
        x = isNaN(x[0]) ? x : x[0];
        var me = this,
        	relative = me.isStyle(POSITION, RELATIVE),
        	o = me.getXY(),
        	l = parseInt(me.getStyle(LEFT), 10),
        	t = parseInt(me.getStyle(TOP), 10);
        
        l = !isNaN(l) ? l : (relative ? 0 : me.dom.offsetLeft);
        t = !isNaN(t) ? t : (relative ? 0 : me.dom.offsetTop);        

        return {left: (x - o[0] + l), top: (y - o[1] + t)}; 
    },
    
    animTest : function(args, animate, i) {
        return !!animate &amp;&amp; this.preanim ? this.preanim(args, i) : false;
    }
});
})();</pre>
</body>
</html>



( run in 1.001 second using v1.01-cache-2.11-cpan-787462296c9 )