Results 1 to 2 of 2

Thread: [FIXED][3.0 RC1] Slider and decimal increments

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User
    Join Date
    May 2009
    Posts
    2
    Vote Rating
    0
      0  

    Default [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:
    Code:
    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);
        }
    Cheers

    Carsten
    Last 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

  2. #2
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    18,587
    Vote Rating
    873
      0  

    Default

    Fixed in SVN, thanks.
    Evan Trimboli
    Twitter - @evantrimboli

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •