uicore-ts 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/uicore.iml +9 -0
- package/.idea/vcs.xml +6 -0
- package/LICENSE +21 -0
- package/README.md +5 -0
- package/compiledScripts/UIActionIndicator.d.ts +12 -0
- package/compiledScripts/UIActionIndicator.js +54 -0
- package/compiledScripts/UIActionIndicator.js.map +1 -0
- package/compiledScripts/UIBaseButton.d.ts +52 -0
- package/compiledScripts/UIBaseButton.js +268 -0
- package/compiledScripts/UIBaseButton.js.map +1 -0
- package/compiledScripts/UIButton.d.ts +54 -0
- package/compiledScripts/UIButton.js +247 -0
- package/compiledScripts/UIButton.js.map +1 -0
- package/compiledScripts/UIColor.d.ts +41 -0
- package/compiledScripts/UIColor.js +286 -0
- package/compiledScripts/UIColor.js.map +1 -0
- package/compiledScripts/UICore.d.ts +27 -0
- package/compiledScripts/UICore.js +105 -0
- package/compiledScripts/UICore.js.map +1 -0
- package/compiledScripts/UICoreExtensions.d.ts +60 -0
- package/compiledScripts/UICoreExtensions.js +527 -0
- package/compiledScripts/UICoreExtensions.js.map +1 -0
- package/compiledScripts/UIDateTimeInput.d.ts +40 -0
- package/compiledScripts/UIDateTimeInput.js +38 -0
- package/compiledScripts/UIDateTimeInput.js.map +1 -0
- package/compiledScripts/UIDialogView.d.ts +23 -0
- package/compiledScripts/UIDialogView.js +118 -0
- package/compiledScripts/UIDialogView.js.map +1 -0
- package/compiledScripts/UIImageView.d.ts +36 -0
- package/compiledScripts/UIImageView.js +170 -0
- package/compiledScripts/UIImageView.js.map +1 -0
- package/compiledScripts/UIKeyValueStringFilter.d.ts +21 -0
- package/compiledScripts/UIKeyValueStringFilter.js +98 -0
- package/compiledScripts/UIKeyValueStringFilter.js.map +1 -0
- package/compiledScripts/UIKeyValueStringSorter.d.ts +38 -0
- package/compiledScripts/UIKeyValueStringSorter.js +117 -0
- package/compiledScripts/UIKeyValueStringSorter.js.map +1 -0
- package/compiledScripts/UILayoutGrid.d.ts +8 -0
- package/compiledScripts/UILayoutGrid.js +22 -0
- package/compiledScripts/UILayoutGrid.js.map +1 -0
- package/compiledScripts/UILink.d.ts +25 -0
- package/compiledScripts/UILink.js +81 -0
- package/compiledScripts/UILink.js.map +1 -0
- package/compiledScripts/UILinkButton.d.ts +18 -0
- package/compiledScripts/UILinkButton.js +60 -0
- package/compiledScripts/UILinkButton.js.map +1 -0
- package/compiledScripts/UINativeScrollView.d.ts +20 -0
- package/compiledScripts/UINativeScrollView.js +121 -0
- package/compiledScripts/UINativeScrollView.js.map +1 -0
- package/compiledScripts/UIObject.d.ts +69 -0
- package/compiledScripts/UIObject.js +442 -0
- package/compiledScripts/UIObject.js.map +1 -0
- package/compiledScripts/UIPoint.d.ts +18 -0
- package/compiledScripts/UIPoint.js +68 -0
- package/compiledScripts/UIPoint.js.map +1 -0
- package/compiledScripts/UIRectangle.d.ts +61 -0
- package/compiledScripts/UIRectangle.js +421 -0
- package/compiledScripts/UIRectangle.js.map +1 -0
- package/compiledScripts/UIRoute.d.ts +39 -0
- package/compiledScripts/UIRoute.js +202 -0
- package/compiledScripts/UIRoute.js.map +1 -0
- package/compiledScripts/UIScrollView.d.ts +19 -0
- package/compiledScripts/UIScrollView.js +121 -0
- package/compiledScripts/UIScrollView.js.map +1 -0
- package/compiledScripts/UISlideScrollerView.d.ts +40 -0
- package/compiledScripts/UISlideScrollerView.js +242 -0
- package/compiledScripts/UISlideScrollerView.js.map +1 -0
- package/compiledScripts/UIStringFilter.d.ts +26 -0
- package/compiledScripts/UIStringFilter.js +107 -0
- package/compiledScripts/UIStringFilter.js.map +1 -0
- package/compiledScripts/UITableView.d.ts +61 -0
- package/compiledScripts/UITableView.js +383 -0
- package/compiledScripts/UITableView.js.map +1 -0
- package/compiledScripts/UITextArea.d.ts +7 -0
- package/compiledScripts/UITextArea.js +27 -0
- package/compiledScripts/UITextArea.js.map +1 -0
- package/compiledScripts/UITextField.d.ts +44 -0
- package/compiledScripts/UITextField.js +83 -0
- package/compiledScripts/UITextField.js.map +1 -0
- package/compiledScripts/UITextView.d.ts +89 -0
- package/compiledScripts/UITextView.js +237 -0
- package/compiledScripts/UITextView.js.map +1 -0
- package/compiledScripts/UITimer.d.ts +13 -0
- package/compiledScripts/UITimer.js +45 -0
- package/compiledScripts/UITimer.js.map +1 -0
- package/compiledScripts/UIView.d.ts +330 -0
- package/compiledScripts/UIView.js +1533 -0
- package/compiledScripts/UIView.js.map +1 -0
- package/compiledScripts/UIViewController.d.ts +38 -0
- package/compiledScripts/UIViewController.js +153 -0
- package/compiledScripts/UIViewController.js.map +1 -0
- package/compiledScripts/index.d.ts +29 -0
- package/compiledScripts/index.js +46 -0
- package/compiledScripts/index.js.map +1 -0
- package/package.json +36 -0
- package/scripts/UIActionIndicator.ts +139 -0
- package/scripts/UIBaseButton.ts +563 -0
- package/scripts/UIButton.ts +552 -0
- package/scripts/UIColor.ts +427 -0
- package/scripts/UICore.ts +223 -0
- package/scripts/UICoreExtensions.ts +949 -0
- package/scripts/UIDateTimeInput.ts +109 -0
- package/scripts/UIDialogView.ts +297 -0
- package/scripts/UIImageView.ts +366 -0
- package/scripts/UIKeyValueStringFilter.ts +260 -0
- package/scripts/UIKeyValueStringSorter.ts +337 -0
- package/scripts/UILayoutGrid.ts +83 -0
- package/scripts/UILink.ts +292 -0
- package/scripts/UILinkButton.ts +238 -0
- package/scripts/UINativeScrollView.ts +254 -0
- package/scripts/UIObject.ts +827 -0
- package/scripts/UIPoint.ts +123 -0
- package/scripts/UIRectangle.ts +730 -0
- package/scripts/UIRoute.ts +391 -0
- package/scripts/UIScrollView.ts +290 -0
- package/scripts/UISlideScrollerView.ts +530 -0
- package/scripts/UIStringFilter.ts +293 -0
- package/scripts/UITableView.ts +790 -0
- package/scripts/UITextArea.ts +91 -0
- package/scripts/UITextField.ts +218 -0
- package/scripts/UITextView.ts +561 -0
- package/scripts/UITimer.ts +107 -0
- package/scripts/UIView.ts +2789 -0
- package/scripts/UIViewController.ts +304 -0
- package/scripts/index.ts +36 -0
- package/tsconfig.json +59 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UIRoute = void 0;
|
|
4
|
+
const UIObject_1 = require("./UIObject");
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
class UIRoute extends Array {
|
|
7
|
+
constructor(hash) {
|
|
8
|
+
super();
|
|
9
|
+
this._isHandled = UIObject_1.NO;
|
|
10
|
+
this.completedComponents = [];
|
|
11
|
+
if (!hash || !hash.startsWith) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
if (hash.startsWith("#")) {
|
|
15
|
+
hash = hash.slice(1);
|
|
16
|
+
}
|
|
17
|
+
hash = decodeURIComponent(hash);
|
|
18
|
+
const components = hash.split("]");
|
|
19
|
+
components.forEach(function (component, index, array) {
|
|
20
|
+
const componentName = component.split("[")[0];
|
|
21
|
+
const parameters = {};
|
|
22
|
+
if (!componentName) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const parametersString = component.split("[")[1] || "";
|
|
26
|
+
const parameterPairStrings = parametersString.split(",") || [];
|
|
27
|
+
parameterPairStrings.forEach(function (pairString, index, array) {
|
|
28
|
+
const keyAndValueArray = pairString.split(":");
|
|
29
|
+
const key = decodeURIComponent(keyAndValueArray[0]);
|
|
30
|
+
const value = decodeURIComponent(keyAndValueArray[1]);
|
|
31
|
+
if (key) {
|
|
32
|
+
parameters[key] = value;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
this.push({
|
|
36
|
+
name: componentName,
|
|
37
|
+
parameters: parameters
|
|
38
|
+
});
|
|
39
|
+
}, this);
|
|
40
|
+
}
|
|
41
|
+
static get currentRoute() {
|
|
42
|
+
return new UIRoute(window.location.hash);
|
|
43
|
+
}
|
|
44
|
+
apply() {
|
|
45
|
+
window.location.hash = this.stringRepresentation;
|
|
46
|
+
}
|
|
47
|
+
applyByReplacingCurrentRouteInHistory() {
|
|
48
|
+
window.location.replace(this.linkRepresentation);
|
|
49
|
+
}
|
|
50
|
+
copy() {
|
|
51
|
+
var result = new UIRoute();
|
|
52
|
+
result = Object.assign(result, this);
|
|
53
|
+
return result;
|
|
54
|
+
}
|
|
55
|
+
childRoute() {
|
|
56
|
+
var result = this.copy();
|
|
57
|
+
result.completedComponents.forEach(function (component, index, completedComponents) {
|
|
58
|
+
var indexInResult = result.indexOf(component);
|
|
59
|
+
if (indexInResult > -1) {
|
|
60
|
+
result.splice(indexInResult, 1);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
result.completedComponents = [];
|
|
64
|
+
result.parentRoute = this;
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
routeByRemovingComponentsOtherThanOnesNamed(componentNames) {
|
|
68
|
+
const result = this.copy();
|
|
69
|
+
const indexesToRemove = [];
|
|
70
|
+
result.forEach(function (component, index, array) {
|
|
71
|
+
if (!componentNames.contains(component.name)) {
|
|
72
|
+
indexesToRemove.push(index);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
indexesToRemove.forEach(function (indexToRemove, index, array) {
|
|
76
|
+
result.removeElementAtIndex(indexToRemove);
|
|
77
|
+
});
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
routeByRemovingComponentNamed(componentName) {
|
|
81
|
+
const result = this.copy();
|
|
82
|
+
const componentIndex = result.findIndex(function (component, index) {
|
|
83
|
+
return (component.name == componentName);
|
|
84
|
+
});
|
|
85
|
+
if (componentIndex != -1) {
|
|
86
|
+
result.splice(componentIndex, 1);
|
|
87
|
+
}
|
|
88
|
+
return result;
|
|
89
|
+
}
|
|
90
|
+
routeByRemovingParameterInComponent(componentName, parameterName, removeComponentIfEmpty = UIObject_1.NO) {
|
|
91
|
+
var result = this.copy();
|
|
92
|
+
var parameters = result.componentWithName(componentName).parameters;
|
|
93
|
+
if ((0, UIObject_1.IS_NOT)(parameters)) {
|
|
94
|
+
parameters = {};
|
|
95
|
+
}
|
|
96
|
+
delete parameters[parameterName];
|
|
97
|
+
result = result.routeWithComponent(componentName, parameters);
|
|
98
|
+
if (removeComponentIfEmpty && Object.keys(parameters).length == 0) {
|
|
99
|
+
result = result.routeByRemovingComponentNamed(componentName);
|
|
100
|
+
}
|
|
101
|
+
return result;
|
|
102
|
+
}
|
|
103
|
+
routeBySettingParameterInComponent(componentName, parameterName, valueToSet) {
|
|
104
|
+
var result = this.copy();
|
|
105
|
+
if ((0, UIObject_1.IS_NIL)(valueToSet) || (0, UIObject_1.IS_NIL)(parameterName)) {
|
|
106
|
+
return result;
|
|
107
|
+
}
|
|
108
|
+
var parameters = result.componentWithName(componentName).parameters;
|
|
109
|
+
if ((0, UIObject_1.IS_NOT)(parameters)) {
|
|
110
|
+
parameters = {};
|
|
111
|
+
}
|
|
112
|
+
parameters[parameterName] = valueToSet;
|
|
113
|
+
result = result.routeWithComponent(componentName, parameters);
|
|
114
|
+
return result;
|
|
115
|
+
}
|
|
116
|
+
routeWithViewControllerComponent(viewController, parameters, extendParameters = UIObject_1.NO) {
|
|
117
|
+
return this.routeWithComponent(viewController.routeComponentName, parameters, extendParameters);
|
|
118
|
+
}
|
|
119
|
+
routeWithComponent(name, parameters, extendParameters = UIObject_1.NO) {
|
|
120
|
+
const result = this.copy();
|
|
121
|
+
var component = result.componentWithName(name);
|
|
122
|
+
if ((0, UIObject_1.IS_NOT)(component)) {
|
|
123
|
+
component = {
|
|
124
|
+
name: name,
|
|
125
|
+
parameters: {}
|
|
126
|
+
};
|
|
127
|
+
result.push(component);
|
|
128
|
+
}
|
|
129
|
+
if ((0, UIObject_1.IS_NOT)(parameters)) {
|
|
130
|
+
parameters = {};
|
|
131
|
+
}
|
|
132
|
+
if (extendParameters) {
|
|
133
|
+
component.parameters = Object.assign(component.parameters, parameters);
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
component.parameters = parameters;
|
|
137
|
+
}
|
|
138
|
+
return result;
|
|
139
|
+
}
|
|
140
|
+
navigateBySettingComponent(name, parameters, extendParameters = UIObject_1.NO) {
|
|
141
|
+
this.routeWithComponent(name, parameters, extendParameters).apply();
|
|
142
|
+
}
|
|
143
|
+
componentWithViewController(viewController) {
|
|
144
|
+
return this.componentWithName(viewController.routeComponentName);
|
|
145
|
+
}
|
|
146
|
+
componentWithName(name) {
|
|
147
|
+
var result = UIObject_1.nil;
|
|
148
|
+
this.forEach(function (component, index, self) {
|
|
149
|
+
if (component.name == name) {
|
|
150
|
+
result = component;
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
return result;
|
|
154
|
+
}
|
|
155
|
+
didcompleteComponent(component) {
|
|
156
|
+
const self = this;
|
|
157
|
+
const index = self.indexOf(component, 0);
|
|
158
|
+
if (index > -1) {
|
|
159
|
+
self.completedComponents.push(self.splice(index, 1)[0]);
|
|
160
|
+
//self.completedComponents.push(component);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
set isHandled(isHandled) {
|
|
164
|
+
this._isHandled = isHandled;
|
|
165
|
+
}
|
|
166
|
+
get isHandled() {
|
|
167
|
+
return (this._isHandled || (this.length == 0 && this.completedComponents.length != 0));
|
|
168
|
+
}
|
|
169
|
+
get linkRepresentation() {
|
|
170
|
+
return "#" + this.stringRepresentation;
|
|
171
|
+
}
|
|
172
|
+
get stringRepresentation() {
|
|
173
|
+
var result = "";
|
|
174
|
+
this.completedComponents.forEach(function (component, index, self) {
|
|
175
|
+
result = result + component.name;
|
|
176
|
+
const parameters = component.parameters;
|
|
177
|
+
result = result + "[";
|
|
178
|
+
Object.keys(parameters).forEach(function (key, index, keys) {
|
|
179
|
+
if (index) {
|
|
180
|
+
result = result + ",";
|
|
181
|
+
}
|
|
182
|
+
result = result + encodeURIComponent(key) + ":" + encodeURIComponent(parameters[key]);
|
|
183
|
+
});
|
|
184
|
+
result = result + "]";
|
|
185
|
+
});
|
|
186
|
+
this.forEach(function (component, index, self) {
|
|
187
|
+
result = result + component.name;
|
|
188
|
+
const parameters = component.parameters;
|
|
189
|
+
result = result + "[";
|
|
190
|
+
Object.keys(parameters).forEach(function (key, index, keys) {
|
|
191
|
+
if (index) {
|
|
192
|
+
result = result + ",";
|
|
193
|
+
}
|
|
194
|
+
result = result + encodeURIComponent(key) + ":" + encodeURIComponent(parameters[key]);
|
|
195
|
+
});
|
|
196
|
+
result = result + "]";
|
|
197
|
+
});
|
|
198
|
+
return result;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
exports.UIRoute = UIRoute;
|
|
202
|
+
//# sourceMappingURL=UIRoute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UIRoute.js","sourceRoot":"","sources":["../scripts/UIRoute.ts"],"names":[],"mappings":";;;AAAA,yCAAoD;AAsBpD,aAAa;AACb,MAAa,OAAQ,SAAQ,KAAuB;IAQhD,YAAY,IAAa;QAErB,KAAK,EAAE,CAAA;QARX,eAAU,GAAY,aAAE,CAAA;QACxB,wBAAmB,GAAuB,EAAE,CAAA;QASxC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YAE3B,OAAM;SAET;QAED,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;YACtB,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;SACvB;QAED,IAAI,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAA;QAE/B,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAClC,UAAU,CAAC,OAAO,CAAC,UAAyB,SAAiB,EAAE,KAAa,EAAE,KAAe;YAEzF,MAAM,aAAa,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;YAC7C,MAAM,UAAU,GAAG,EAAE,CAAA;YAErB,IAAI,CAAC,aAAa,EAA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,CAAC,CAAC,OAAO,CAAC,UAAU,GAAG,EAAE,KAAK,EAAE,IAAI;gBACtD,IAAI,KAAK,EAAE;oBACP,MAAM,GAAG,MAAM,GAAG,GAAG,CAAA;iBACxB;gBACD,MAAM,GAAG,MAAM,GAAG,kBAAkB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,kBAAkB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAA;YACzF,CAAC,CAAC,CAAA;YACF,MAAM,GAAG,MAAM,GAAG,GAAG,CAAA;QACzB,CAAC,CAAC,CAAA;QACF,IAAI,CAAC,OAAO,CAAC,UAAU,SAAS,EAAE,KAAK,EAAE,IAAI;YACzC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,IAAI,CAAA;YAChC,MAAM,UAAU,GAAG,SAAS,CAAC,UAAU,CAAA;YACvC,MAAM,GAAG,MAAM,GAAG,GAAG,CAAA;YACrB,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,UAAU,GAAG,EAAE,KAAK,EAAE,IAAI;gBACtD,IAAI,KAAK,EAAE;oBACP,MAAM,GAAG,MAAM,GAAG,GAAG,CAAA;iBACxB;gBACD,MAAM,GAAG,MAAM,GAAG,kBAAkB,CAAC,GAAG,CAAC,GAAG,GAAG,GAAG,kBAAkB,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAA;YACzF,CAAC,CAAC,CAAA;YACF,MAAM,GAAG,MAAM,GAAG,GAAG,CAAA;QACzB,CAAC,CAAC,CAAA;QACF,OAAO,MAAM,CAAA;IACjB,CAAC;CAMJ;AA9TD,0BA8TC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UIPoint } from "./UIPoint";
|
|
2
|
+
import { UIRectangle } from "./UIRectangle";
|
|
3
|
+
import { UIView } from "./UIView";
|
|
4
|
+
export declare class UIScrollView extends UIView {
|
|
5
|
+
_contentOffset: UIPoint;
|
|
6
|
+
_contentScale: number;
|
|
7
|
+
containerView: UIView;
|
|
8
|
+
_pointerDown: boolean;
|
|
9
|
+
_scrollEnabled: boolean;
|
|
10
|
+
_previousClientPoint: UIPoint;
|
|
11
|
+
_intrinsicContentFrame: UIRectangle;
|
|
12
|
+
constructor(elementID: string, viewHTMLElement?: HTMLElement);
|
|
13
|
+
invalidateIntrinsicContentFrame(): void;
|
|
14
|
+
get contentOffset(): UIPoint;
|
|
15
|
+
set contentOffset(offset: UIPoint);
|
|
16
|
+
layoutSubviews(): void;
|
|
17
|
+
hasSubview(view: UIView): boolean;
|
|
18
|
+
addSubview(view: UIView): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UIScrollView = void 0;
|
|
4
|
+
const UIObject_1 = require("./UIObject");
|
|
5
|
+
const UIPoint_1 = require("./UIPoint");
|
|
6
|
+
const UIView_1 = require("./UIView");
|
|
7
|
+
class UIScrollView extends UIView_1.UIView {
|
|
8
|
+
constructor(elementID, viewHTMLElement) {
|
|
9
|
+
super(elementID, viewHTMLElement);
|
|
10
|
+
this._contentOffset = new UIPoint_1.UIPoint(0, 0);
|
|
11
|
+
this._contentScale = 1;
|
|
12
|
+
this._scrollEnabled = UIObject_1.YES;
|
|
13
|
+
this._class = UIScrollView;
|
|
14
|
+
this.superclass = UIView_1.UIView;
|
|
15
|
+
this.containerView = new UIView_1.UIView(elementID + "ContainerView");
|
|
16
|
+
super.addSubview(this.containerView);
|
|
17
|
+
this.style.overflow = "hidden";
|
|
18
|
+
this.pausesPointerEvents = UIObject_1.NO; //YES;
|
|
19
|
+
this.addTargetForControlEvent(UIView_1.UIView.controlEvent.PointerDown, function () {
|
|
20
|
+
this._pointerDown = UIObject_1.YES;
|
|
21
|
+
}.bind(this));
|
|
22
|
+
this.addTargetForControlEvent(UIView_1.UIView.controlEvent.PointerUp, function () {
|
|
23
|
+
this._pointerDown = UIObject_1.NO;
|
|
24
|
+
this._previousClientPoint = null;
|
|
25
|
+
scrollStopped();
|
|
26
|
+
}.bind(this));
|
|
27
|
+
function scrollStopped() {
|
|
28
|
+
// Handle paging if needed
|
|
29
|
+
}
|
|
30
|
+
this.addTargetForControlEvent(UIView_1.UIView.controlEvent.PointerMove, function (sender, event) {
|
|
31
|
+
if (!(this._pointerDown && this._scrollEnabled && this._enabled)) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const currentClientPoint = new UIPoint_1.UIPoint(UIObject_1.nil, UIObject_1.nil);
|
|
35
|
+
if (window.MouseEvent && event instanceof MouseEvent) {
|
|
36
|
+
currentClientPoint.x = event.clientX;
|
|
37
|
+
currentClientPoint.y = event.clientY;
|
|
38
|
+
}
|
|
39
|
+
if (window.TouchEvent && event instanceof TouchEvent) {
|
|
40
|
+
const touchEvent = event;
|
|
41
|
+
if (touchEvent.touches.length != 1) {
|
|
42
|
+
this._pointerDown = UIObject_1.NO;
|
|
43
|
+
this._previousClientPoint = null;
|
|
44
|
+
scrollStopped();
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
currentClientPoint.x = touchEvent.touches[0].clientX;
|
|
48
|
+
currentClientPoint.y = touchEvent.touches[0].clientY;
|
|
49
|
+
}
|
|
50
|
+
if (!this._previousClientPoint) {
|
|
51
|
+
this._previousClientPoint = currentClientPoint;
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const changePoint = currentClientPoint.copy().subtract(this._previousClientPoint);
|
|
55
|
+
if (this.containerView.bounds.width <= this.bounds.width) {
|
|
56
|
+
changePoint.x = 0;
|
|
57
|
+
}
|
|
58
|
+
if (0 < this.contentOffset.x + changePoint.x) {
|
|
59
|
+
changePoint.x = -this.contentOffset.x;
|
|
60
|
+
}
|
|
61
|
+
if (this.contentOffset.x + changePoint.x < -this.bounds.width) {
|
|
62
|
+
changePoint.x = -this.bounds.width - this.contentOffset.x;
|
|
63
|
+
}
|
|
64
|
+
if (this.containerView.bounds.height <= this.bounds.height) {
|
|
65
|
+
changePoint.y = 0;
|
|
66
|
+
}
|
|
67
|
+
if (0 < this.contentOffset.y + changePoint.y) {
|
|
68
|
+
changePoint.y = -this.contentOffset.y;
|
|
69
|
+
}
|
|
70
|
+
if (this.contentOffset.y + changePoint.y < -this.bounds.height) {
|
|
71
|
+
changePoint.y = -this.bounds.height - this.contentOffset.y;
|
|
72
|
+
}
|
|
73
|
+
this.contentOffset = this.contentOffset.add(changePoint);
|
|
74
|
+
this._previousClientPoint = currentClientPoint;
|
|
75
|
+
}.bind(this));
|
|
76
|
+
}
|
|
77
|
+
invalidateIntrinsicContentFrame() {
|
|
78
|
+
this._intrinsicContentFrame = UIObject_1.nil;
|
|
79
|
+
}
|
|
80
|
+
get contentOffset() {
|
|
81
|
+
return this._contentOffset;
|
|
82
|
+
}
|
|
83
|
+
set contentOffset(offset) {
|
|
84
|
+
this._contentOffset = offset;
|
|
85
|
+
this.setNeedsLayout();
|
|
86
|
+
}
|
|
87
|
+
layoutSubviews() {
|
|
88
|
+
super.layoutSubviews();
|
|
89
|
+
// var intrinsicContentFrame = this._intrinsicContentFrame;
|
|
90
|
+
// if (!IS(intrinsicContentFrame)) {
|
|
91
|
+
// intrinsicContentFrame = this.containerView.intrinsicContentSizeWithConstraints();
|
|
92
|
+
// }
|
|
93
|
+
// intrinsicContentFrame.offsetByPoint(this.contentOffset);
|
|
94
|
+
// intrinsicContentFrame.height = this.containerView.viewHTMLElement.scrollHeight;
|
|
95
|
+
// intrinsicContentFrame.width = this.containerView.viewHTMLElement.scrollWidth;
|
|
96
|
+
// this.containerView.frame = intrinsicContentFrame;
|
|
97
|
+
this.containerView.frame = this.containerView.bounds.offsetByPoint(this.contentOffset);
|
|
98
|
+
}
|
|
99
|
+
// get _subviews() {
|
|
100
|
+
// return super.subviews;
|
|
101
|
+
// }
|
|
102
|
+
// set _subviews(subviews: UIView[]) {
|
|
103
|
+
// super.subviews = subviews;
|
|
104
|
+
// }
|
|
105
|
+
// get subviews() {
|
|
106
|
+
// return this.containerView.subviews;
|
|
107
|
+
// }
|
|
108
|
+
// set subviews(subviews: UIView[]) {
|
|
109
|
+
// this.containerView.subviews = subviews;
|
|
110
|
+
// this.invalidateIntrinsicContentFrame();
|
|
111
|
+
// }
|
|
112
|
+
hasSubview(view) {
|
|
113
|
+
return this.containerView.hasSubview(view);
|
|
114
|
+
}
|
|
115
|
+
addSubview(view) {
|
|
116
|
+
this.containerView.addSubview(view);
|
|
117
|
+
this.invalidateIntrinsicContentFrame();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
exports.UIScrollView = UIScrollView;
|
|
121
|
+
//# sourceMappingURL=UIScrollView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UIScrollView.js","sourceRoot":"","sources":["../scripts/UIScrollView.ts"],"names":[],"mappings":";;;AAAA,yCAAyC;AACzC,uCAAmC;AAEnC,qCAAiC;AAMjC,MAAa,YAAa,SAAQ,eAAM;IAgBpC,YAAY,SAAiB,EAAE,eAA6B;QAExD,KAAK,CAAC,SAAS,EAAE,eAAe,CAAC,CAAA;QAfrC,mBAAc,GAAY,IAAI,iBAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAC3C,kBAAa,GAAW,CAAC,CAAA;QAMzB,mBAAc,GAAY,cAAG,CAAA;QAUzB,IAAI,CAAC,MAAM,GAAG,YAAY,CAAA;QAC1B,IAAI,CAAC,UAAU,GAAG,eAAM,CAAA;QAGxB,IAAI,CAAC,aAAa,GAAG,IAAI,eAAM,CAAC,SAAS,GAAG,eAAe,CAAC,CAAA;QAE5D,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;QAGpC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAA;QAE9B,IAAI,CAAC,mBAAmB,GAAG,aAAE,CAAA,CAAC,MAAM;QAGpC,IAAI,CAAC,wBAAwB,CAAC,eAAM,CAAC,YAAY,CAAC,WAAW,EAAE;Y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C,IAAY;QAEnB,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,CAAA;QAEnC,IAAI,CAAC,+BAA+B,EAAE,CAAA;IAG1C,CAAC;CAMJ;AAnOD,oCAmOC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { UIButton } from "./UIButton";
|
|
2
|
+
import { UIRectangle } from "./UIRectangle";
|
|
3
|
+
import { UIScrollView } from "./UIScrollView";
|
|
4
|
+
import { UITimer } from "./UITimer";
|
|
5
|
+
import { UIView, UIViewBroadcastEvent } from "./UIView";
|
|
6
|
+
export declare class UISlideScrollerView extends UIView {
|
|
7
|
+
_previousLayoutBounds: UIRectangle;
|
|
8
|
+
_targetIndex: number;
|
|
9
|
+
pageIndicatorsView: UIView;
|
|
10
|
+
_isAnimating: boolean;
|
|
11
|
+
_isAnimationOngoing: boolean;
|
|
12
|
+
_animationTimer: UITimer;
|
|
13
|
+
_scrollView: UIScrollView;
|
|
14
|
+
_slideViews: UIView[];
|
|
15
|
+
wrapAround: boolean;
|
|
16
|
+
animationDuration: number;
|
|
17
|
+
animationDelay: number;
|
|
18
|
+
_currentPageIndex: number;
|
|
19
|
+
constructor(elementID: string, viewHTMLElement?: HTMLElement);
|
|
20
|
+
buttonForPageIndicatorWithIndex(index: number): UIButton;
|
|
21
|
+
addSlideView(view: UIView): void;
|
|
22
|
+
set slideViews(views: UIView[]);
|
|
23
|
+
get slideViews(): UIView[];
|
|
24
|
+
get currentPageIndex(): number;
|
|
25
|
+
set currentPageIndex(index: number);
|
|
26
|
+
scrollToPreviousPage(animated: boolean): void;
|
|
27
|
+
scrollToNextPage(animated: boolean): void;
|
|
28
|
+
scrollToPageWithIndex(targetIndex: number, animated?: boolean): void;
|
|
29
|
+
willScrollToPageWithIndex(index: number): void;
|
|
30
|
+
didScrollToPageWithIndex(index: number): void;
|
|
31
|
+
startAnimating(): void;
|
|
32
|
+
stopAnimating(): void;
|
|
33
|
+
updateSlideViews(): void;
|
|
34
|
+
didReceiveBroadcastEvent(event: UIViewBroadcastEvent): void;
|
|
35
|
+
set frame(frame: UIRectangle);
|
|
36
|
+
get frame(): UIRectangle;
|
|
37
|
+
layoutSubviews(): void;
|
|
38
|
+
layoutPageIndicators(): void;
|
|
39
|
+
removeFromSuperview(): void;
|
|
40
|
+
}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UISlideScrollerView = void 0;
|
|
4
|
+
const UIButton_1 = require("./UIButton");
|
|
5
|
+
const UIColor_1 = require("./UIColor");
|
|
6
|
+
const UICore_1 = require("./UICore");
|
|
7
|
+
const UIObject_1 = require("./UIObject");
|
|
8
|
+
const UIRectangle_1 = require("./UIRectangle");
|
|
9
|
+
const UIScrollView_1 = require("./UIScrollView");
|
|
10
|
+
const UITimer_1 = require("./UITimer");
|
|
11
|
+
const UIView_1 = require("./UIView");
|
|
12
|
+
class UISlideScrollerView extends UIView_1.UIView {
|
|
13
|
+
constructor(elementID, viewHTMLElement) {
|
|
14
|
+
super(elementID, viewHTMLElement);
|
|
15
|
+
this._targetIndex = 0;
|
|
16
|
+
this._isAnimating = UIObject_1.NO;
|
|
17
|
+
this._isAnimationOngoing = UIObject_1.NO;
|
|
18
|
+
this._animationTimer = UIObject_1.nil;
|
|
19
|
+
this._slideViews = [];
|
|
20
|
+
this.wrapAround = UIObject_1.YES;
|
|
21
|
+
this.animationDuration = 0.35;
|
|
22
|
+
this.animationDelay = 2;
|
|
23
|
+
this._currentPageIndex = 0;
|
|
24
|
+
this._class = UIScrollView_1.UIScrollView;
|
|
25
|
+
this.superclass = UIView_1.UIView;
|
|
26
|
+
this._scrollView = new UIScrollView_1.UIScrollView(elementID + "ScrollView");
|
|
27
|
+
this.addSubview(this._scrollView);
|
|
28
|
+
this._scrollView._scrollEnabled = UIObject_1.NO;
|
|
29
|
+
this._scrollView.addTargetForControlEvent(UIView_1.UIView.controlEvent.PointerMove, function (sender, event) {
|
|
30
|
+
if (event instanceof MouseEvent) {
|
|
31
|
+
this._animationTimer.invalidate();
|
|
32
|
+
}
|
|
33
|
+
}.bind(this));
|
|
34
|
+
this._scrollView.addTargetForControlEvent(UIView_1.UIView.controlEvent.PointerLeave, function () {
|
|
35
|
+
if (this._isAnimating && event instanceof MouseEvent) {
|
|
36
|
+
this.startAnimating();
|
|
37
|
+
}
|
|
38
|
+
}.bind(this));
|
|
39
|
+
// Touch events
|
|
40
|
+
this._scrollView.addTargetForControlEvent(UIView_1.UIView.controlEvent.PointerDown, function (sender, event) {
|
|
41
|
+
if (event instanceof TouchEvent) {
|
|
42
|
+
this._animationTimer.invalidate();
|
|
43
|
+
}
|
|
44
|
+
}.bind(this));
|
|
45
|
+
this._scrollView.addTargetForControlEvents([
|
|
46
|
+
UIView_1.UIView.controlEvent.PointerUp, UIView_1.UIView.controlEvent.PointerCancel
|
|
47
|
+
], function (sender, event) {
|
|
48
|
+
if (event instanceof TouchEvent && this._isAnimating) {
|
|
49
|
+
this.startAnimating();
|
|
50
|
+
}
|
|
51
|
+
}.bind(this));
|
|
52
|
+
// Page indicator
|
|
53
|
+
this.pageIndicatorsView = new UIView_1.UIView(elementID + "PageIndicatorsView");
|
|
54
|
+
this.addSubview(this.pageIndicatorsView);
|
|
55
|
+
}
|
|
56
|
+
buttonForPageIndicatorWithIndex(index) {
|
|
57
|
+
const result = new UIButton_1.UIButton(this.viewHTMLElement.id + "PageIndicatorButton" + index);
|
|
58
|
+
result.addTargetForControlEvents([
|
|
59
|
+
UIView_1.UIView.controlEvent.PointerUpInside, UIView_1.UIView.controlEvent.EnterUp
|
|
60
|
+
], function (sender, event) {
|
|
61
|
+
this.scrollToPageWithIndex(index, UIObject_1.YES);
|
|
62
|
+
if (this._isAnimating) {
|
|
63
|
+
this.startAnimating();
|
|
64
|
+
}
|
|
65
|
+
}.bind(this));
|
|
66
|
+
result.addTargetForControlEvent(UIView_1.UIView.controlEvent.PointerMove, function () {
|
|
67
|
+
this._animationTimer.invalidate();
|
|
68
|
+
}.bind(this));
|
|
69
|
+
result.updateContentForNormalState = function () {
|
|
70
|
+
result.backgroundColor = UIColor_1.UIColor.blueColor;
|
|
71
|
+
result.titleLabel.textColor = UIColor_1.UIColor.whiteColor;
|
|
72
|
+
};
|
|
73
|
+
result.frame = new UIRectangle_1.UIRectangle(UIObject_1.nil, UIObject_1.nil, 20, 50);
|
|
74
|
+
// result.style.height = "20px";
|
|
75
|
+
// result.style.width = "50px";
|
|
76
|
+
result.style.display = "table-cell";
|
|
77
|
+
result.style.position = "relative";
|
|
78
|
+
// var resultContent = new UIView(result.viewHTMLElement.id + "Content");
|
|
79
|
+
// resultContent.backgroundColor = UIColor.whiteColor;
|
|
80
|
+
// resultContent.centerYInContainer();
|
|
81
|
+
// resultContent.style.height = "10px";
|
|
82
|
+
// resultContent.style.height = "100%";
|
|
83
|
+
// resultContent.style.borderRadius = "5px";
|
|
84
|
+
// result.addSubview(resultContent);
|
|
85
|
+
return result;
|
|
86
|
+
}
|
|
87
|
+
addSlideView(view) {
|
|
88
|
+
this.slideViews.push(view);
|
|
89
|
+
this.updateSlideViews();
|
|
90
|
+
}
|
|
91
|
+
set slideViews(views) {
|
|
92
|
+
this._slideViews = views;
|
|
93
|
+
this.updateSlideViews();
|
|
94
|
+
}
|
|
95
|
+
get slideViews() {
|
|
96
|
+
return this._slideViews;
|
|
97
|
+
}
|
|
98
|
+
get currentPageIndex() {
|
|
99
|
+
const result = this._currentPageIndex;
|
|
100
|
+
return result;
|
|
101
|
+
}
|
|
102
|
+
set currentPageIndex(index) {
|
|
103
|
+
this._currentPageIndex = index;
|
|
104
|
+
this._slideViews[index].willAppear();
|
|
105
|
+
//this._scrollView.contentOffset.x = -this._slideViews[index].frame.min.x; //-this.bounds.width * index;
|
|
106
|
+
//this._scrollView.contentOffset.x = Math.round(this._scrollView.contentOffset.x);
|
|
107
|
+
this._scrollView.contentOffset = this._scrollView.contentOffset.pointWithX(-this._slideViews[index].frame.min.x);
|
|
108
|
+
this.pageIndicatorsView.subviews.forEach(function (button, index, array) {
|
|
109
|
+
button.selected = UIObject_1.NO;
|
|
110
|
+
});
|
|
111
|
+
this.pageIndicatorsView.subviews[index].selected = UIObject_1.YES;
|
|
112
|
+
}
|
|
113
|
+
scrollToPreviousPage(animated) {
|
|
114
|
+
if (this.slideViews.length == 0) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
var targetIndex = this.currentPageIndex;
|
|
118
|
+
if (this.wrapAround) {
|
|
119
|
+
targetIndex = (this.currentPageIndex - 1) % (this.slideViews.length);
|
|
120
|
+
}
|
|
121
|
+
else if (this.currentPageIndex - 1 < this.slideViews.length) {
|
|
122
|
+
targetIndex = this.currentPageIndex - 1;
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
this.scrollToPageWithIndex(targetIndex, animated);
|
|
128
|
+
}
|
|
129
|
+
scrollToNextPage(animated) {
|
|
130
|
+
if (this.slideViews.length == 0) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
var targetIndex = this.currentPageIndex;
|
|
134
|
+
if (this.wrapAround) {
|
|
135
|
+
targetIndex = (this.currentPageIndex + 1) % (this.slideViews.length);
|
|
136
|
+
}
|
|
137
|
+
else if (this.currentPageIndex + 1 < this.slideViews.length) {
|
|
138
|
+
targetIndex = this.currentPageIndex + 1;
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
this.scrollToPageWithIndex(targetIndex, animated);
|
|
144
|
+
}
|
|
145
|
+
scrollToPageWithIndex(targetIndex, animated = UIObject_1.YES) {
|
|
146
|
+
this._targetIndex = targetIndex;
|
|
147
|
+
// this._slideViews[this.currentPageIndex]._shouldLayout = NO;
|
|
148
|
+
// this._slideViews[this._targetIndex]._shouldLayout = YES;
|
|
149
|
+
//this._slideViews[this._targetIndex].hidden = NO;
|
|
150
|
+
this.willScrollToPageWithIndex(targetIndex);
|
|
151
|
+
this._isAnimationOngoing = UIObject_1.YES;
|
|
152
|
+
//var previousView = this._slideViews[this.currentPageIndex];
|
|
153
|
+
if (animated) {
|
|
154
|
+
UIView_1.UIView.animateViewOrViewsWithDurationDelayAndFunction(this._scrollView.containerView, this.animationDuration, 0, undefined, function () {
|
|
155
|
+
this.currentPageIndex = targetIndex;
|
|
156
|
+
}.bind(this), function () {
|
|
157
|
+
this.didScrollToPageWithIndex(targetIndex);
|
|
158
|
+
this._isAnimationOngoing = UIObject_1.NO;
|
|
159
|
+
//previousView.hidden = YES;
|
|
160
|
+
}.bind(this));
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
this.currentPageIndex = targetIndex;
|
|
164
|
+
this.didScrollToPageWithIndex(targetIndex);
|
|
165
|
+
//previousView.hidden = YES;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
willScrollToPageWithIndex(index) {
|
|
169
|
+
const targetView = this.slideViews[index];
|
|
170
|
+
if ((0, UIObject_1.IS)(targetView) && targetView.willAppear && targetView.willAppear instanceof Function) {
|
|
171
|
+
targetView.willAppear();
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
didScrollToPageWithIndex(index) {
|
|
175
|
+
}
|
|
176
|
+
startAnimating() {
|
|
177
|
+
this._isAnimating = UIObject_1.YES;
|
|
178
|
+
this._animationTimer.invalidate();
|
|
179
|
+
this._animationTimer = new UITimer_1.UITimer(this.animationDelay + this.animationDuration, UIObject_1.YES, function () {
|
|
180
|
+
this.scrollToNextPage(UIObject_1.YES);
|
|
181
|
+
}.bind(this));
|
|
182
|
+
}
|
|
183
|
+
stopAnimating() {
|
|
184
|
+
this._isAnimating = UIObject_1.NO;
|
|
185
|
+
this._animationTimer.invalidate();
|
|
186
|
+
}
|
|
187
|
+
updateSlideViews() {
|
|
188
|
+
this._scrollView.containerView.subviews.slice().forEach(function (subview, index, array) {
|
|
189
|
+
subview.removeFromSuperview();
|
|
190
|
+
});
|
|
191
|
+
this.pageIndicatorsView.subviews.slice().forEach(function (subview, index, array) {
|
|
192
|
+
subview.removeFromSuperview();
|
|
193
|
+
});
|
|
194
|
+
this._slideViews.forEach(function (view, index, array) {
|
|
195
|
+
this._scrollView.addSubview(view);
|
|
196
|
+
this.pageIndicatorsView.addSubview(this.buttonForPageIndicatorWithIndex(index));
|
|
197
|
+
}.bind(this));
|
|
198
|
+
}
|
|
199
|
+
didReceiveBroadcastEvent(event) {
|
|
200
|
+
super.didReceiveBroadcastEvent(event);
|
|
201
|
+
if (event.name == UICore_1.UICore.broadcastEventName.WindowDidResize) {
|
|
202
|
+
this.currentPageIndex = this.currentPageIndex;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
set frame(frame) {
|
|
206
|
+
super.frame = frame;
|
|
207
|
+
this.currentPageIndex = this.currentPageIndex;
|
|
208
|
+
}
|
|
209
|
+
get frame() {
|
|
210
|
+
return super.frame;
|
|
211
|
+
}
|
|
212
|
+
layoutSubviews() {
|
|
213
|
+
super.layoutSubviews();
|
|
214
|
+
if (this.bounds.isEqualTo(this._previousLayoutBounds)) {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
const bounds = this.bounds;
|
|
218
|
+
this._previousLayoutBounds = bounds;
|
|
219
|
+
this._scrollView.frame = bounds;
|
|
220
|
+
this._scrollView.containerView.frame = bounds.rectangleWithWidth(bounds.width *
|
|
221
|
+
this.slideViews.length).performFunctionWithSelf(function (self) {
|
|
222
|
+
self.offsetByPoint(this._scrollView.contentOffset);
|
|
223
|
+
return self;
|
|
224
|
+
}.bind(this));
|
|
225
|
+
this._slideViews.forEach(function (view, index, array) {
|
|
226
|
+
view.frame = bounds.rectangleWithX((this.bounds.width + 1) * index);
|
|
227
|
+
}.bind(this));
|
|
228
|
+
this.layoutPageIndicators();
|
|
229
|
+
}
|
|
230
|
+
layoutPageIndicators() {
|
|
231
|
+
this.pageIndicatorsView.centerXInContainer();
|
|
232
|
+
this.pageIndicatorsView.style.bottom = "20px";
|
|
233
|
+
this.pageIndicatorsView.style.height = "20px";
|
|
234
|
+
this.pageIndicatorsView.style.display = "table-row";
|
|
235
|
+
}
|
|
236
|
+
removeFromSuperview() {
|
|
237
|
+
super.removeFromSuperview();
|
|
238
|
+
this.stopAnimating();
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
exports.UISlideScrollerView = UISlideScrollerView;
|
|
242
|
+
//# sourceMappingURL=UISlideScrollerView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UISlideScrollerView.js","sourceRoot":"","sources":["../scripts/UISlideScrollerView.ts"],"names":[],"mappings":";;;AAAA,yCAAqC;AACrC,uCAAmC;AACnC,qCAAiC;AACjC,yCAA6C;AAC7C,+CAA2C;AAC3C,iDAA6C;AAC7C,uCAAmC;AACnC,qCAAuD;AAGvD,MAAa,mBAAoB,SAAQ,eAAM;IAoB3C,YAAY,SAAiB,EAAE,eAA6B;QAExD,KAAK,CAAC,SAAS,EAAE,eAAe,CAAC,CAAA;QAjBrC,iBAAY,GAAW,CAAC,CAAA;QAExB,iBAAY,GAAY,aAAE,CAAA;QAC1B,wBAAmB,GAAY,aAAE,CAAA;QACjC,oBAAe,GAAY,cAAG,CAAA;QAE9B,gBAAW,GAAa,EAAE,CAAA;QAE1B,eAAU,GAAY,cAAG,CAAA;QAEzB,sBAAiB,GAAW,IAAI,CAAA;QAChC,mBAAc,GAAW,CAAC,CAAA;QAE1B,sBAAiB,GAAW,CAAC,CAAA;QAMzB,IAAI,CAAC,MAAM,GAAG,2BAAY,CAAA;QAC1B,IAAI,CAAC,UAAU,GAAG,eAAM,CAAA;QAGxB,IAAI,CAAC,WAAW,GAAG,IAAI,2BAAY,CAAC,SAAS,GAAG,YAAY,CAAC,CAAA;QAE7D,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAGjC,IAAI,CAAC,WAAW,CAAC,cAAc,GAAG,aAAE,CAAA;QAEpC,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