-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnumberpicker.ios.js
60 lines (60 loc) · 2.29 KB
/
numberpicker.ios.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var common = require("./numberpicker.common");
global.moduleMerge(common, exports);
var NumberPicker = (function (_super) {
__extends(NumberPicker, _super);
function NumberPicker() {
_super.call(this);
this._ios = new UIStepper();
this._changeHandler = NumberPickerChangeHandlerImpl.initWithOwner(new WeakRef(this));
this._ios.addTargetActionForControlEvents(this._changeHandler, "valueChanged", UIControlEvents.UIControlEventValueChanged);
}
Object.defineProperty(NumberPicker.prototype, "ios", {
get: function () {
return this._ios;
},
enumerable: true,
configurable: true
});
NumberPicker.prototype._onValuePropertyChanged = function (data) {
this._ios.value = data.newValue;
};
NumberPicker.prototype._onMinValuePropertyChanged = function (data) {
this._ios.minimumValue = data.newValue;
};
NumberPicker.prototype._onMaxValuePropertyChanged = function (data) {
this._ios.maximumValue = data.newValue;
};
return NumberPicker;
}(common.NumberPicker));
exports.NumberPicker = NumberPicker;
var NumberPickerChangeHandlerImpl = (function (_super) {
__extends(NumberPickerChangeHandlerImpl, _super);
function NumberPickerChangeHandlerImpl() {
_super.apply(this, arguments);
}
NumberPickerChangeHandlerImpl.initWithOwner = function (owner) {
var impl = NumberPickerChangeHandlerImpl.new();
impl._owner = owner;
return impl;
};
NumberPickerChangeHandlerImpl.prototype.valueChanged = function (sender) {
var owner = this._owner.get();
if (!owner) {
return;
}
if (owner) {
owner._onPropertyChangedFromNative(common.NumberPicker.valueProperty, sender.value);
}
};
NumberPickerChangeHandlerImpl.ObjCExposedMethods = {
'valueChanged': { returns: interop.types.void, params: [UIStepper] }
};
return NumberPickerChangeHandlerImpl;
}(NSObject));
//# sourceMappingURL=numberpicker.ios.js.map