-
6 May 2009 7:40 AM #1
[FIXED] [3.0 RC1] Slider and decimal increments
[FIXED] [3.0 RC1] Slider and decimal increments
In 3.0 RC1 I found Slider not to work correctly with non-integer increment values. The Slider always snaps to the next integer value.
The cause of the problem seems to be the onDrag() function in Slider, which uses the Ext.Math.round() function that always rounds to the next integer value. It should use the Ext.util.Format.round() and pass the decimalPrecision property of the Slider:
CheersCode:onDrag: function(e){ var pos = this.innerEl.translatePoints(this.tracker.getXY()); this.setValue(Ext.util.Format.round(this.reverseValue(pos.left), this.decimalPrecision), false); this.fireEvent('drag', this, e); }
CarstenLast edited by mystix; 6 May 2009 at 8:34 AM. Reason: POST CODE IN [code][/code] TAGS. see http://extjs.com/forum/misc.php?do=bbcode#code
-
28 May 2009 8:38 PM #2
Fixed in SVN, thanks.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote