targetj 1.0.187 → 1.0.189
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/build/BaseModel.js +8 -22
- package/build/DomInit.js +0 -1
- package/build/EventListener.js +14 -9
- package/build/LoadingManager.js +34 -30
- package/build/LocationManager.js +14 -8
- package/build/RunScheduler.js +3 -1
- package/build/TModel.js +3 -2
- package/build/TUtil.js +4 -0
- package/build/TargetData.js +2 -2
- package/build/TargetExecutor.js +1 -1
- package/build/TargetManager.js +1 -1
- package/build/TargetUtil.js +110 -69
- package/dist/targetjs.js +1 -1
- package/dist/targetjs.js.gz +0 -0
- package/package.json +1 -1
package/build/BaseModel.js
CHANGED
|
@@ -373,6 +373,7 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
373
373
|
if (cleanKey !== key) {
|
|
374
374
|
if (this.targets[key]) {
|
|
375
375
|
this.targets[cleanKey] = this.targets[key];
|
|
376
|
+
this.targets[cleanKey].originalName = key;
|
|
376
377
|
}
|
|
377
378
|
if (isInactiveKey) {
|
|
378
379
|
this.targets[cleanKey].active = false;
|
|
@@ -878,8 +879,8 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
878
879
|
}
|
|
879
880
|
}
|
|
880
881
|
}, {
|
|
881
|
-
key: "
|
|
882
|
-
value: function
|
|
882
|
+
key: "hasUpdatingImperativeTargets",
|
|
883
|
+
value: function hasUpdatingImperativeTargets(originalTargetName) {
|
|
883
884
|
var _iterator = _createForOfIteratorHelper(this.updatingTargetList),
|
|
884
885
|
_step;
|
|
885
886
|
try {
|
|
@@ -915,26 +916,6 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
915
916
|
}
|
|
916
917
|
}
|
|
917
918
|
}
|
|
918
|
-
}, {
|
|
919
|
-
key: "hasUpdatingChildren",
|
|
920
|
-
value: function hasUpdatingChildren(originalTargetName) {
|
|
921
|
-
if (originalTargetName) {
|
|
922
|
-
var count = 0;
|
|
923
|
-
this.updatingChildrenList.forEach(function (child) {
|
|
924
|
-
child.updatingTargetList.forEach(function (target) {
|
|
925
|
-
var _child$targetValues$t, _child$targets$target;
|
|
926
|
-
if (child.isTargetImperative(target) && ((_child$targetValues$t = child.targetValues[target]) === null || _child$targetValues$t === void 0 ? void 0 : _child$targetValues$t.originalTargetName) === originalTargetName) {
|
|
927
|
-
count++;
|
|
928
|
-
} else if (((_child$targets$target = child.targets[target]) === null || _child$targets$target === void 0 ? void 0 : _child$targets$target.originalTargetName) === originalTargetName) {
|
|
929
|
-
count++;
|
|
930
|
-
}
|
|
931
|
-
});
|
|
932
|
-
});
|
|
933
|
-
return count;
|
|
934
|
-
} else {
|
|
935
|
-
return this.updatingChildrenList.length > 0;
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
919
|
}, {
|
|
939
920
|
key: "addToActiveChildren",
|
|
940
921
|
value: function addToActiveChildren(child) {
|
|
@@ -959,6 +940,11 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
|
|
|
959
940
|
value: function hasActiveChildren() {
|
|
960
941
|
return this.activeChildrenList.length > 0;
|
|
961
942
|
}
|
|
943
|
+
}, {
|
|
944
|
+
key: "hasUpdatingChildren",
|
|
945
|
+
value: function hasUpdatingChildren() {
|
|
946
|
+
return this.updatingChildrenList.length > 0;
|
|
947
|
+
}
|
|
962
948
|
}, {
|
|
963
949
|
key: "deleteTargetValue",
|
|
964
950
|
value: function deleteTargetValue(key) {
|
package/build/DomInit.js
CHANGED
|
@@ -162,7 +162,6 @@ var DomInit = exports.DomInit = /*#__PURE__*/function () {
|
|
|
162
162
|
delete _value.$dom;
|
|
163
163
|
delete _value.id;
|
|
164
164
|
_value.sourceDom = true;
|
|
165
|
-
_value.shouldBeBracketed = false;
|
|
166
165
|
_value.otype = _value.id || (_parentModel.id || _App.App.getOid('blank').oid) + "_";
|
|
167
166
|
_value.isVisible = !_TUtil.TUtil.isDefined(_value.isVisible) ? function () {
|
|
168
167
|
return this.getParent().isVisible();
|
package/build/EventListener.js
CHANGED
|
@@ -240,8 +240,6 @@ var EventListener = exports.EventListener = /*#__PURE__*/function () {
|
|
|
240
240
|
this.currentHandlers.justFocused = focusHandler;
|
|
241
241
|
this.currentHandlers.blur = this.currentHandlers.focus;
|
|
242
242
|
}
|
|
243
|
-
this.currentHandlers.start = tmodel !== null && tmodel !== void 0 && tmodel.canHandleEvent('onStart') ? tmodel : undefined;
|
|
244
|
-
this.currentHandlers.end = tmodel !== null && tmodel !== void 0 && tmodel.canHandleEvent('onEnd') ? tmodel : undefined;
|
|
245
243
|
this.currentHandlers.hover = tmodel !== null && tmodel !== void 0 && tmodel.canHandleEvent('onHover') ? tmodel : undefined;
|
|
246
244
|
this.currentHandlers.click = clickHandler;
|
|
247
245
|
this.currentHandlers.swipe = swipeHandler;
|
|
@@ -261,6 +259,7 @@ var EventListener = exports.EventListener = /*#__PURE__*/function () {
|
|
|
261
259
|
this.currentHandlers.leave = undefined;
|
|
262
260
|
this.currentHandlers.justFocused = undefined;
|
|
263
261
|
this.currentHandlers.blur = undefined;
|
|
262
|
+
this.currentHandlers.end = undefined;
|
|
264
263
|
this.currentKey = this.currentTouch.key;
|
|
265
264
|
if (this.eventQueue.length === 0) {
|
|
266
265
|
this.currentEventName = "";
|
|
@@ -274,6 +273,12 @@ var EventListener = exports.EventListener = /*#__PURE__*/function () {
|
|
|
274
273
|
this.findEventHandlers(lastEvent);
|
|
275
274
|
}
|
|
276
275
|
if (lastEvent.eventType === 'end' || lastEvent.eventType === 'click') {
|
|
276
|
+
if (lastEvent.eventType === 'end') {
|
|
277
|
+
var _this$currentHandlers;
|
|
278
|
+
this.currentHandlers.end = this.currentHandlers.start;
|
|
279
|
+
(_this$currentHandlers = this.currentHandlers.end) === null || _this$currentHandlers === void 0 || _this$currentHandlers.markLayoutDirty('end-event');
|
|
280
|
+
this.currentHandlers.start = undefined;
|
|
281
|
+
}
|
|
277
282
|
this.canFindHandlers = true;
|
|
278
283
|
}
|
|
279
284
|
this.currentEventName = lastEvent.eventName;
|
|
@@ -289,7 +294,7 @@ var EventListener = exports.EventListener = /*#__PURE__*/function () {
|
|
|
289
294
|
}, {
|
|
290
295
|
key: "handleEvent",
|
|
291
296
|
value: function handleEvent(event, isDocEvent) {
|
|
292
|
-
var _this$lastEvent, _this$
|
|
297
|
+
var _this$lastEvent, _this$currentHandlers2, _this$currentHandlers3, _this$currentHandlers4, _this$currentHandlers5, _this$currentHandlers7, _this$currentHandlers8;
|
|
293
298
|
if (!event) {
|
|
294
299
|
return;
|
|
295
300
|
}
|
|
@@ -359,14 +364,15 @@ var EventListener = exports.EventListener = /*#__PURE__*/function () {
|
|
|
359
364
|
this.start1 = this.getTouch(event, 1);
|
|
360
365
|
this.cursor.x = this.start0.x;
|
|
361
366
|
this.cursor.y = this.start0.y;
|
|
367
|
+
this.currentHandlers.start = tmodel;
|
|
362
368
|
this.findEventHandlers(newEvent);
|
|
363
369
|
this.canFindHandlers = false;
|
|
364
|
-
this.swipeStartX = this.start0.x - ((_this$
|
|
365
|
-
this.swipeStartY = this.start0.y - ((_this$
|
|
370
|
+
this.swipeStartX = this.start0.x - ((_this$currentHandlers2 = (_this$currentHandlers3 = this.currentHandlers.swipe) === null || _this$currentHandlers3 === void 0 ? void 0 : _this$currentHandlers3.getX()) !== null && _this$currentHandlers2 !== void 0 ? _this$currentHandlers2 : 0);
|
|
371
|
+
this.swipeStartY = this.start0.y - ((_this$currentHandlers4 = (_this$currentHandlers5 = this.currentHandlers.swipe) === null || _this$currentHandlers5 === void 0 ? void 0 : _this$currentHandlers5.getY()) !== null && _this$currentHandlers4 !== void 0 ? _this$currentHandlers4 : 0);
|
|
366
372
|
event.stopPropagation();
|
|
367
373
|
this.detachDocumentEvents();
|
|
368
374
|
this.attachDocumentEvents();
|
|
369
|
-
|
|
375
|
+
break;
|
|
370
376
|
case 'mousemove':
|
|
371
377
|
case 'touchmove':
|
|
372
378
|
{
|
|
@@ -377,11 +383,11 @@ var EventListener = exports.EventListener = /*#__PURE__*/function () {
|
|
|
377
383
|
event.preventDefault();
|
|
378
384
|
}
|
|
379
385
|
if (this.touchCount > 0) {
|
|
380
|
-
var _this$
|
|
386
|
+
var _this$currentHandlers6;
|
|
381
387
|
this.touchTimeStamp = now + 10;
|
|
382
388
|
this.move(event);
|
|
383
389
|
event.stopPropagation();
|
|
384
|
-
(_this$
|
|
390
|
+
(_this$currentHandlers6 = this.currentHandlers.swipe) === null || _this$currentHandlers6 === void 0 || _this$currentHandlers6.markLayoutDirty('swipe-event');
|
|
385
391
|
} else if (this.isCurrentSource('wheel')) {
|
|
386
392
|
this.clearTouch();
|
|
387
393
|
}
|
|
@@ -397,7 +403,6 @@ var EventListener = exports.EventListener = /*#__PURE__*/function () {
|
|
|
397
403
|
this.cursor.x = touch.x;
|
|
398
404
|
this.cursor.y = touch.y;
|
|
399
405
|
this.end(event);
|
|
400
|
-
(_this$currentHandlers6 = this.currentHandlers.end) === null || _this$currentHandlers6 === void 0 || _this$currentHandlers6.markLayoutDirty('end-event');
|
|
401
406
|
this.clearEnd();
|
|
402
407
|
this.touchCount = 0;
|
|
403
408
|
event.stopPropagation();
|
package/build/LoadingManager.js
CHANGED
|
@@ -29,15 +29,21 @@ var LoadingManager = exports.LoadingManager = /*#__PURE__*/function () {
|
|
|
29
29
|
this.fetchingImageMap = {};
|
|
30
30
|
}
|
|
31
31
|
return _createClass(LoadingManager, [{
|
|
32
|
+
key: "clear",
|
|
33
|
+
value: function clear() {
|
|
34
|
+
this.tmodelKeyMap = {};
|
|
35
|
+
this.fetchingAPIMap = {};
|
|
36
|
+
this.fetchingImageMap = {};
|
|
37
|
+
}
|
|
38
|
+
}, {
|
|
32
39
|
key: "fetchCommon",
|
|
33
40
|
value: function fetchCommon(fetchId, cacheId, tmodel, fetchMap, fetchFn) {
|
|
34
41
|
_TargetUtil.TargetUtil.markTargetAction(tmodel, 'fetchAction');
|
|
35
|
-
if (!
|
|
42
|
+
if (!this.isFetched(cacheId)) {
|
|
36
43
|
if (!fetchMap[fetchId]) {
|
|
37
44
|
fetchMap[fetchId] = {
|
|
38
45
|
fetchId: fetchId,
|
|
39
46
|
cacheId: cacheId,
|
|
40
|
-
fetchingFlag: true,
|
|
41
47
|
startTime: _TUtil.TUtil.now(),
|
|
42
48
|
targets: [{
|
|
43
49
|
tmodel: tmodel,
|
|
@@ -46,17 +52,11 @@ var LoadingManager = exports.LoadingManager = /*#__PURE__*/function () {
|
|
|
46
52
|
fetchMap: fetchMap
|
|
47
53
|
};
|
|
48
54
|
fetchFn();
|
|
49
|
-
} else {
|
|
50
|
-
fetchMap[fetchId].targets.push({
|
|
51
|
-
tmodel: tmodel,
|
|
52
|
-
targetName: tmodel.key
|
|
53
|
-
});
|
|
54
55
|
}
|
|
55
56
|
} else if (!fetchMap[fetchId]) {
|
|
56
57
|
fetchMap[fetchId] = {
|
|
57
58
|
fetchId: fetchId,
|
|
58
59
|
cacheId: cacheId,
|
|
59
|
-
fetchingFlag: true,
|
|
60
60
|
startTime: _TUtil.TUtil.now(),
|
|
61
61
|
targets: [{
|
|
62
62
|
tmodel: tmodel,
|
|
@@ -104,8 +104,10 @@ var LoadingManager = exports.LoadingManager = /*#__PURE__*/function () {
|
|
|
104
104
|
value: function addToTModelKeyMap(tmodel, targetName, fetchId, cacheId) {
|
|
105
105
|
var key = this.getTModelKey(tmodel, targetName);
|
|
106
106
|
var loadTargetName = this.getLoadTargetName(targetName);
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
var loadingComplete = this.isLoadingComplete(tmodel, targetName);
|
|
108
|
+
if (loadingComplete || !this.tmodelKeyMap[key]) {
|
|
109
|
+
var _this$tmodelKeyMap, _this$tmodelKeyMap$ke;
|
|
110
|
+
(_this$tmodelKeyMap$ke = (_this$tmodelKeyMap = this.tmodelKeyMap)[key]) !== null && _this$tmodelKeyMap$ke !== void 0 ? _this$tmodelKeyMap$ke : _this$tmodelKeyMap[key] = {
|
|
109
111
|
fetchMap: {},
|
|
110
112
|
entryCount: 0,
|
|
111
113
|
resultCount: 0,
|
|
@@ -113,7 +115,11 @@ var LoadingManager = exports.LoadingManager = /*#__PURE__*/function () {
|
|
|
113
115
|
activeIndex: 0,
|
|
114
116
|
accessIndex: 0
|
|
115
117
|
};
|
|
116
|
-
|
|
118
|
+
}
|
|
119
|
+
if (loadingComplete || !tmodel.val(loadTargetName)) {
|
|
120
|
+
if (!tmodel.val(loadTargetName)) {
|
|
121
|
+
tmodel.val(loadTargetName, []);
|
|
122
|
+
}
|
|
117
123
|
}
|
|
118
124
|
if (!this.tmodelKeyMap[key].fetchMap[fetchId]) {
|
|
119
125
|
this.tmodelKeyMap[key].fetchMap[fetchId] = {
|
|
@@ -124,6 +130,7 @@ var LoadingManager = exports.LoadingManager = /*#__PURE__*/function () {
|
|
|
124
130
|
tmodel.val(loadTargetName).push(undefined);
|
|
125
131
|
}
|
|
126
132
|
if (cacheId && this.isFetched(cacheId)) {
|
|
133
|
+
this.fetchingAPIMap[fetchId].startTime = _TUtil.TUtil.now();
|
|
127
134
|
this.handleSuccess(this.fetchingAPIMap[fetchId], this.cacheMap[cacheId].result);
|
|
128
135
|
}
|
|
129
136
|
}
|
|
@@ -137,10 +144,7 @@ var LoadingManager = exports.LoadingManager = /*#__PURE__*/function () {
|
|
|
137
144
|
key: "isLoading",
|
|
138
145
|
value: function isLoading(tmodel, targetName) {
|
|
139
146
|
var key = this.getTModelKey(tmodel, targetName);
|
|
140
|
-
|
|
141
|
-
if (tmodelEntry && tmodelEntry.accessIndex < tmodelEntry.resultCount) {
|
|
142
|
-
return true;
|
|
143
|
-
}
|
|
147
|
+
return this.tmodelKeyMap[key];
|
|
144
148
|
}
|
|
145
149
|
}, {
|
|
146
150
|
key: "isLoadingSuccessful",
|
|
@@ -152,7 +156,7 @@ var LoadingManager = exports.LoadingManager = /*#__PURE__*/function () {
|
|
|
152
156
|
key: "isLoadingComplete",
|
|
153
157
|
value: function isLoadingComplete(tmodel, targetName) {
|
|
154
158
|
var key = this.getTModelKey(tmodel, targetName);
|
|
155
|
-
return this.tmodelKeyMap[key] ? this.tmodelKeyMap[key].resultCount === this.tmodelKeyMap[key].entryCount && this.tmodelKeyMap[key].activeIndex === this.tmodelKeyMap[key].entryCount :
|
|
159
|
+
return this.tmodelKeyMap[key] ? this.tmodelKeyMap[key].resultCount === this.tmodelKeyMap[key].entryCount && this.tmodelKeyMap[key].activeIndex === this.tmodelKeyMap[key].entryCount : false;
|
|
156
160
|
}
|
|
157
161
|
}, {
|
|
158
162
|
key: "resetLoadingError",
|
|
@@ -187,18 +191,18 @@ var LoadingManager = exports.LoadingManager = /*#__PURE__*/function () {
|
|
|
187
191
|
}
|
|
188
192
|
}, {
|
|
189
193
|
key: "getLoadingItemValue",
|
|
190
|
-
value: function getLoadingItemValue(tmodel,
|
|
191
|
-
var target = tmodel.targets[
|
|
192
|
-
var key = this.getTModelKey(tmodel,
|
|
194
|
+
value: function getLoadingItemValue(tmodel, prevTargetName, currentTargetName) {
|
|
195
|
+
var target = tmodel.targets[prevTargetName];
|
|
196
|
+
var key = this.getTModelKey(tmodel, prevTargetName);
|
|
193
197
|
var tmodelEntry = this.tmodelKeyMap[key];
|
|
194
198
|
if (!tmodelEntry || !target || tmodelEntry.accessIndex >= tmodelEntry.resultCount) {
|
|
195
199
|
return undefined;
|
|
196
200
|
}
|
|
197
|
-
var loadTargetName = this.getLoadTargetName(
|
|
201
|
+
var loadTargetName = this.getLoadTargetName(prevTargetName);
|
|
198
202
|
var targetValue = tmodel.val(loadTargetName);
|
|
199
203
|
var result;
|
|
200
204
|
if (targetValue) {
|
|
201
|
-
if (
|
|
205
|
+
if (currentTargetName !== null && currentTargetName !== void 0 && currentTargetName.endsWith('$$')) {
|
|
202
206
|
result = targetValue.slice(tmodelEntry.accessIndex, tmodelEntry.resultCount);
|
|
203
207
|
tmodelEntry.accessIndex += result.length;
|
|
204
208
|
} else {
|
|
@@ -208,12 +212,6 @@ var LoadingManager = exports.LoadingManager = /*#__PURE__*/function () {
|
|
|
208
212
|
}
|
|
209
213
|
return result;
|
|
210
214
|
}
|
|
211
|
-
}, {
|
|
212
|
-
key: "isFetching",
|
|
213
|
-
value: function isFetching(fetchId) {
|
|
214
|
-
var _this$fetchingAPIMap$, _this$fetchingAPIMap$2;
|
|
215
|
-
return (_this$fetchingAPIMap$ = (_this$fetchingAPIMap$2 = this.fetchingAPIMap[fetchId]) === null || _this$fetchingAPIMap$2 === void 0 ? void 0 : _this$fetchingAPIMap$2.fetchingFlag) !== null && _this$fetchingAPIMap$ !== void 0 ? _this$fetchingAPIMap$ : false;
|
|
216
|
-
}
|
|
217
215
|
}, {
|
|
218
216
|
key: "isFetched",
|
|
219
217
|
value: function isFetched(cacheId) {
|
|
@@ -260,10 +258,12 @@ var LoadingManager = exports.LoadingManager = /*#__PURE__*/function () {
|
|
|
260
258
|
}));
|
|
261
259
|
var targetResults = tmodel.val(loadTargetName);
|
|
262
260
|
if (targetResults) {
|
|
261
|
+
if (!targetResults[fetchEntry.order]) {
|
|
262
|
+
tmodelEntry.resultCount++;
|
|
263
|
+
}
|
|
263
264
|
targetResults[fetchEntry.order] = res.result;
|
|
264
265
|
}
|
|
265
266
|
tmodel.val(targetName, (targetResults === null || targetResults === void 0 ? void 0 : targetResults.length) === 1 ? targetResults[0] : targetResults);
|
|
266
|
-
tmodelEntry.resultCount++;
|
|
267
267
|
_TargetUtil.TargetUtil.shouldActivateNextTarget(tmodel, targetName);
|
|
268
268
|
});
|
|
269
269
|
delete fetchMap[fetchId];
|
|
@@ -299,9 +299,13 @@ var LoadingManager = exports.LoadingManager = /*#__PURE__*/function () {
|
|
|
299
299
|
error: error
|
|
300
300
|
};
|
|
301
301
|
var targetResults = tmodel.val(loadTargetName);
|
|
302
|
-
targetResults
|
|
302
|
+
if (targetResults) {
|
|
303
|
+
if (!targetResults[fetchEntry.order]) {
|
|
304
|
+
tmodelEntry.resultCount++;
|
|
305
|
+
}
|
|
306
|
+
targetResults[fetchEntry.order] = res;
|
|
307
|
+
}
|
|
303
308
|
tmodel.val(targetName, targetResults.length === 1 ? targetResults[0] : targetResults);
|
|
304
|
-
tmodelEntry.resultCount++;
|
|
305
309
|
tmodelEntry.errorCount++;
|
|
306
310
|
_this4.callOnErrorHandler(tmodel, targetName);
|
|
307
311
|
_TargetUtil.TargetUtil.shouldActivateNextTarget(tmodel, targetName);
|
package/build/LocationManager.js
CHANGED
|
@@ -71,6 +71,8 @@ var LocationManager = exports.LocationManager = /*#__PURE__*/function () {
|
|
|
71
71
|
delete _this.updatedContainerMap[key];
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
|
+
|
|
75
|
+
//console.log(this.locationListStats);
|
|
74
76
|
}
|
|
75
77
|
}, {
|
|
76
78
|
key: "calculate",
|
|
@@ -149,11 +151,11 @@ var LocationManager = exports.LocationManager = /*#__PURE__*/function () {
|
|
|
149
151
|
this.calcNextLocation(child, container, viewport);
|
|
150
152
|
continue;
|
|
151
153
|
}
|
|
154
|
+
viewport.setLocation();
|
|
152
155
|
if (child.isIncluded() && container.manageChildTargetExecution(child, shouldCalculateChildTargets)) {
|
|
153
156
|
this.calculateTargets(child);
|
|
154
157
|
}
|
|
155
|
-
viewport.
|
|
156
|
-
if (container.getContainerOverflowMode() === 'always' || container.getContainerOverflowMode() === 'auto' && child.getItemOverflowMode() === 'auto' && viewport.isOverflow()) {
|
|
158
|
+
if (container.getContainerOverflowMode() === 'always' || child.getItemOverflowMode() === 'always' || container.getContainerOverflowMode() === 'auto' && child.getItemOverflowMode() === 'auto' && viewport.isOverflow()) {
|
|
157
159
|
viewport.overflow();
|
|
158
160
|
viewport.setLocation();
|
|
159
161
|
}
|
|
@@ -255,7 +257,7 @@ var LocationManager = exports.LocationManager = /*#__PURE__*/function () {
|
|
|
255
257
|
value: function calcNextLocation(child, container, viewport) {
|
|
256
258
|
var _child$visibilityStat3, _child$visibilityStat4;
|
|
257
259
|
viewport.setLocation();
|
|
258
|
-
if (container.getContainerOverflowMode() === 'always' || container.getContainerOverflowMode() === 'auto' && child.getItemOverflowMode() === 'auto' && viewport.isOverflow()) {
|
|
260
|
+
if (container.getContainerOverflowMode() === 'always' || child.getItemOverflowMode() === 'always' || container.getContainerOverflowMode() === 'auto' && child.getItemOverflowMode() === 'auto' && viewport.isOverflow()) {
|
|
259
261
|
viewport.overflow();
|
|
260
262
|
viewport.setLocation();
|
|
261
263
|
}
|
|
@@ -284,7 +286,7 @@ var LocationManager = exports.LocationManager = /*#__PURE__*/function () {
|
|
|
284
286
|
child.addToStyleTargetList('x');
|
|
285
287
|
child.addToStyleTargetList('y');
|
|
286
288
|
}
|
|
287
|
-
if (child.styleTargetList.length > 0) {
|
|
289
|
+
if (child.styleTargetList.length > 0 || child.updatingTargetList.length > 0) {
|
|
288
290
|
this.addToLocationList(child);
|
|
289
291
|
}
|
|
290
292
|
var oldVisibilityStatus = (_child$visibilityStat3 = (_child$visibilityStat4 = child.visibilityStatus) === null || _child$visibilityStat4 === void 0 ? void 0 : _child$visibilityStat4.isVisible) !== null && _child$visibilityStat3 !== void 0 ? _child$visibilityStat3 : false;
|
|
@@ -320,10 +322,14 @@ var LocationManager = exports.LocationManager = /*#__PURE__*/function () {
|
|
|
320
322
|
value: function calculateCoreTargets(tmodel) {
|
|
321
323
|
var coreTargets = tmodel.getCoreTargets();
|
|
322
324
|
if (coreTargets) {
|
|
323
|
-
coreTargets.forEach(function (
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
325
|
+
coreTargets.forEach(function (key) {
|
|
326
|
+
var target = tmodel.targets[key];
|
|
327
|
+
if (!target) {
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
if (target.active !== 'active' && tmodel.isTargetEnabled(key) && !tmodel.isTargetUpdating(key) && !tmodel.isTargetImperative(key)) {
|
|
331
|
+
_TargetExecutor.TargetExecutor.resolveTargetValue(tmodel, key, tmodel.getTargetCycle(key));
|
|
332
|
+
_TargetExecutor.TargetExecutor.updateTarget(tmodel, tmodel.targetValues[key], key, false);
|
|
327
333
|
}
|
|
328
334
|
});
|
|
329
335
|
}
|
package/build/RunScheduler.js
CHANGED
|
@@ -192,9 +192,11 @@ var RunScheduler = exports.RunScheduler = /*#__PURE__*/function () {
|
|
|
192
192
|
this.defer("rerun-".concat(this.rerunId));
|
|
193
193
|
} else {
|
|
194
194
|
var newDelay = this.nextRuns.length > 0 ? this.nextRuns[0].delay - (_TUtil.TUtil.now() - this.nextRuns[0].insertTime) : undefined;
|
|
195
|
-
if (newDelay === undefined || (0, _App.getManager)().lists.activeTModels.length > 0 || (0, _App.getManager)().lists.updatingTModels.length > 0) {
|
|
195
|
+
if (newDelay === undefined || (0, _App.getManager)().lists.activeTModels.length > 0 || (0, _App.getManager)().lists.updatingTModels.length > 0 || (0, _App.getLocationManager)().activatedList.length > 0) {
|
|
196
196
|
if ((0, _App.getEvents)().eventQueue.length > 0) {
|
|
197
197
|
this.schedule(15, "events-".concat((0, _App.getEvents)().eventQueue.length));
|
|
198
|
+
} else if ((0, _App.getLocationManager)().activatedList.length > 0) {
|
|
199
|
+
this.schedule(15, "getManager-locationManager-activatedList");
|
|
198
200
|
} else if ((0, _App.getManager)().lists.updatingTModels.length > 0) {
|
|
199
201
|
this.schedule(15, "getManager-needsRerun-updatingTModels");
|
|
200
202
|
} else if ((0, _App.getManager)().lists.activeTModels.length > 0) {
|
package/build/TModel.js
CHANGED
|
@@ -105,8 +105,9 @@ var TModel = exports.TModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
105
105
|
this.deletedChildren.push(child);
|
|
106
106
|
this.removeFromUpdatingChildren(child);
|
|
107
107
|
this.childrenUpdateFlag = true;
|
|
108
|
+
this.getChildren();
|
|
108
109
|
this.markLayoutDirty('removeChild');
|
|
109
|
-
(0, _App.getRunScheduler)().schedule(1, 'removeChild-' +
|
|
110
|
+
(0, _App.getRunScheduler)().schedule(1, 'removeChild-' + child.oid);
|
|
110
111
|
return this;
|
|
111
112
|
}
|
|
112
113
|
}, {
|
|
@@ -632,7 +633,7 @@ var TModel = exports.TModel = /*#__PURE__*/function (_BaseModel) {
|
|
|
632
633
|
key: "getMinWidth",
|
|
633
634
|
value: function getMinWidth() {
|
|
634
635
|
var _this$val3;
|
|
635
|
-
return (_this$val3 = this.val('minWidth')) !== null && _this$val3 !== void 0 ? _this$val3 : this.getWidth();
|
|
636
|
+
return (_this$val3 = this.val('minWidth')) !== null && _this$val3 !== void 0 ? _this$val3 : Math.min(this.getWidth(), this.getBaseWidth());
|
|
636
637
|
}
|
|
637
638
|
}, {
|
|
638
639
|
key: "getTopBaseHeight",
|
package/build/TUtil.js
CHANGED
|
@@ -29,6 +29,10 @@ var TUtil = exports.TUtil = /*#__PURE__*/function () {
|
|
|
29
29
|
return _createClass(TUtil, null, [{
|
|
30
30
|
key: "calcVisibility",
|
|
31
31
|
value: function calcVisibility(child) {
|
|
32
|
+
//this condition is for objects that get overflow while updating their 'x'
|
|
33
|
+
if (child.isVisible() && child.isTargetUpdating('x')) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
32
36
|
var x = child.absX;
|
|
33
37
|
var y = child.absY;
|
|
34
38
|
var domParent = child.getDomParent();
|
package/build/TargetData.js
CHANGED
|
@@ -659,10 +659,10 @@ _defineProperty(TargetData, "targetToEventsMapping", {
|
|
|
659
659
|
});
|
|
660
660
|
_defineProperty(TargetData, "touchEventMap", {
|
|
661
661
|
onStart: function onStart(tmodel) {
|
|
662
|
-
return (0, _App.getEvents)().
|
|
662
|
+
return (0, _App.getEvents)().isStartHandler(tmodel);
|
|
663
663
|
},
|
|
664
664
|
onEnd: function onEnd(tmodel) {
|
|
665
|
-
return (0, _App.getEvents)().
|
|
665
|
+
return (0, _App.getEvents)().isEndHandler(tmodel);
|
|
666
666
|
},
|
|
667
667
|
onAnySwipe: function onAnySwipe() {
|
|
668
668
|
return (0, _App.getEvents)().isSwipeEvent() && _TUtil.TUtil.isDefined((0, _App.getEvents)().swipeStartX);
|
package/build/TargetExecutor.js
CHANGED
|
@@ -166,7 +166,7 @@ var TargetExecutor = exports.TargetExecutor = /*#__PURE__*/function () {
|
|
|
166
166
|
tmodel.targetValues[key] = targetValue;
|
|
167
167
|
var easing = _TUtil.TUtil.isDefined(tmodel.targets[key].easing) ? tmodel.targets[key].easing : undefined;
|
|
168
168
|
if (_TargetUtil.TargetUtil.isChildrenTarget(key, newValue)) {
|
|
169
|
-
var values = Array.isArray(newValue) ? newValue : [newValue];
|
|
169
|
+
var values = Array.isArray(newValue) ? newValue : newValue ? [newValue] : [];
|
|
170
170
|
var tmodelChildren = values.map(function (child) {
|
|
171
171
|
tmodel.addChild(child);
|
|
172
172
|
return tmodel.addedChildren.at(-1).child;
|
package/build/TargetManager.js
CHANGED
|
@@ -53,7 +53,7 @@ var TargetManager = exports.TargetManager = /*#__PURE__*/function () {
|
|
|
53
53
|
tmodel.removeFromActiveTargets(key);
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
|
-
if (tmodel.isExecuted(key) && tmodel.
|
|
56
|
+
if (tmodel.isExecuted(key) && tmodel.hasUpdatingImperativeTargets(key)) {
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
59
|
if (tmodel.isExecuted(key) && tmodel.getTargetStep(key) === tmodel.getTargetSteps(key)) {
|