X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/3789b528d8dd8aad4558e38e22d775bcab1cbd36..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/source/Element.style.html diff --git a/docs/source/Element.style.html b/docs/source/Element.style.html index 617187bb..cf273cb3 100644 --- a/docs/source/Element.style.html +++ b/docs/source/Element.style.html @@ -88,11 +88,11 @@ cls = [], space = ((me.dom.className.replace(trimRe, '') == '') ? "" : " "), i, len, v; - if (!Ext.isDefined(className)) { + if (className === undefined) { return me; } // Separate case is for speed - if (!Ext.isArray(className)) { + if (Object.prototype.toString.call(className) !== '[object Array]') { if (typeof className === 'string') { className = className.replace(trimRe, '').split(spacesRe); if (className.length === 1) { @@ -126,10 +126,10 @@ removeCls : function(className){ var me = this, i, idx, len, cls, elClasses; - if (!Ext.isDefined(className)) { + if (className === undefined) { return me; } - if (!Ext.isArray(className)){ + if (Object.prototype.toString.call(className) !== '[object Array]') { className = className.replace(trimRe, '').split(spacesRe); } if (me.dom && me.dom.className) { @@ -140,7 +140,7 @@ cls = cls.replace(trimRe, ''); idx = Ext.Array.indexOf(elClasses, cls); if (idx != -1) { - elClasses.splice(idx, 1); + Ext.Array.erase(elClasses, idx, 1); } } } @@ -322,8 +322,7 @@ if (!me.dom) { return me; } - - if (!Ext.isObject(prop)) { + if (typeof prop === 'string') { tmp = {}; tmp[prop] = value; prop = tmp; @@ -793,7 +792,8 @@ Ext.fly('elId').setHeight(150, { */ setSize : function(width, height, animate){ var me = this; - if (Ext.isObject(width)){ // in case of object from getSize() + if (Ext.isObject(width)) { // in case of object from getSize() + animate = height; height = width.height; width = width.width; } @@ -804,7 +804,7 @@ Ext.fly('elId').setHeight(150, { me.dom.style.height = me.addUnits(height); } else { - if (!Ext.isObject(animate)) { + if (animate === true) { animate = {}; } me.animate(Ext.applyIf({