-
- doAutoWidth: function(){
- var me = this,
- owner = me.owner,
- body = owner.body,
- width = body.getTextWidth();
-
- if (owner.header) {
- width = Math.max(width, owner.header.getWidth());
- }
- if (!Ext.isDefined(me.frameWidth)) {
- me.frameWidth = owner.el.getWidth() - body.getWidth();
- }
- width += me.frameWidth + body.getPadding('lr');
- return width;
+<span id='Ext-slider-Tip-method-onSlide'> /**
+</span> * @private
+ * Called whenever a dragstart or drag event is received on the associated Thumb.
+ * Aligns the Tip with the Thumb's new position.
+ * @param {Ext.slider.MultiSlider} slider The slider
+ * @param {Ext.EventObject} e The Event object
+ * @param {Ext.slider.Thumb} thumb The thumb that the Tip is attached to
+ */
+ onSlide : function(slider, e, thumb) {
+ var me = this;
+ me.show();
+ me.update(me.getText(thumb));
+ me.doComponentLayout();
+ me.el.alignTo(thumb.el, 'b-t?', me.offsets);
+ },
+
+<span id='Ext-slider-Tip-method-getText'> /**
+</span> * Used to create the text that appears in the Tip's body. By default this just returns
+ * the value of the Slider Thumb that the Tip is attached to. Override to customize.
+ * @param {Ext.slider.Thumb} thumb The Thumb that the Tip is attached to
+ * @return {String} The text to display in the tip
+ */
+ getText : function(thumb) {
+ return String(thumb.value);