@wcardinal/wcardinal-ui 0.427.0 → 0.428.0
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/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-base.d.ts +4 -0
- package/dist/types/wcardinal/ui/d-chart-plot-area.d.ts +3 -0
- package/dist/types/wcardinal/ui/d-chart-selection-container-impl.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-container.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-gridline-x.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-chart-selection-gridline-y.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-chart-selection-marker.d.ts +3 -2
- package/dist/types/wcardinal/ui/d-chart-selection-shape-base.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-shape.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-selection-simple.d.ts +10 -2
- package/dist/types/wcardinal/ui/d-view-gesture-impl.d.ts +3 -2
- package/dist/types/wcardinal/ui/d-view-to-target.d.ts +5 -1
- package/dist/types/wcardinal/ui/d-view.d.ts +11 -2
- package/dist/types/wcardinal/ui/util/index.d.ts +2 -0
- package/dist/types/wcardinal/ui/util/util-gesture-data.d.ts +1 -0
- package/dist/types/wcardinal/ui/util/util-gesture-tap.d.ts +26 -0
- package/dist/types/wcardinal/ui/util/util-gesture-target.d.ts +5 -0
- package/dist/types/wcardinal/ui/util/util-gesture.d.ts +8 -6
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js +14 -0
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-plot-area.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-container-impl.js +3 -3
- package/dist/wcardinal/ui/d-chart-selection-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-container.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-gridline-x.js +1 -1
- package/dist/wcardinal/ui/d-chart-selection-gridline-x.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-gridline-y.js +1 -1
- package/dist/wcardinal/ui/d-chart-selection-gridline-y.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-marker.js +4 -3
- package/dist/wcardinal/ui/d-chart-selection-marker.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-shape-base.js +1 -1
- package/dist/wcardinal/ui/d-chart-selection-shape-base.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-shape.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-simple.js +49 -21
- package/dist/wcardinal/ui/d-chart-selection-simple.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-selection-sub-impl.js +3 -2
- package/dist/wcardinal/ui/d-chart-selection-sub-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram.js +11 -2
- package/dist/wcardinal/ui/d-diagram.js.map +1 -1
- package/dist/wcardinal/ui/d-view-gesture-impl.js +18 -3
- package/dist/wcardinal/ui/d-view-gesture-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-view-to-target.js.map +1 -1
- package/dist/wcardinal/ui/d-view.js.map +1 -1
- package/dist/wcardinal/ui/util/index.js +2 -0
- package/dist/wcardinal/ui/util/index.js.map +1 -1
- package/dist/wcardinal/ui/util/util-gesture-data.js +1 -0
- package/dist/wcardinal/ui/util/util-gesture-data.js.map +1 -1
- package/dist/wcardinal/ui/util/util-gesture-tap.js +148 -0
- package/dist/wcardinal/ui/util/util-gesture-tap.js.map +1 -0
- package/dist/wcardinal/ui/util/util-gesture-target.js +2 -0
- package/dist/wcardinal/ui/util/util-gesture-target.js.map +1 -0
- package/dist/wcardinal/ui/util/util-gesture.js +26 -15
- package/dist/wcardinal/ui/util/util-gesture.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.js +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.min.js +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.js +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +1 -1
- package/dist/wcardinal-ui-theme-dark.js +1 -1
- package/dist/wcardinal-ui-theme-dark.min.js +1 -1
- package/dist/wcardinal-ui-theme-white-en-us.js +1 -1
- package/dist/wcardinal-ui-theme-white-en-us.min.js +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.js +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js +1 -1
- package/dist/wcardinal-ui-theme-white.js +1 -1
- package/dist/wcardinal-ui-theme-white.min.js +1 -1
- package/dist/wcardinal-ui.cjs.js +274 -53
- package/dist/wcardinal-ui.js +274 -53
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
package/dist/wcardinal-ui.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.428.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -15463,6 +15463,7 @@ var UtilGestureData = /** @class */ (function () {
|
|
|
15463
15463
|
this.center = new pixi_js.Point();
|
|
15464
15464
|
this.scale = 0;
|
|
15465
15465
|
this.time = 0;
|
|
15466
|
+
this.distance = 0;
|
|
15466
15467
|
}
|
|
15467
15468
|
UtilGestureData.prototype.start = function (e) {
|
|
15468
15469
|
var oe = e.data.originalEvent;
|
|
@@ -15971,6 +15972,150 @@ var UtilGestureEasing = /** @class */ (function () {
|
|
|
15971
15972
|
return UtilGestureEasing;
|
|
15972
15973
|
}());
|
|
15973
15974
|
|
|
15975
|
+
/*
|
|
15976
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
15977
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
15978
|
+
*/
|
|
15979
|
+
var UtilGestureTap = /** @class */ (function () {
|
|
15980
|
+
function UtilGestureTap(on, options) {
|
|
15981
|
+
var _a;
|
|
15982
|
+
this._onTap = on === null || on === void 0 ? void 0 : on.tap;
|
|
15983
|
+
this._threshold = (_a = options === null || options === void 0 ? void 0 : options.threshold) !== null && _a !== void 0 ? _a : 10;
|
|
15984
|
+
this._unused = [];
|
|
15985
|
+
this._used = new Map();
|
|
15986
|
+
}
|
|
15987
|
+
UtilGestureTap.prototype.newData = function (target) {
|
|
15988
|
+
var used = this._used;
|
|
15989
|
+
var result = used.get(target);
|
|
15990
|
+
if (result != null) {
|
|
15991
|
+
return result;
|
|
15992
|
+
}
|
|
15993
|
+
var poped = this._unused.pop();
|
|
15994
|
+
if (poped != null) {
|
|
15995
|
+
used.set(target, poped);
|
|
15996
|
+
return poped;
|
|
15997
|
+
}
|
|
15998
|
+
var created = new UtilGestureData();
|
|
15999
|
+
created.easing = undefined;
|
|
16000
|
+
created.onMove = this.newOnMove(created);
|
|
16001
|
+
created.onEnd = this.newOnEnd(created);
|
|
16002
|
+
used.set(target, created);
|
|
16003
|
+
return created;
|
|
16004
|
+
};
|
|
16005
|
+
UtilGestureTap.prototype.deleteData = function (data) {
|
|
16006
|
+
var target = data.target;
|
|
16007
|
+
if (target) {
|
|
16008
|
+
if (this._used.delete(target)) {
|
|
16009
|
+
data.target = undefined;
|
|
16010
|
+
data.pointers.clear();
|
|
16011
|
+
this._unused.push(data);
|
|
16012
|
+
}
|
|
16013
|
+
}
|
|
16014
|
+
};
|
|
16015
|
+
UtilGestureTap.prototype.newOnMove = function (data) {
|
|
16016
|
+
var _this = this;
|
|
16017
|
+
return function (e) {
|
|
16018
|
+
_this.onMove(e, data);
|
|
16019
|
+
};
|
|
16020
|
+
};
|
|
16021
|
+
UtilGestureTap.prototype.newOnEnd = function (data) {
|
|
16022
|
+
var _this = this;
|
|
16023
|
+
return function (e) {
|
|
16024
|
+
_this.onEnd(e, data);
|
|
16025
|
+
};
|
|
16026
|
+
};
|
|
16027
|
+
UtilGestureTap.prototype.onDown = function (target, e) {
|
|
16028
|
+
var _a;
|
|
16029
|
+
if (this._onTap == null) {
|
|
16030
|
+
return;
|
|
16031
|
+
}
|
|
16032
|
+
var layer = DApplications.getLayer(target);
|
|
16033
|
+
if (layer == null) {
|
|
16034
|
+
return;
|
|
16035
|
+
}
|
|
16036
|
+
e.stopPropagation();
|
|
16037
|
+
if (target.state.isGesturing) {
|
|
16038
|
+
(_a = this._used.get(target)) === null || _a === void 0 ? void 0 : _a.start(e);
|
|
16039
|
+
}
|
|
16040
|
+
else {
|
|
16041
|
+
var data = this.newData(target);
|
|
16042
|
+
data.target = target;
|
|
16043
|
+
data.distance = 0;
|
|
16044
|
+
target.state.isGesturing = true;
|
|
16045
|
+
// Interaction manager
|
|
16046
|
+
var interactionManager = layer.renderer.plugins.interaction;
|
|
16047
|
+
data.interactionManager = interactionManager;
|
|
16048
|
+
// Update the center
|
|
16049
|
+
data.start(e);
|
|
16050
|
+
// Event handler
|
|
16051
|
+
data.bind(e);
|
|
16052
|
+
}
|
|
16053
|
+
};
|
|
16054
|
+
UtilGestureTap.prototype.onMove = function (e, data) {
|
|
16055
|
+
var target = data.target;
|
|
16056
|
+
if (target == null || !target.state.isGesturing) {
|
|
16057
|
+
return;
|
|
16058
|
+
}
|
|
16059
|
+
if (!data.isUpdatable(e)) {
|
|
16060
|
+
return;
|
|
16061
|
+
}
|
|
16062
|
+
// Update the center
|
|
16063
|
+
var center = data.center;
|
|
16064
|
+
var oldCenterX = center.x;
|
|
16065
|
+
var oldCenterY = center.y;
|
|
16066
|
+
data.update(e);
|
|
16067
|
+
var newCenterX = center.x;
|
|
16068
|
+
var newCenterY = center.y;
|
|
16069
|
+
// Calculate the position
|
|
16070
|
+
var dx = newCenterX - oldCenterX;
|
|
16071
|
+
var dy = newCenterY - oldCenterY;
|
|
16072
|
+
// Distance
|
|
16073
|
+
data.distance += Math.abs(dx) + Math.abs(dy);
|
|
16074
|
+
};
|
|
16075
|
+
UtilGestureTap.prototype.onEnd = function (e, data) {
|
|
16076
|
+
var target = data.target;
|
|
16077
|
+
if (target == null || !target.state.isGesturing) {
|
|
16078
|
+
return;
|
|
16079
|
+
}
|
|
16080
|
+
if (!data.end(e)) {
|
|
16081
|
+
return;
|
|
16082
|
+
}
|
|
16083
|
+
// State
|
|
16084
|
+
target.state.isGesturing = false;
|
|
16085
|
+
// Remove event handlers
|
|
16086
|
+
var interactionManager = data.interactionManager;
|
|
16087
|
+
data.interactionManager = undefined;
|
|
16088
|
+
if (interactionManager) {
|
|
16089
|
+
var onMoveBound = data.onMove;
|
|
16090
|
+
if (onMoveBound) {
|
|
16091
|
+
interactionManager.off(UtilPointerEvent.move, onMoveBound);
|
|
16092
|
+
}
|
|
16093
|
+
var onEndBound = data.onEnd;
|
|
16094
|
+
if (onEndBound) {
|
|
16095
|
+
interactionManager.off(UtilPointerEvent.up, onEndBound);
|
|
16096
|
+
interactionManager.off(UtilPointerEvent.cancel, onEndBound);
|
|
16097
|
+
}
|
|
16098
|
+
}
|
|
16099
|
+
// Tap
|
|
16100
|
+
this.end(target, data, e);
|
|
16101
|
+
// Delete this data
|
|
16102
|
+
this.deleteData(data);
|
|
16103
|
+
};
|
|
16104
|
+
UtilGestureTap.prototype.end = function (target, data, e) {
|
|
16105
|
+
var onTap = this._onTap;
|
|
16106
|
+
if (onTap && data.distance < this._threshold) {
|
|
16107
|
+
onTap(target, e);
|
|
16108
|
+
}
|
|
16109
|
+
};
|
|
16110
|
+
UtilGestureTap.prototype.stop = function (target) {
|
|
16111
|
+
var data = this._used.get(target);
|
|
16112
|
+
if (data != null) {
|
|
16113
|
+
this.deleteData(data);
|
|
16114
|
+
}
|
|
16115
|
+
};
|
|
16116
|
+
return UtilGestureTap;
|
|
16117
|
+
}());
|
|
16118
|
+
|
|
15974
16119
|
/*
|
|
15975
16120
|
* Copyright (C) 2019 Toshiba Corporation
|
|
15976
16121
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -15999,6 +16144,7 @@ var UtilGesture = /** @class */ (function () {
|
|
|
15999
16144
|
this._touch = !!options.touch;
|
|
16000
16145
|
this._unused = [];
|
|
16001
16146
|
this._used = new Map();
|
|
16147
|
+
this._tap = new UtilGestureTap(options.on, options.tap);
|
|
16002
16148
|
var bind = options.bind;
|
|
16003
16149
|
if (bind != null) {
|
|
16004
16150
|
this.bind(bind);
|
|
@@ -16071,10 +16217,10 @@ var UtilGesture = /** @class */ (function () {
|
|
|
16071
16217
|
UtilGesture.prototype.onDown = function (target, e) {
|
|
16072
16218
|
var _a;
|
|
16073
16219
|
if (this._touch && !this.isTouch(e)) {
|
|
16074
|
-
return;
|
|
16220
|
+
return this._tap.onDown(target, e);
|
|
16075
16221
|
}
|
|
16076
16222
|
if (!this._checkerStart(e, this._modifier, target)) {
|
|
16077
|
-
return;
|
|
16223
|
+
return this._tap.onDown(target, e);
|
|
16078
16224
|
}
|
|
16079
16225
|
var layer = DApplications.getLayer(target);
|
|
16080
16226
|
if (layer == null) {
|
|
@@ -16092,6 +16238,7 @@ var UtilGesture = /** @class */ (function () {
|
|
|
16092
16238
|
}
|
|
16093
16239
|
var data = this.newData(target);
|
|
16094
16240
|
data.target = target;
|
|
16241
|
+
data.distance = 0;
|
|
16095
16242
|
target.state.isGesturing = true;
|
|
16096
16243
|
// Interaction manager
|
|
16097
16244
|
var interactionManager = layer.renderer.plugins.interaction;
|
|
@@ -16144,6 +16291,8 @@ var UtilGesture = /** @class */ (function () {
|
|
|
16144
16291
|
var dt = newTime - oldTime;
|
|
16145
16292
|
var epsilon = 0.00001;
|
|
16146
16293
|
var ds = epsilon < oldScale && epsilon < newScale ? newScale / oldScale : 1;
|
|
16294
|
+
// Distance
|
|
16295
|
+
data.distance += Math.abs(dx) + Math.abs(dy);
|
|
16147
16296
|
// Easing
|
|
16148
16297
|
var easing = data.easing;
|
|
16149
16298
|
if (easing) {
|
|
@@ -16187,6 +16336,8 @@ var UtilGesture = /** @class */ (function () {
|
|
|
16187
16336
|
if (onEnd != null) {
|
|
16188
16337
|
onEnd(target);
|
|
16189
16338
|
}
|
|
16339
|
+
// Tap
|
|
16340
|
+
this._tap.end(target, data, e);
|
|
16190
16341
|
// Start the Easing
|
|
16191
16342
|
var onEasingStart = this._onEasingStart;
|
|
16192
16343
|
if (onEasingStart) {
|
|
@@ -16220,27 +16371,31 @@ var UtilGesture = /** @class */ (function () {
|
|
|
16220
16371
|
var x = center.x + dx;
|
|
16221
16372
|
var y = center.y + dy;
|
|
16222
16373
|
center.set(x, y);
|
|
16223
|
-
onMove(
|
|
16374
|
+
onMove(target, dx, dy, x, y, ds);
|
|
16224
16375
|
};
|
|
16225
16376
|
UtilGesture.prototype.onEasingEnd = function (data) {
|
|
16226
16377
|
var target = data.target;
|
|
16227
16378
|
this.deleteData(data);
|
|
16228
|
-
|
|
16229
|
-
|
|
16230
|
-
onEasingEnd
|
|
16379
|
+
if (target != null) {
|
|
16380
|
+
var onEasingEnd = this._onEasingEnd;
|
|
16381
|
+
if (onEasingEnd) {
|
|
16382
|
+
onEasingEnd(target);
|
|
16383
|
+
}
|
|
16231
16384
|
}
|
|
16232
16385
|
};
|
|
16233
16386
|
UtilGesture.prototype.stop = function (target) {
|
|
16234
|
-
|
|
16387
|
+
this._tap.stop(target);
|
|
16235
16388
|
var data = this._used.get(target);
|
|
16236
|
-
if (data
|
|
16237
|
-
|
|
16238
|
-
|
|
16239
|
-
|
|
16240
|
-
|
|
16241
|
-
|
|
16242
|
-
|
|
16243
|
-
onStop
|
|
16389
|
+
if (data != null) {
|
|
16390
|
+
var easing = data.easing;
|
|
16391
|
+
if (easing != null) {
|
|
16392
|
+
easing.stop();
|
|
16393
|
+
}
|
|
16394
|
+
this.deleteData(data);
|
|
16395
|
+
var onStop = this._onStop;
|
|
16396
|
+
if (onStop) {
|
|
16397
|
+
onStop(target);
|
|
16398
|
+
}
|
|
16244
16399
|
}
|
|
16245
16400
|
};
|
|
16246
16401
|
return UtilGesture;
|
|
@@ -16260,6 +16415,7 @@ var DViewGestureImpl = /** @class */ (function () {
|
|
|
16260
16415
|
var mode = toEnum((_a = options === null || options === void 0 ? void 0 : options.mode) !== null && _a !== void 0 ? _a : theme.getGestureMode(), UtilGestureMode);
|
|
16261
16416
|
var modifier = toEnum((_b = options === null || options === void 0 ? void 0 : options.modifier) !== null && _b !== void 0 ? _b : theme.getGestureModifier(), UtilGestureModifier);
|
|
16262
16417
|
if (mode === UtilGestureMode.ON || mode === UtilGestureMode.TOUCH) {
|
|
16418
|
+
var work_1 = new pixi_js.Point();
|
|
16263
16419
|
this._gestureUtil = new UtilGesture({
|
|
16264
16420
|
touch: mode === UtilGestureMode.TOUCH,
|
|
16265
16421
|
modifier: modifier,
|
|
@@ -16272,7 +16428,7 @@ var DViewGestureImpl = /** @class */ (function () {
|
|
|
16272
16428
|
_this.onStart(target);
|
|
16273
16429
|
},
|
|
16274
16430
|
move: function (target, dx, dy, x, y, ds) {
|
|
16275
|
-
_this.onGestureMove(toTarget(owner), dx, dy, x, y, ds);
|
|
16431
|
+
_this.onGestureMove(toTarget(owner), dx, dy, x, y, ds, work_1);
|
|
16276
16432
|
},
|
|
16277
16433
|
easing: {
|
|
16278
16434
|
end: function (target) {
|
|
@@ -16281,6 +16437,9 @@ var DViewGestureImpl = /** @class */ (function () {
|
|
|
16281
16437
|
},
|
|
16282
16438
|
stop: function (target) {
|
|
16283
16439
|
_this.onStop(target);
|
|
16440
|
+
},
|
|
16441
|
+
tap: function (target, e) {
|
|
16442
|
+
_this.onTap(target, e);
|
|
16284
16443
|
}
|
|
16285
16444
|
}
|
|
16286
16445
|
});
|
|
@@ -16299,8 +16458,12 @@ var DViewGestureImpl = /** @class */ (function () {
|
|
|
16299
16458
|
var parent = this._parent;
|
|
16300
16459
|
parent.emit("gesturestop", target, parent);
|
|
16301
16460
|
};
|
|
16302
|
-
DViewGestureImpl.prototype.
|
|
16303
|
-
|
|
16461
|
+
DViewGestureImpl.prototype.onTap = function (target, e) {
|
|
16462
|
+
var parent = this._parent;
|
|
16463
|
+
parent.emit("gesturetap", target, e, parent);
|
|
16464
|
+
};
|
|
16465
|
+
DViewGestureImpl.prototype.onGestureMove = function (target, dx, dy, x, y, ds, work) {
|
|
16466
|
+
if (target != null) {
|
|
16304
16467
|
// Scale
|
|
16305
16468
|
var parent_1 = this._parent;
|
|
16306
16469
|
var oldScale = target.scale;
|
|
@@ -16314,6 +16477,12 @@ var DViewGestureImpl = /** @class */ (function () {
|
|
|
16314
16477
|
newScaleX = scaleRatio * oldScaleX;
|
|
16315
16478
|
newScaleY = scaleRatio * oldScaleY;
|
|
16316
16479
|
// Position
|
|
16480
|
+
var targetParent = target.parent;
|
|
16481
|
+
if (targetParent != null) {
|
|
16482
|
+
targetParent.toLocal(work.set(x, y), undefined, work);
|
|
16483
|
+
x = work.x;
|
|
16484
|
+
y = work.y;
|
|
16485
|
+
}
|
|
16317
16486
|
var cx = x - dx;
|
|
16318
16487
|
var cy = y - dy;
|
|
16319
16488
|
var position = target.position;
|
|
@@ -82952,6 +83121,20 @@ var DChartPlotAreaTwofoldSubBase = /** @class */ (function () {
|
|
|
82952
83121
|
enumerable: false,
|
|
82953
83122
|
configurable: true
|
|
82954
83123
|
});
|
|
83124
|
+
Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "state", {
|
|
83125
|
+
get: function () {
|
|
83126
|
+
return this._plotArea.state;
|
|
83127
|
+
},
|
|
83128
|
+
enumerable: false,
|
|
83129
|
+
configurable: true
|
|
83130
|
+
});
|
|
83131
|
+
Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "view", {
|
|
83132
|
+
get: function () {
|
|
83133
|
+
return this._plotArea.view;
|
|
83134
|
+
},
|
|
83135
|
+
enumerable: false,
|
|
83136
|
+
configurable: true
|
|
83137
|
+
});
|
|
82955
83138
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
82956
83139
|
DChartPlotAreaTwofoldSubBase.prototype.on = function (name, callback, context) {
|
|
82957
83140
|
this._plotArea.on(name, callback, context);
|
|
@@ -83459,9 +83642,9 @@ var DChartSelectionContainerImpl = /** @class */ (function () {
|
|
|
83459
83642
|
this._x.unset();
|
|
83460
83643
|
this._y.unset();
|
|
83461
83644
|
};
|
|
83462
|
-
DChartSelectionContainerImpl.prototype.update = function (container, position, mappedPosition) {
|
|
83463
|
-
var isXUpdated = this._x.update(container, position, mappedPosition);
|
|
83464
|
-
var isYUpdated = this._y.update(container, position, mappedPosition);
|
|
83645
|
+
DChartSelectionContainerImpl.prototype.update = function (container, position, mappedPosition, series) {
|
|
83646
|
+
var isXUpdated = this._x.update(container, position, mappedPosition, series);
|
|
83647
|
+
var isYUpdated = this._y.update(container, position, mappedPosition, series);
|
|
83465
83648
|
return isXUpdated || isYUpdated;
|
|
83466
83649
|
};
|
|
83467
83650
|
return DChartSelectionContainerImpl;
|
|
@@ -83520,7 +83703,7 @@ var DChartSelectionShapeBase = /** @class */ (function () {
|
|
|
83520
83703
|
return theme.newShape(state);
|
|
83521
83704
|
};
|
|
83522
83705
|
DChartSelectionShapeBase.prototype.set = function (container, position, mappedPosition, series) {
|
|
83523
|
-
this.update(container, position, mappedPosition);
|
|
83706
|
+
this.update(container, position, mappedPosition, series);
|
|
83524
83707
|
var shape = this._shape;
|
|
83525
83708
|
if (shape) {
|
|
83526
83709
|
this._style(shape, series);
|
|
@@ -83562,7 +83745,7 @@ var DChartSelectionGridlineX = /** @class */ (function (_super) {
|
|
|
83562
83745
|
function DChartSelectionGridlineX() {
|
|
83563
83746
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
83564
83747
|
}
|
|
83565
|
-
DChartSelectionGridlineX.prototype.update = function (container, position, mappedPosition) {
|
|
83748
|
+
DChartSelectionGridlineX.prototype.update = function (container, position, mappedPosition, series) {
|
|
83566
83749
|
var shape = this._shape;
|
|
83567
83750
|
if (shape) {
|
|
83568
83751
|
var mappedX = mappedPosition.x;
|
|
@@ -83589,7 +83772,7 @@ var DChartSelectionGridlineY = /** @class */ (function (_super) {
|
|
|
83589
83772
|
function DChartSelectionGridlineY() {
|
|
83590
83773
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
83591
83774
|
}
|
|
83592
|
-
DChartSelectionGridlineY.prototype.update = function (container, position, mappedPosition) {
|
|
83775
|
+
DChartSelectionGridlineY.prototype.update = function (container, position, mappedPosition, series) {
|
|
83593
83776
|
var shape = this._shape;
|
|
83594
83777
|
if (shape) {
|
|
83595
83778
|
var mappedY = mappedPosition.y;
|
|
@@ -83616,16 +83799,17 @@ var DChartSelectionMarker = /** @class */ (function (_super) {
|
|
|
83616
83799
|
function DChartSelectionMarker() {
|
|
83617
83800
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
83618
83801
|
}
|
|
83619
|
-
DChartSelectionMarker.prototype.update = function (container, position, mappedPosition) {
|
|
83802
|
+
DChartSelectionMarker.prototype.update = function (container, position, mappedPosition, series) {
|
|
83620
83803
|
var shape = this._shape;
|
|
83621
83804
|
if (shape) {
|
|
83622
83805
|
shape.transform.position.copyFrom(mappedPosition);
|
|
83623
|
-
shape.visible = this.isVisible(container, position, mappedPosition);
|
|
83806
|
+
shape.visible = this.isVisible(container, position, mappedPosition, series);
|
|
83624
83807
|
return true;
|
|
83625
83808
|
}
|
|
83626
83809
|
return false;
|
|
83627
83810
|
};
|
|
83628
|
-
DChartSelectionMarker.prototype.isVisible = function (container, position, mappedPosition) {
|
|
83811
|
+
DChartSelectionMarker.prototype.isVisible = function (container, position, mappedPosition, series) {
|
|
83812
|
+
container = (series === null || series === void 0 ? void 0 : series.container) || container;
|
|
83629
83813
|
var x = mappedPosition.x;
|
|
83630
83814
|
var y = mappedPosition.y;
|
|
83631
83815
|
var bounds = container.plotArea.getPixelBounds();
|
|
@@ -83800,8 +83984,9 @@ var DChartSelectionSubImpl = /** @class */ (function (_super) {
|
|
|
83800
83984
|
var work = this._work;
|
|
83801
83985
|
work.set(coordinateX.transform.map(coordinateX.map(position.x)), coordinateY.transform.map(coordinateY.map(position.y)));
|
|
83802
83986
|
container.plotArea.container.localTransform.apply(work, work);
|
|
83803
|
-
var
|
|
83804
|
-
var
|
|
83987
|
+
var series = this._series;
|
|
83988
|
+
var isGridlineUpdated = this._gridline.update(container, position, work, series);
|
|
83989
|
+
var isMarkerUpdated = this._marker.update(container, position, work, series);
|
|
83805
83990
|
return isGridlineUpdated || isMarkerUpdated;
|
|
83806
83991
|
}
|
|
83807
83992
|
return false;
|
|
@@ -83822,6 +84007,7 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
|
|
|
83822
84007
|
var point = toEnum((_a = options === null || options === void 0 ? void 0 : options.point) !== null && _a !== void 0 ? _a : DChartSelectionPoint.CLOSER, DChartSelectionPoint);
|
|
83823
84008
|
_this._selected = _this.newSelected(point, options === null || options === void 0 ? void 0 : options.selected);
|
|
83824
84009
|
_this._hovered = _this.newHovered(point, options === null || options === void 0 ? void 0 : options.hovered);
|
|
84010
|
+
_this._dismiss = _this.toDismiss(options);
|
|
83825
84011
|
// Events
|
|
83826
84012
|
var on = options === null || options === void 0 ? void 0 : options.on;
|
|
83827
84013
|
if (on != null) {
|
|
@@ -83832,15 +84018,27 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
|
|
|
83832
84018
|
}
|
|
83833
84019
|
}
|
|
83834
84020
|
}
|
|
83835
|
-
//
|
|
83836
84021
|
_this._onMoveBound = function (e) {
|
|
83837
84022
|
_this.onMove(e);
|
|
83838
84023
|
};
|
|
83839
|
-
_this.
|
|
83840
|
-
_this.
|
|
84024
|
+
_this._onTapBound = function (target, e) {
|
|
84025
|
+
_this.onTap(e);
|
|
83841
84026
|
};
|
|
83842
84027
|
return _this;
|
|
83843
84028
|
}
|
|
84029
|
+
DChartSelectionSimple.prototype.toDismiss = function (options) {
|
|
84030
|
+
var _a;
|
|
84031
|
+
if (options != null) {
|
|
84032
|
+
var dismiss = options.dismiss;
|
|
84033
|
+
if (dismiss != null) {
|
|
84034
|
+
if (dismiss.enable === false) {
|
|
84035
|
+
return undefined;
|
|
84036
|
+
}
|
|
84037
|
+
return toEnum((_a = dismiss.modifier) !== null && _a !== void 0 ? _a : UtilGestureModifier.NOT_NONE, UtilGestureModifier);
|
|
84038
|
+
}
|
|
84039
|
+
}
|
|
84040
|
+
return UtilGestureModifier.NOT_NONE;
|
|
84041
|
+
};
|
|
83844
84042
|
DChartSelectionSimple.prototype.newSelected = function (point, options) {
|
|
83845
84043
|
return new DChartSelectionSubImpl(this.toSelectedOptions(point, options));
|
|
83846
84044
|
};
|
|
@@ -83886,14 +84084,21 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
|
|
|
83886
84084
|
}
|
|
83887
84085
|
return options;
|
|
83888
84086
|
};
|
|
83889
|
-
DChartSelectionSimple.prototype.
|
|
84087
|
+
DChartSelectionSimple.prototype.onTap = function (e) {
|
|
83890
84088
|
var container = this._container;
|
|
83891
|
-
if (container
|
|
84089
|
+
if (container == null) {
|
|
84090
|
+
return;
|
|
84091
|
+
}
|
|
84092
|
+
var dismiss = this._dismiss;
|
|
84093
|
+
var selected = this._selected;
|
|
84094
|
+
if (dismiss != null && UtilGestureModifiers.match(e, dismiss)) {
|
|
84095
|
+
selected.unset();
|
|
84096
|
+
}
|
|
84097
|
+
else {
|
|
83892
84098
|
var result = DChartSelectionSimple.WORK_SELECT;
|
|
83893
84099
|
var global_1 = e.data.global;
|
|
83894
84100
|
var series = container.calcHitPoint(global_1.x, global_1.y, result);
|
|
83895
|
-
|
|
83896
|
-
if (series) {
|
|
84101
|
+
if (series != null) {
|
|
83897
84102
|
selected.set(series, result);
|
|
83898
84103
|
}
|
|
83899
84104
|
else {
|
|
@@ -83903,23 +84108,28 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
|
|
|
83903
84108
|
};
|
|
83904
84109
|
DChartSelectionSimple.prototype.onMove = function (e) {
|
|
83905
84110
|
var container = this._container;
|
|
83906
|
-
if (container) {
|
|
83907
|
-
|
|
83908
|
-
|
|
83909
|
-
|
|
83910
|
-
|
|
83911
|
-
|
|
83912
|
-
|
|
83913
|
-
|
|
83914
|
-
|
|
83915
|
-
|
|
83916
|
-
|
|
83917
|
-
|
|
84111
|
+
if (container == null) {
|
|
84112
|
+
return;
|
|
84113
|
+
}
|
|
84114
|
+
var plotArea = container.plotArea;
|
|
84115
|
+
if (plotArea.state.isGesturing) {
|
|
84116
|
+
return;
|
|
84117
|
+
}
|
|
84118
|
+
var hovered = this._hovered;
|
|
84119
|
+
if (e.target === container.plotArea) {
|
|
84120
|
+
var result = DChartSelectionSimple.WORK_SELECT;
|
|
84121
|
+
var global_2 = e.data.global;
|
|
84122
|
+
var series = container.calcHitPoint(global_2.x, global_2.y, result);
|
|
84123
|
+
if (series) {
|
|
84124
|
+
hovered.set(series, result);
|
|
83918
84125
|
}
|
|
83919
84126
|
else {
|
|
83920
84127
|
hovered.unset();
|
|
83921
84128
|
}
|
|
83922
84129
|
}
|
|
84130
|
+
else {
|
|
84131
|
+
hovered.unset();
|
|
84132
|
+
}
|
|
83923
84133
|
};
|
|
83924
84134
|
DChartSelectionSimple.prototype.bind = function (container) {
|
|
83925
84135
|
this._container = container;
|
|
@@ -83927,14 +84137,15 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
|
|
|
83927
84137
|
this._hovered.bind(container);
|
|
83928
84138
|
var plotArea = container.plotArea;
|
|
83929
84139
|
plotArea.on(UtilPointerEvent.move, this._onMoveBound);
|
|
83930
|
-
plotArea.on(
|
|
84140
|
+
plotArea.view.on("gesturetap", this._onTapBound);
|
|
83931
84141
|
};
|
|
83932
84142
|
DChartSelectionSimple.prototype.unbind = function () {
|
|
83933
84143
|
var container = this._container;
|
|
83934
84144
|
this._container = null;
|
|
83935
|
-
if (container) {
|
|
84145
|
+
if (container != null) {
|
|
83936
84146
|
var plotArea = container.plotArea;
|
|
83937
84147
|
plotArea.off(UtilPointerEvent.move, this._onMoveBound);
|
|
84148
|
+
plotArea.view.off("gesturetap", this._onTapBound);
|
|
83938
84149
|
}
|
|
83939
84150
|
this._selected.unbind();
|
|
83940
84151
|
this._hovered.unbind();
|
|
@@ -88736,7 +88947,13 @@ var DDiagram = /** @class */ (function (_super) {
|
|
|
88736
88947
|
DDiagram.prototype.onDown = function (e) {
|
|
88737
88948
|
var canvas = this.canvas;
|
|
88738
88949
|
if (canvas) {
|
|
88739
|
-
|
|
88950
|
+
var target = e.target;
|
|
88951
|
+
if (target === this || target === canvas) {
|
|
88952
|
+
_super.prototype.onDown.call(this, e, canvas.onShapeDown(e));
|
|
88953
|
+
}
|
|
88954
|
+
else {
|
|
88955
|
+
_super.prototype.onDown.call(this, e);
|
|
88956
|
+
}
|
|
88740
88957
|
}
|
|
88741
88958
|
else {
|
|
88742
88959
|
_super.prototype.onDown.call(this, e);
|
|
@@ -88790,7 +89007,10 @@ var DDiagram = /** @class */ (function (_super) {
|
|
|
88790
89007
|
DDiagram.prototype.onShapeRightDown = function (e) {
|
|
88791
89008
|
var canvas = this.canvas;
|
|
88792
89009
|
if (canvas) {
|
|
88793
|
-
|
|
89010
|
+
var target = e.target;
|
|
89011
|
+
if (target === this || target === canvas) {
|
|
89012
|
+
canvas.onShapeRightDown(e);
|
|
89013
|
+
}
|
|
88794
89014
|
}
|
|
88795
89015
|
};
|
|
88796
89016
|
DDiagram.prototype.onShapeRightUp = function (e) {
|
|
@@ -102187,6 +102407,7 @@ exports.UtilGestureEasingHistory = UtilGestureEasingHistory;
|
|
|
102187
102407
|
exports.UtilGestureMode = UtilGestureMode;
|
|
102188
102408
|
exports.UtilGestureModifier = UtilGestureModifier;
|
|
102189
102409
|
exports.UtilGestureModifiers = UtilGestureModifiers;
|
|
102410
|
+
exports.UtilGestureTap = UtilGestureTap;
|
|
102190
102411
|
exports.UtilHsv = UtilHsv;
|
|
102191
102412
|
exports.UtilHtmlElement = UtilHtmlElement;
|
|
102192
102413
|
exports.UtilHtmlElementClipperExImpl = UtilHtmlElementClipperExImpl;
|