polardbxengine/storage/ndb/mcc/frontend/dojo/dojox/mobile/SpinWheel.js.uncompressed.js

41 lines
1.1 KiB
JavaScript

define("dojox/mobile/SpinWheel", [
"dojo/_base/declare",
"dojo/dom-construct",
"./_PickerBase",
"./SpinWheelSlot" // to load SpinWheelSlot for you (no direct references)
], function(declare, domConstruct, PickerBase){
// module:
// dojox/mobile/SpinWheel
return declare("dojox.mobile.SpinWheel", PickerBase, {
// summary:
// A value picker widget that has spin wheels.
// description:
// SpinWheel is a value picker component. It is a sectioned wheel
// that can be used to pick up some values from the wheel slots by
// spinning them.
/* internal properties */
baseClass: "mblSpinWheel",
buildRendering: function(){
this.inherited(arguments);
domConstruct.create("div", {className: "mblSpinWheelBar"}, this.domNode);
},
startup: function(){
if(this._started){ return; }
this.centerPos = Math.round(this.domNode.offsetHeight / 2);
this.inherited(arguments);
},
addChild: function(/*Widget*/ widget, /*int?*/ insertIndex){
this.inherited(arguments);
if(this._started){
widget.setInitialValue();
}
}
});
});