Changeset 13729
- Timestamp:
- 05/13/08 11:59:20 (2 months ago)
- Files:
-
- 1 modified
-
dijit/trunk/form/NumberSpinner.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
dijit/trunk/form/NumberSpinner.js
r12665 r13729 15 15 adjust: function(/* Object */ val, /*Number*/ delta){ 16 16 // summary: change Number val by the given amount 17 if(isNaN(val) && delta != 0){ // blank or invalid value and they want to spin, so create defaults 18 var increasing = (delta > 0), 19 gotMax = (typeof this.constraints.max == "number"), 20 gotMin = (typeof this.constraints.min == "number"); 21 val = increasing? (gotMin? this.constraints.min : (gotMax? this.constraints.max : 0)) : 22 (gotMax? this.constraints.max : (gotMin? this.constraints.min : 0)); 23 } 17 24 var newval = val+delta; 18 25 if(isNaN(val) || isNaN(newval)){ return val; }