jQuery: The Write Less, Do More JavaScript Library

Changeset 5506

Show
Ignore:
Timestamp:
05/08/08 17:17:52 (3 days ago)
Author:
paul.bakaus
Message:

ui-slider: fixed lazy checking on values, fixes #2823

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ui/ui.slider.js

    r5484 r5506  
    331331            } 
    332332 
    333             if(x && x.constructor != Number) { 
     333            if(x !== undefined && x.constructor != Number) { 
    334334                var me = /^\-\=/.test(x), pe = /^\+\=/.test(x); 
    335335                if (me) { 
     
    340340            } 
    341341             
    342             if(y && y.constructor != Number) { 
     342            if(y !== undefined && y.constructor != Number) { 
    343343                var me = /^\-\=/.test(y), pe = /^\+\=/.test(y); 
    344344                if (me) { 
     
    349349            } 
    350350 
    351             if(o.axis != "vertical" && x) { 
     351            if(o.axis != "vertical" && x !== undefined) { 
    352352                if(o.stepping.x) x = Math.round(x / o.stepping.x) * o.stepping.x; 
    353353                x = this.translateValue(x, 1); 
     
    357357            } 
    358358 
    359             if(o.axis != "horizontal" && y) { 
     359            if(o.axis != "horizontal" && y !== undefined) { 
    360360                if(o.stepping.y) y = Math.round(y / o.stepping.y) * o.stepping.y; 
    361361                y = this.translateValue(y, 2);