X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/530ef4b6c5b943cfa68b779d11cf7de29aa878bf..b37ceabb82336ee82757cd32efe353cfab8ec267:/src/widgets/Slider.js diff --git a/src/widgets/Slider.js b/src/widgets/Slider.js index 862b7d16..85b1476f 100644 --- a/src/widgets/Slider.js +++ b/src/widgets/Slider.js @@ -1,5 +1,5 @@ /*! - * Ext JS Library 3.2.1 + * Ext JS Library 3.2.2 * Copyright(c) 2006-2010 Ext JS, Inc. * licensing@extjs.com * http://www.extjs.com/license @@ -159,6 +159,14 @@ Ext.slider.Thumb = Ext.extend(Object, { if (this.dragStartValue != value) { slider.fireEvent('changecomplete', slider, value, this); } + }, + + /** + * @private + * Destroys the thumb + */ + destroy: function(){ + Ext.destroyMembers(this, 'tracker', 'el'); } }); @@ -725,7 +733,10 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, { for(; i < len; ++i){ thumbs[i].el.stopFx(); } - this.innerEl.setWidth(w - (this.el.getPadding('l') + this.endEl.getPadding('r'))); + // check to see if we're using an auto width + if(Ext.isNumber(w)){ + this.innerEl.setWidth(w - (this.el.getPadding('l') + this.endEl.getPadding('r'))); + } this.syncThumb(); Ext.slider.MultiSlider.superclass.onResize.apply(this, arguments); }, @@ -817,7 +828,12 @@ Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, { // private beforeDestroy : function(){ - Ext.destroyMembers(this, 'endEl', 'innerEl', 'thumb', 'halfThumb', 'focusEl', 'tracker', 'thumbHolder'); + var thumbs = this.thumbs; + for(var i = 0, len = thumbs.length; i < len; ++i){ + thumbs[i].destroy(); + thumbs[i] = null; + } + Ext.destroyMembers(this, 'endEl', 'innerEl', 'focusEl', 'thumbHolder'); Ext.slider.MultiSlider.superclass.beforeDestroy.call(this); } });