1 if(!dojo._hasResource["dijit.form.NumberSpinner"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
2 dojo._hasResource["dijit.form.NumberSpinner"] = true;
3 dojo.provide("dijit.form.NumberSpinner");
5 dojo.require("dijit.form._Spinner");
6 dojo.require("dijit.form.NumberTextBox");
9 "dijit.form.NumberSpinner",
10 [dijit.form._Spinner, dijit.form.NumberTextBoxMixin],
13 // extends NumberTextBox to add up/down arrows for incremental change to the value
17 adjust: function(/* Object */ val, /*Number*/ delta){
18 // summary: change Number val by the given amount
19 var newval = val+delta;
20 if(isNaN(val) || isNaN(newval)){ return val; }
21 if((typeof this.constraints.max == "number") && (newval > this.constraints.max)){
22 newval = this.constraints.max;
24 if((typeof this.constraints.min == "number") && (newval < this.constraints.min)){
25 newval = this.constraints.min;