targetj 1.0.113 → 1.0.115
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/$Dom.js +2 -2
- package/build/EventListener.js +19 -13
- package/build/LocationManager.js +1 -1
- package/build/TModelManager.js +1 -1
- package/build/TargetUtil.js +6 -6
- package/build/Viewport.js +0 -2
- package/package.json +1 -1
package/build/$Dom.js
CHANGED
|
@@ -39,8 +39,8 @@ var $Dom = exports.$Dom = /*#__PURE__*/function () {
|
|
|
39
39
|
}
|
|
40
40
|
}, {
|
|
41
41
|
key: "contains",
|
|
42
|
-
value: function contains(
|
|
43
|
-
return
|
|
42
|
+
value: function contains(element) {
|
|
43
|
+
return element instanceof Node && this.element.contains(element);
|
|
44
44
|
}
|
|
45
45
|
}, {
|
|
46
46
|
key: "create",
|
package/build/EventListener.js
CHANGED
|
@@ -34,15 +34,14 @@ var EventListener = exports.EventListener = /*#__PURE__*/function () {
|
|
|
34
34
|
this.touchTimeStamp = 0;
|
|
35
35
|
this.cursor = {
|
|
36
36
|
x: 0,
|
|
37
|
-
y: 0
|
|
38
|
-
handlerX: 0,
|
|
39
|
-
handlerY: 0
|
|
37
|
+
y: 0
|
|
40
38
|
};
|
|
41
39
|
this.start0 = undefined;
|
|
42
40
|
this.start1 = undefined;
|
|
43
41
|
this.end0 = undefined;
|
|
44
42
|
this.end1 = undefined;
|
|
45
43
|
this.touchCount = 0;
|
|
44
|
+
this.canFindHandlers = true;
|
|
46
45
|
this.currentEventName = "";
|
|
47
46
|
this.currentEventType = "";
|
|
48
47
|
this.currentHandlers = {
|
|
@@ -334,9 +333,12 @@ var EventListener = exports.EventListener = /*#__PURE__*/function () {
|
|
|
334
333
|
return;
|
|
335
334
|
}
|
|
336
335
|
var lastEvent = this.eventQueue.shift();
|
|
337
|
-
if (this.
|
|
336
|
+
if (this.canFindHandlers) {
|
|
338
337
|
this.findEventHandlers(lastEvent);
|
|
339
338
|
}
|
|
339
|
+
if (lastEvent.eventType === 'end') {
|
|
340
|
+
this.canFindHandlers = true;
|
|
341
|
+
}
|
|
340
342
|
this.currentEventName = lastEvent.eventName;
|
|
341
343
|
this.currentEventType = lastEvent.eventType;
|
|
342
344
|
this.currentKey = this.currentTouch.key;
|
|
@@ -398,6 +400,7 @@ var EventListener = exports.EventListener = /*#__PURE__*/function () {
|
|
|
398
400
|
this.clearStart();
|
|
399
401
|
this.clearTouch();
|
|
400
402
|
this.touchCount = this.countTouches(event);
|
|
403
|
+
this.canFindHandlers = false;
|
|
401
404
|
if (this.preventDefault(tmodel, eventName)) {
|
|
402
405
|
event.preventDefault();
|
|
403
406
|
}
|
|
@@ -406,10 +409,6 @@ var EventListener = exports.EventListener = /*#__PURE__*/function () {
|
|
|
406
409
|
this.cursor.x = this.start0.x;
|
|
407
410
|
this.cursor.y = this.start0.y;
|
|
408
411
|
this.findEventHandlers(newEvent);
|
|
409
|
-
if (this.currentHandlers.touch) {
|
|
410
|
-
this.cursor.handlerX = this.start0.x - this.currentHandlers.touch.getX();
|
|
411
|
-
this.cursor.handlerY = this.start0.y - this.currentHandlers.touch.getY();
|
|
412
|
-
}
|
|
413
412
|
event.stopPropagation();
|
|
414
413
|
break;
|
|
415
414
|
case 'mousemove':
|
|
@@ -495,7 +494,6 @@ var EventListener = exports.EventListener = /*#__PURE__*/function () {
|
|
|
495
494
|
this.start1 = undefined;
|
|
496
495
|
this.end0 = undefined;
|
|
497
496
|
this.end1 = undefined;
|
|
498
|
-
this.touchCount = 0;
|
|
499
497
|
}
|
|
500
498
|
}, {
|
|
501
499
|
key: "clearTouch",
|
|
@@ -518,6 +516,8 @@ var EventListener = exports.EventListener = /*#__PURE__*/function () {
|
|
|
518
516
|
this.clearTouch();
|
|
519
517
|
this.eventQueue.length = 0;
|
|
520
518
|
this.touchTimeStamp = 0;
|
|
519
|
+
this.touchCount = 0;
|
|
520
|
+
this.canFindHandlers = true;
|
|
521
521
|
}
|
|
522
522
|
}, {
|
|
523
523
|
key: "deltaX",
|
|
@@ -541,13 +541,13 @@ var EventListener = exports.EventListener = /*#__PURE__*/function () {
|
|
|
541
541
|
}
|
|
542
542
|
}, {
|
|
543
543
|
key: "swipeX",
|
|
544
|
-
value: function swipeX() {
|
|
545
|
-
return this.cursor.x - this.
|
|
544
|
+
value: function swipeX(handler) {
|
|
545
|
+
return this.cursor.x - (this.start0.x - handler.getX());
|
|
546
546
|
}
|
|
547
547
|
}, {
|
|
548
548
|
key: "swipeY",
|
|
549
|
-
value: function swipeY() {
|
|
550
|
-
return this.cursor.y - this.
|
|
549
|
+
value: function swipeY(handler) {
|
|
550
|
+
return this.cursor.y - (this.start0.y - handler.getY());
|
|
551
551
|
}
|
|
552
552
|
}, {
|
|
553
553
|
key: "pinchDelta",
|
|
@@ -725,6 +725,12 @@ var EventListener = exports.EventListener = /*#__PURE__*/function () {
|
|
|
725
725
|
var handler = this.getTouchHandler();
|
|
726
726
|
return target === handler || target.getParent() === handler;
|
|
727
727
|
}
|
|
728
|
+
}, {
|
|
729
|
+
key: "isTouchHandlerOrChild",
|
|
730
|
+
value: function isTouchHandlerOrChild(target) {
|
|
731
|
+
var handler = this.getTouchHandler();
|
|
732
|
+
return target === handler || (handler === null || handler === void 0 ? void 0 : handler.getParent()) === target;
|
|
733
|
+
}
|
|
728
734
|
}, {
|
|
729
735
|
key: "countTouches",
|
|
730
736
|
value: function countTouches(event) {
|
package/build/LocationManager.js
CHANGED
|
@@ -82,11 +82,11 @@ var LocationManager = exports.LocationManager = /*#__PURE__*/function () {
|
|
|
82
82
|
if (container.manageChildTargetExecution(child, shouldCalculateChildTargets)) {
|
|
83
83
|
this.calculateTargets(child);
|
|
84
84
|
}
|
|
85
|
-
viewport.setLocation();
|
|
86
85
|
child.overflowingFlag = false;
|
|
87
86
|
if (container.getContainerOverflowMode() === 'always' || child.getItemOverflowMode() === 'always' || container.getContainerOverflowMode() === 'auto' && child.getItemOverflowMode() === 'auto' && viewport.isOverflow()) {
|
|
88
87
|
child.overflowingFlag = true;
|
|
89
88
|
viewport.overflow();
|
|
89
|
+
viewport.setLocation();
|
|
90
90
|
}
|
|
91
91
|
if (child.isIncluded() && !this.hasLocationMap[child.oid]) {
|
|
92
92
|
this.addToLocationList(child);
|
package/build/TModelManager.js
CHANGED
|
@@ -290,7 +290,7 @@ var TModelManager = exports.TModelManager = /*#__PURE__*/function () {
|
|
|
290
290
|
tmodel.$dom.attr(key, tmodel.val(key));
|
|
291
291
|
} else {
|
|
292
292
|
if (_TUtil.TUtil.isDefined(tmodel.val(key)) && tmodel.styleMap[key] !== tmodel.val(key)) {
|
|
293
|
-
tmodel.$dom.style(key, tmodel.val(key));
|
|
293
|
+
tmodel.$dom.style(key, "".concat(tmodel.val(key)));
|
|
294
294
|
tmodel.styleMap[key] = tmodel.val(key);
|
|
295
295
|
}
|
|
296
296
|
}
|
package/build/TargetUtil.js
CHANGED
|
@@ -312,7 +312,6 @@ _defineProperty(TargetUtil, "styleWithUnitMap", {
|
|
|
312
312
|
padding: true,
|
|
313
313
|
left: true,
|
|
314
314
|
top: true,
|
|
315
|
-
fontWeight: true,
|
|
316
315
|
letterSpacing: true
|
|
317
316
|
});
|
|
318
317
|
_defineProperty(TargetUtil, "colorMap", {
|
|
@@ -343,7 +342,8 @@ _defineProperty(TargetUtil, "styleTargetMap", _objectSpread(_objectSpread(_objec
|
|
|
343
342
|
fontFamily: true,
|
|
344
343
|
overflow: true,
|
|
345
344
|
textDecoration: true,
|
|
346
|
-
boxShadow: true
|
|
345
|
+
boxShadow: true,
|
|
346
|
+
fontWeight: true
|
|
347
347
|
}));
|
|
348
348
|
_defineProperty(TargetUtil, "scaleMap", {
|
|
349
349
|
scale: true,
|
|
@@ -428,16 +428,16 @@ _defineProperty(TargetUtil, "targetConditionMap", {
|
|
|
428
428
|
return (0, _App.getEvents)().getEventType() === 'click' && (0, _App.getEvents)().isClickHandler(tmodel);
|
|
429
429
|
},
|
|
430
430
|
onTouchStart: function onTouchStart(tmodel) {
|
|
431
|
-
return (0, _App.getEvents)().isStartEvent() && (0, _App.getEvents)().
|
|
431
|
+
return (0, _App.getEvents)().isStartEvent() && (0, _App.getEvents)().isTouchHandlerOrChild(tmodel);
|
|
432
432
|
},
|
|
433
|
-
onTouchEnd: function onTouchEnd() {
|
|
434
|
-
return (0, _App.getEvents)().isEndEvent();
|
|
433
|
+
onTouchEnd: function onTouchEnd(tmodel) {
|
|
434
|
+
return (0, _App.getEvents)().isEndEvent() && (0, _App.getEvents)().isTouchHandlerOrChild(tmodel);
|
|
435
435
|
},
|
|
436
436
|
onKeyEvent: function onKeyEvent() {
|
|
437
437
|
return (0, _App.getEvents)().getEventType() === 'key' && (0, _App.getEvents)().currentKey;
|
|
438
438
|
},
|
|
439
439
|
onSwipeEvent: function onSwipeEvent(tmodel) {
|
|
440
|
-
return (0, _App.getEvents)().
|
|
440
|
+
return (0, _App.getEvents)().isTouchHandlerOrChild(tmodel) && (0, _App.getEvents)().isSwipeEvent();
|
|
441
441
|
},
|
|
442
442
|
onAnySwipeEvent: function onAnySwipeEvent() {
|
|
443
443
|
return (0, _App.getEvents)().isSwipeEvent();
|
package/build/Viewport.js
CHANGED
|
@@ -53,8 +53,6 @@ var Viewport = exports.Viewport = /*#__PURE__*/function () {
|
|
|
53
53
|
value: function overflow() {
|
|
54
54
|
this.xNext = this.scrollLeft - this.absX + this.xOverflowReset;
|
|
55
55
|
this.yNext = this.ySouth;
|
|
56
|
-
this.currentChild.x = this.xNext + this.currentChild.getLeftMargin();
|
|
57
|
-
this.currentChild.y = this.yNext + this.currentChild.getTopMargin();
|
|
58
56
|
}
|
|
59
57
|
}, {
|
|
60
58
|
key: "appendNewLine",
|