github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

jquery / jquery-ui

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 558
    • 90
  • Source
  • Commits
  • Network (90)
  • Graphs
  • Tree: 34912bc

click here to add a description

click here to add a homepage

  • Switch Branches (7)
    • bind
    • devpreview
    • formcontrols
    • master
    • menu
    • panel
    • tooltip
  • Switch Tags (18)
    • 1.9m1
    • 1.8rc3
    • 1.8rc2
    • 1.8rc1
    • 1.8b1
    • 1.8a2
    • 1.8a1
    • 1.8.2
    • 1.8.1
    • 1.8
    • 1.7
    • 1.6rc6
    • 1.6rc5
    • 1.6rc3
    • 1.6rc2
    • 1.6
    • 1.5.2
    • 1.5.1
  • Comments
  • Contributors
Sending Request…

The official jQuery user interface library. — Read more

  Cancel

http://jqueryui.com/

  Cancel
  • HTTP
  • Git Read-Only

This URL has Read+Write access

Slider: fixed step alignment to handle negative fractional values. Fixed #5583 - 
Slider displays negative fractional values incorrectly. Thanks for the patch 
watanabe.
rdworth (author)
Tue May 11 05:17:18 -0700 2010
commit  34912bc933d2787b0e31
tree    40182d7cf5e36fcec2a3
parent  b7c0823da65254f420e4
M ui/jquery.ui.slider.js 6 ••••
Txt ui/jquery.ui.slider.js
  • View file @ 34912bc
... ...
@@ -591,12 +591,12 @@ $.widget( "ui.slider", $.ui.mouse, {
591 591
     if ( val > this._valueMax() ) {
592 592
       return this._valueMax();
593 593
     }
594  
-    var step = this.options.step,
  594
+    var step = ( this.options.step > 0 ) ? this.options.step : 1,
595 595
       valModStep = val % step,
596 596
       alignValue = val - valModStep;
597 597
 
598  
-    if ( valModStep >= ( step / 2 ) ) {
599  
-      alignValue += step;
  598
+    if ( Math.abs(valModStep) * 2 >= step ) {
  599
+      alignValue += ( valModStep > 0 ) ? step : ( -step );
600 600
     }
601 601
 
602 602
     // Since JavaScript has problems with large floats, round

0 notes on commit 34912bc

Please log in to comment.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server