Threaded View
-
7 Feb 2007 1:25 PM #1
getWidth method in YAHOO.ext.Element
getWidth method in YAHOO.ext.Element
May I suggest that you add the following "|| this.dom.width". If the element is not attached to the document and you:
It will display 0 even though "width" is 100. So, in my code, if offsetWidth is 0 then it will return the value of "width".Code:elem.setWidth(100) alert(elem.getWidth());
Thanks!Code:getWidth : function(contentWidth){ var w = this.dom.offsetWidth || this.dom.width; return contentWidth !== true ? w : w-this.getBorderWidth('lr')-this.getPadding('lr'); },
Similar Threads
-
YAHOO.ext.Element and addListener
By alex1er in forum Ext 1.x: Help & DiscussionReplies: 2Last Post: 18 Feb 2007, 2:57 AM -
YAHOO.ext.Element.get
By jclawson in forum Ext 1.x: BugsReplies: 2Last Post: 7 Feb 2007, 10:04 AM -
YAHOO.ext.Element Display
By ojintoad in forum Ext 1.x: Help & DiscussionReplies: 6Last Post: 1 Jan 2007, 2:20 AM -
YAHOO.ext.Element.addListener problem
By kovtik in forum Ext 1.x: Help & DiscussionReplies: 12Last Post: 17 Oct 2006, 7:08 AM




Reply With Quote