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) {
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) {
cls = cls.replace(trimRe, '');
idx = Ext.Array.indexOf(elClasses, cls);
if (idx != -1) {
- elClasses.splice(idx, 1);
+ Ext.Array.erase(elClasses, idx, 1);
}
}
}
if (!me.dom) {
return me;
}
-
- if (!Ext.isObject(prop)) {
+ if (typeof prop === 'string') {
tmp = {};
tmp[prop] = value;
prop = tmp;
*/
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;
}
me.dom.style.height = me.addUnits(height);
}
else {
- if (!Ext.isObject(animate)) {
+ if (animate === true) {
animate = {};
}
me.animate(Ext.applyIf({