@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.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
|
|
|
@@ -15460,6 +15460,7 @@
|
|
|
15460
15460
|
this.center = new pixi_js.Point();
|
|
15461
15461
|
this.scale = 0;
|
|
15462
15462
|
this.time = 0;
|
|
15463
|
+
this.distance = 0;
|
|
15463
15464
|
}
|
|
15464
15465
|
UtilGestureData.prototype.start = function (e) {
|
|
15465
15466
|
var oe = e.data.originalEvent;
|
|
@@ -15968,6 +15969,150 @@
|
|
|
15968
15969
|
return UtilGestureEasing;
|
|
15969
15970
|
}());
|
|
15970
15971
|
|
|
15972
|
+
/*
|
|
15973
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
15974
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
15975
|
+
*/
|
|
15976
|
+
var UtilGestureTap = /** @class */ (function () {
|
|
15977
|
+
function UtilGestureTap(on, options) {
|
|
15978
|
+
var _a;
|
|
15979
|
+
this._onTap = on === null || on === void 0 ? void 0 : on.tap;
|
|
15980
|
+
this._threshold = (_a = options === null || options === void 0 ? void 0 : options.threshold) !== null && _a !== void 0 ? _a : 10;
|
|
15981
|
+
this._unused = [];
|
|
15982
|
+
this._used = new Map();
|
|
15983
|
+
}
|
|
15984
|
+
UtilGestureTap.prototype.newData = function (target) {
|
|
15985
|
+
var used = this._used;
|
|
15986
|
+
var result = used.get(target);
|
|
15987
|
+
if (result != null) {
|
|
15988
|
+
return result;
|
|
15989
|
+
}
|
|
15990
|
+
var poped = this._unused.pop();
|
|
15991
|
+
if (poped != null) {
|
|
15992
|
+
used.set(target, poped);
|
|
15993
|
+
return poped;
|
|
15994
|
+
}
|
|
15995
|
+
var created = new UtilGestureData();
|
|
15996
|
+
created.easing = undefined;
|
|
15997
|
+
created.onMove = this.newOnMove(created);
|
|
15998
|
+
created.onEnd = this.newOnEnd(created);
|
|
15999
|
+
used.set(target, created);
|
|
16000
|
+
return created;
|
|
16001
|
+
};
|
|
16002
|
+
UtilGestureTap.prototype.deleteData = function (data) {
|
|
16003
|
+
var target = data.target;
|
|
16004
|
+
if (target) {
|
|
16005
|
+
if (this._used.delete(target)) {
|
|
16006
|
+
data.target = undefined;
|
|
16007
|
+
data.pointers.clear();
|
|
16008
|
+
this._unused.push(data);
|
|
16009
|
+
}
|
|
16010
|
+
}
|
|
16011
|
+
};
|
|
16012
|
+
UtilGestureTap.prototype.newOnMove = function (data) {
|
|
16013
|
+
var _this = this;
|
|
16014
|
+
return function (e) {
|
|
16015
|
+
_this.onMove(e, data);
|
|
16016
|
+
};
|
|
16017
|
+
};
|
|
16018
|
+
UtilGestureTap.prototype.newOnEnd = function (data) {
|
|
16019
|
+
var _this = this;
|
|
16020
|
+
return function (e) {
|
|
16021
|
+
_this.onEnd(e, data);
|
|
16022
|
+
};
|
|
16023
|
+
};
|
|
16024
|
+
UtilGestureTap.prototype.onDown = function (target, e) {
|
|
16025
|
+
var _a;
|
|
16026
|
+
if (this._onTap == null) {
|
|
16027
|
+
return;
|
|
16028
|
+
}
|
|
16029
|
+
var layer = DApplications.getLayer(target);
|
|
16030
|
+
if (layer == null) {
|
|
16031
|
+
return;
|
|
16032
|
+
}
|
|
16033
|
+
e.stopPropagation();
|
|
16034
|
+
if (target.state.isGesturing) {
|
|
16035
|
+
(_a = this._used.get(target)) === null || _a === void 0 ? void 0 : _a.start(e);
|
|
16036
|
+
}
|
|
16037
|
+
else {
|
|
16038
|
+
var data = this.newData(target);
|
|
16039
|
+
data.target = target;
|
|
16040
|
+
data.distance = 0;
|
|
16041
|
+
target.state.isGesturing = true;
|
|
16042
|
+
// Interaction manager
|
|
16043
|
+
var interactionManager = layer.renderer.plugins.interaction;
|
|
16044
|
+
data.interactionManager = interactionManager;
|
|
16045
|
+
// Update the center
|
|
16046
|
+
data.start(e);
|
|
16047
|
+
// Event handler
|
|
16048
|
+
data.bind(e);
|
|
16049
|
+
}
|
|
16050
|
+
};
|
|
16051
|
+
UtilGestureTap.prototype.onMove = function (e, data) {
|
|
16052
|
+
var target = data.target;
|
|
16053
|
+
if (target == null || !target.state.isGesturing) {
|
|
16054
|
+
return;
|
|
16055
|
+
}
|
|
16056
|
+
if (!data.isUpdatable(e)) {
|
|
16057
|
+
return;
|
|
16058
|
+
}
|
|
16059
|
+
// Update the center
|
|
16060
|
+
var center = data.center;
|
|
16061
|
+
var oldCenterX = center.x;
|
|
16062
|
+
var oldCenterY = center.y;
|
|
16063
|
+
data.update(e);
|
|
16064
|
+
var newCenterX = center.x;
|
|
16065
|
+
var newCenterY = center.y;
|
|
16066
|
+
// Calculate the position
|
|
16067
|
+
var dx = newCenterX - oldCenterX;
|
|
16068
|
+
var dy = newCenterY - oldCenterY;
|
|
16069
|
+
// Distance
|
|
16070
|
+
data.distance += Math.abs(dx) + Math.abs(dy);
|
|
16071
|
+
};
|
|
16072
|
+
UtilGestureTap.prototype.onEnd = function (e, data) {
|
|
16073
|
+
var target = data.target;
|
|
16074
|
+
if (target == null || !target.state.isGesturing) {
|
|
16075
|
+
return;
|
|
16076
|
+
}
|
|
16077
|
+
if (!data.end(e)) {
|
|
16078
|
+
return;
|
|
16079
|
+
}
|
|
16080
|
+
// State
|
|
16081
|
+
target.state.isGesturing = false;
|
|
16082
|
+
// Remove event handlers
|
|
16083
|
+
var interactionManager = data.interactionManager;
|
|
16084
|
+
data.interactionManager = undefined;
|
|
16085
|
+
if (interactionManager) {
|
|
16086
|
+
var onMoveBound = data.onMove;
|
|
16087
|
+
if (onMoveBound) {
|
|
16088
|
+
interactionManager.off(UtilPointerEvent.move, onMoveBound);
|
|
16089
|
+
}
|
|
16090
|
+
var onEndBound = data.onEnd;
|
|
16091
|
+
if (onEndBound) {
|
|
16092
|
+
interactionManager.off(UtilPointerEvent.up, onEndBound);
|
|
16093
|
+
interactionManager.off(UtilPointerEvent.cancel, onEndBound);
|
|
16094
|
+
}
|
|
16095
|
+
}
|
|
16096
|
+
// Tap
|
|
16097
|
+
this.end(target, data, e);
|
|
16098
|
+
// Delete this data
|
|
16099
|
+
this.deleteData(data);
|
|
16100
|
+
};
|
|
16101
|
+
UtilGestureTap.prototype.end = function (target, data, e) {
|
|
16102
|
+
var onTap = this._onTap;
|
|
16103
|
+
if (onTap && data.distance < this._threshold) {
|
|
16104
|
+
onTap(target, e);
|
|
16105
|
+
}
|
|
16106
|
+
};
|
|
16107
|
+
UtilGestureTap.prototype.stop = function (target) {
|
|
16108
|
+
var data = this._used.get(target);
|
|
16109
|
+
if (data != null) {
|
|
16110
|
+
this.deleteData(data);
|
|
16111
|
+
}
|
|
16112
|
+
};
|
|
16113
|
+
return UtilGestureTap;
|
|
16114
|
+
}());
|
|
16115
|
+
|
|
15971
16116
|
/*
|
|
15972
16117
|
* Copyright (C) 2019 Toshiba Corporation
|
|
15973
16118
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -15996,6 +16141,7 @@
|
|
|
15996
16141
|
this._touch = !!options.touch;
|
|
15997
16142
|
this._unused = [];
|
|
15998
16143
|
this._used = new Map();
|
|
16144
|
+
this._tap = new UtilGestureTap(options.on, options.tap);
|
|
15999
16145
|
var bind = options.bind;
|
|
16000
16146
|
if (bind != null) {
|
|
16001
16147
|
this.bind(bind);
|
|
@@ -16068,10 +16214,10 @@
|
|
|
16068
16214
|
UtilGesture.prototype.onDown = function (target, e) {
|
|
16069
16215
|
var _a;
|
|
16070
16216
|
if (this._touch && !this.isTouch(e)) {
|
|
16071
|
-
return;
|
|
16217
|
+
return this._tap.onDown(target, e);
|
|
16072
16218
|
}
|
|
16073
16219
|
if (!this._checkerStart(e, this._modifier, target)) {
|
|
16074
|
-
return;
|
|
16220
|
+
return this._tap.onDown(target, e);
|
|
16075
16221
|
}
|
|
16076
16222
|
var layer = DApplications.getLayer(target);
|
|
16077
16223
|
if (layer == null) {
|
|
@@ -16089,6 +16235,7 @@
|
|
|
16089
16235
|
}
|
|
16090
16236
|
var data = this.newData(target);
|
|
16091
16237
|
data.target = target;
|
|
16238
|
+
data.distance = 0;
|
|
16092
16239
|
target.state.isGesturing = true;
|
|
16093
16240
|
// Interaction manager
|
|
16094
16241
|
var interactionManager = layer.renderer.plugins.interaction;
|
|
@@ -16141,6 +16288,8 @@
|
|
|
16141
16288
|
var dt = newTime - oldTime;
|
|
16142
16289
|
var epsilon = 0.00001;
|
|
16143
16290
|
var ds = epsilon < oldScale && epsilon < newScale ? newScale / oldScale : 1;
|
|
16291
|
+
// Distance
|
|
16292
|
+
data.distance += Math.abs(dx) + Math.abs(dy);
|
|
16144
16293
|
// Easing
|
|
16145
16294
|
var easing = data.easing;
|
|
16146
16295
|
if (easing) {
|
|
@@ -16184,6 +16333,8 @@
|
|
|
16184
16333
|
if (onEnd != null) {
|
|
16185
16334
|
onEnd(target);
|
|
16186
16335
|
}
|
|
16336
|
+
// Tap
|
|
16337
|
+
this._tap.end(target, data, e);
|
|
16187
16338
|
// Start the Easing
|
|
16188
16339
|
var onEasingStart = this._onEasingStart;
|
|
16189
16340
|
if (onEasingStart) {
|
|
@@ -16217,27 +16368,31 @@
|
|
|
16217
16368
|
var x = center.x + dx;
|
|
16218
16369
|
var y = center.y + dy;
|
|
16219
16370
|
center.set(x, y);
|
|
16220
|
-
onMove(
|
|
16371
|
+
onMove(target, dx, dy, x, y, ds);
|
|
16221
16372
|
};
|
|
16222
16373
|
UtilGesture.prototype.onEasingEnd = function (data) {
|
|
16223
16374
|
var target = data.target;
|
|
16224
16375
|
this.deleteData(data);
|
|
16225
|
-
|
|
16226
|
-
|
|
16227
|
-
onEasingEnd
|
|
16376
|
+
if (target != null) {
|
|
16377
|
+
var onEasingEnd = this._onEasingEnd;
|
|
16378
|
+
if (onEasingEnd) {
|
|
16379
|
+
onEasingEnd(target);
|
|
16380
|
+
}
|
|
16228
16381
|
}
|
|
16229
16382
|
};
|
|
16230
16383
|
UtilGesture.prototype.stop = function (target) {
|
|
16231
|
-
|
|
16384
|
+
this._tap.stop(target);
|
|
16232
16385
|
var data = this._used.get(target);
|
|
16233
|
-
if (data
|
|
16234
|
-
|
|
16235
|
-
|
|
16236
|
-
|
|
16237
|
-
|
|
16238
|
-
|
|
16239
|
-
|
|
16240
|
-
onStop
|
|
16386
|
+
if (data != null) {
|
|
16387
|
+
var easing = data.easing;
|
|
16388
|
+
if (easing != null) {
|
|
16389
|
+
easing.stop();
|
|
16390
|
+
}
|
|
16391
|
+
this.deleteData(data);
|
|
16392
|
+
var onStop = this._onStop;
|
|
16393
|
+
if (onStop) {
|
|
16394
|
+
onStop(target);
|
|
16395
|
+
}
|
|
16241
16396
|
}
|
|
16242
16397
|
};
|
|
16243
16398
|
return UtilGesture;
|
|
@@ -16257,6 +16412,7 @@
|
|
|
16257
16412
|
var mode = toEnum((_a = options === null || options === void 0 ? void 0 : options.mode) !== null && _a !== void 0 ? _a : theme.getGestureMode(), UtilGestureMode);
|
|
16258
16413
|
var modifier = toEnum((_b = options === null || options === void 0 ? void 0 : options.modifier) !== null && _b !== void 0 ? _b : theme.getGestureModifier(), UtilGestureModifier);
|
|
16259
16414
|
if (mode === UtilGestureMode.ON || mode === UtilGestureMode.TOUCH) {
|
|
16415
|
+
var work_1 = new pixi_js.Point();
|
|
16260
16416
|
this._gestureUtil = new UtilGesture({
|
|
16261
16417
|
touch: mode === UtilGestureMode.TOUCH,
|
|
16262
16418
|
modifier: modifier,
|
|
@@ -16269,7 +16425,7 @@
|
|
|
16269
16425
|
_this.onStart(target);
|
|
16270
16426
|
},
|
|
16271
16427
|
move: function (target, dx, dy, x, y, ds) {
|
|
16272
|
-
_this.onGestureMove(toTarget(owner), dx, dy, x, y, ds);
|
|
16428
|
+
_this.onGestureMove(toTarget(owner), dx, dy, x, y, ds, work_1);
|
|
16273
16429
|
},
|
|
16274
16430
|
easing: {
|
|
16275
16431
|
end: function (target) {
|
|
@@ -16278,6 +16434,9 @@
|
|
|
16278
16434
|
},
|
|
16279
16435
|
stop: function (target) {
|
|
16280
16436
|
_this.onStop(target);
|
|
16437
|
+
},
|
|
16438
|
+
tap: function (target, e) {
|
|
16439
|
+
_this.onTap(target, e);
|
|
16281
16440
|
}
|
|
16282
16441
|
}
|
|
16283
16442
|
});
|
|
@@ -16296,8 +16455,12 @@
|
|
|
16296
16455
|
var parent = this._parent;
|
|
16297
16456
|
parent.emit("gesturestop", target, parent);
|
|
16298
16457
|
};
|
|
16299
|
-
DViewGestureImpl.prototype.
|
|
16300
|
-
|
|
16458
|
+
DViewGestureImpl.prototype.onTap = function (target, e) {
|
|
16459
|
+
var parent = this._parent;
|
|
16460
|
+
parent.emit("gesturetap", target, e, parent);
|
|
16461
|
+
};
|
|
16462
|
+
DViewGestureImpl.prototype.onGestureMove = function (target, dx, dy, x, y, ds, work) {
|
|
16463
|
+
if (target != null) {
|
|
16301
16464
|
// Scale
|
|
16302
16465
|
var parent_1 = this._parent;
|
|
16303
16466
|
var oldScale = target.scale;
|
|
@@ -16311,6 +16474,12 @@
|
|
|
16311
16474
|
newScaleX = scaleRatio * oldScaleX;
|
|
16312
16475
|
newScaleY = scaleRatio * oldScaleY;
|
|
16313
16476
|
// Position
|
|
16477
|
+
var targetParent = target.parent;
|
|
16478
|
+
if (targetParent != null) {
|
|
16479
|
+
targetParent.toLocal(work.set(x, y), undefined, work);
|
|
16480
|
+
x = work.x;
|
|
16481
|
+
y = work.y;
|
|
16482
|
+
}
|
|
16314
16483
|
var cx = x - dx;
|
|
16315
16484
|
var cy = y - dy;
|
|
16316
16485
|
var position = target.position;
|
|
@@ -61791,6 +61960,20 @@
|
|
|
61791
61960
|
enumerable: false,
|
|
61792
61961
|
configurable: true
|
|
61793
61962
|
});
|
|
61963
|
+
Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "state", {
|
|
61964
|
+
get: function () {
|
|
61965
|
+
return this._plotArea.state;
|
|
61966
|
+
},
|
|
61967
|
+
enumerable: false,
|
|
61968
|
+
configurable: true
|
|
61969
|
+
});
|
|
61970
|
+
Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "view", {
|
|
61971
|
+
get: function () {
|
|
61972
|
+
return this._plotArea.view;
|
|
61973
|
+
},
|
|
61974
|
+
enumerable: false,
|
|
61975
|
+
configurable: true
|
|
61976
|
+
});
|
|
61794
61977
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
61795
61978
|
DChartPlotAreaTwofoldSubBase.prototype.on = function (name, callback, context) {
|
|
61796
61979
|
this._plotArea.on(name, callback, context);
|
|
@@ -62298,9 +62481,9 @@
|
|
|
62298
62481
|
this._x.unset();
|
|
62299
62482
|
this._y.unset();
|
|
62300
62483
|
};
|
|
62301
|
-
DChartSelectionContainerImpl.prototype.update = function (container, position, mappedPosition) {
|
|
62302
|
-
var isXUpdated = this._x.update(container, position, mappedPosition);
|
|
62303
|
-
var isYUpdated = this._y.update(container, position, mappedPosition);
|
|
62484
|
+
DChartSelectionContainerImpl.prototype.update = function (container, position, mappedPosition, series) {
|
|
62485
|
+
var isXUpdated = this._x.update(container, position, mappedPosition, series);
|
|
62486
|
+
var isYUpdated = this._y.update(container, position, mappedPosition, series);
|
|
62304
62487
|
return isXUpdated || isYUpdated;
|
|
62305
62488
|
};
|
|
62306
62489
|
return DChartSelectionContainerImpl;
|
|
@@ -62359,7 +62542,7 @@
|
|
|
62359
62542
|
return theme.newShape(state);
|
|
62360
62543
|
};
|
|
62361
62544
|
DChartSelectionShapeBase.prototype.set = function (container, position, mappedPosition, series) {
|
|
62362
|
-
this.update(container, position, mappedPosition);
|
|
62545
|
+
this.update(container, position, mappedPosition, series);
|
|
62363
62546
|
var shape = this._shape;
|
|
62364
62547
|
if (shape) {
|
|
62365
62548
|
this._style(shape, series);
|
|
@@ -62401,7 +62584,7 @@
|
|
|
62401
62584
|
function DChartSelectionGridlineX() {
|
|
62402
62585
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
62403
62586
|
}
|
|
62404
|
-
DChartSelectionGridlineX.prototype.update = function (container, position, mappedPosition) {
|
|
62587
|
+
DChartSelectionGridlineX.prototype.update = function (container, position, mappedPosition, series) {
|
|
62405
62588
|
var shape = this._shape;
|
|
62406
62589
|
if (shape) {
|
|
62407
62590
|
var mappedX = mappedPosition.x;
|
|
@@ -62428,7 +62611,7 @@
|
|
|
62428
62611
|
function DChartSelectionGridlineY() {
|
|
62429
62612
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
62430
62613
|
}
|
|
62431
|
-
DChartSelectionGridlineY.prototype.update = function (container, position, mappedPosition) {
|
|
62614
|
+
DChartSelectionGridlineY.prototype.update = function (container, position, mappedPosition, series) {
|
|
62432
62615
|
var shape = this._shape;
|
|
62433
62616
|
if (shape) {
|
|
62434
62617
|
var mappedY = mappedPosition.y;
|
|
@@ -62455,16 +62638,17 @@
|
|
|
62455
62638
|
function DChartSelectionMarker() {
|
|
62456
62639
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
62457
62640
|
}
|
|
62458
|
-
DChartSelectionMarker.prototype.update = function (container, position, mappedPosition) {
|
|
62641
|
+
DChartSelectionMarker.prototype.update = function (container, position, mappedPosition, series) {
|
|
62459
62642
|
var shape = this._shape;
|
|
62460
62643
|
if (shape) {
|
|
62461
62644
|
shape.transform.position.copyFrom(mappedPosition);
|
|
62462
|
-
shape.visible = this.isVisible(container, position, mappedPosition);
|
|
62645
|
+
shape.visible = this.isVisible(container, position, mappedPosition, series);
|
|
62463
62646
|
return true;
|
|
62464
62647
|
}
|
|
62465
62648
|
return false;
|
|
62466
62649
|
};
|
|
62467
|
-
DChartSelectionMarker.prototype.isVisible = function (container, position, mappedPosition) {
|
|
62650
|
+
DChartSelectionMarker.prototype.isVisible = function (container, position, mappedPosition, series) {
|
|
62651
|
+
container = (series === null || series === void 0 ? void 0 : series.container) || container;
|
|
62468
62652
|
var x = mappedPosition.x;
|
|
62469
62653
|
var y = mappedPosition.y;
|
|
62470
62654
|
var bounds = container.plotArea.getPixelBounds();
|
|
@@ -62639,8 +62823,9 @@
|
|
|
62639
62823
|
var work = this._work;
|
|
62640
62824
|
work.set(coordinateX.transform.map(coordinateX.map(position.x)), coordinateY.transform.map(coordinateY.map(position.y)));
|
|
62641
62825
|
container.plotArea.container.localTransform.apply(work, work);
|
|
62642
|
-
var
|
|
62643
|
-
var
|
|
62826
|
+
var series = this._series;
|
|
62827
|
+
var isGridlineUpdated = this._gridline.update(container, position, work, series);
|
|
62828
|
+
var isMarkerUpdated = this._marker.update(container, position, work, series);
|
|
62644
62829
|
return isGridlineUpdated || isMarkerUpdated;
|
|
62645
62830
|
}
|
|
62646
62831
|
return false;
|
|
@@ -62661,6 +62846,7 @@
|
|
|
62661
62846
|
var point = toEnum((_a = options === null || options === void 0 ? void 0 : options.point) !== null && _a !== void 0 ? _a : DChartSelectionPoint.CLOSER, DChartSelectionPoint);
|
|
62662
62847
|
_this._selected = _this.newSelected(point, options === null || options === void 0 ? void 0 : options.selected);
|
|
62663
62848
|
_this._hovered = _this.newHovered(point, options === null || options === void 0 ? void 0 : options.hovered);
|
|
62849
|
+
_this._dismiss = _this.toDismiss(options);
|
|
62664
62850
|
// Events
|
|
62665
62851
|
var on = options === null || options === void 0 ? void 0 : options.on;
|
|
62666
62852
|
if (on != null) {
|
|
@@ -62671,15 +62857,27 @@
|
|
|
62671
62857
|
}
|
|
62672
62858
|
}
|
|
62673
62859
|
}
|
|
62674
|
-
//
|
|
62675
62860
|
_this._onMoveBound = function (e) {
|
|
62676
62861
|
_this.onMove(e);
|
|
62677
62862
|
};
|
|
62678
|
-
_this.
|
|
62679
|
-
_this.
|
|
62863
|
+
_this._onTapBound = function (target, e) {
|
|
62864
|
+
_this.onTap(e);
|
|
62680
62865
|
};
|
|
62681
62866
|
return _this;
|
|
62682
62867
|
}
|
|
62868
|
+
DChartSelectionSimple.prototype.toDismiss = function (options) {
|
|
62869
|
+
var _a;
|
|
62870
|
+
if (options != null) {
|
|
62871
|
+
var dismiss = options.dismiss;
|
|
62872
|
+
if (dismiss != null) {
|
|
62873
|
+
if (dismiss.enable === false) {
|
|
62874
|
+
return undefined;
|
|
62875
|
+
}
|
|
62876
|
+
return toEnum((_a = dismiss.modifier) !== null && _a !== void 0 ? _a : UtilGestureModifier.NOT_NONE, UtilGestureModifier);
|
|
62877
|
+
}
|
|
62878
|
+
}
|
|
62879
|
+
return UtilGestureModifier.NOT_NONE;
|
|
62880
|
+
};
|
|
62683
62881
|
DChartSelectionSimple.prototype.newSelected = function (point, options) {
|
|
62684
62882
|
return new DChartSelectionSubImpl(this.toSelectedOptions(point, options));
|
|
62685
62883
|
};
|
|
@@ -62725,14 +62923,21 @@
|
|
|
62725
62923
|
}
|
|
62726
62924
|
return options;
|
|
62727
62925
|
};
|
|
62728
|
-
DChartSelectionSimple.prototype.
|
|
62926
|
+
DChartSelectionSimple.prototype.onTap = function (e) {
|
|
62729
62927
|
var container = this._container;
|
|
62730
|
-
if (container
|
|
62928
|
+
if (container == null) {
|
|
62929
|
+
return;
|
|
62930
|
+
}
|
|
62931
|
+
var dismiss = this._dismiss;
|
|
62932
|
+
var selected = this._selected;
|
|
62933
|
+
if (dismiss != null && UtilGestureModifiers.match(e, dismiss)) {
|
|
62934
|
+
selected.unset();
|
|
62935
|
+
}
|
|
62936
|
+
else {
|
|
62731
62937
|
var result = DChartSelectionSimple.WORK_SELECT;
|
|
62732
62938
|
var global_1 = e.data.global;
|
|
62733
62939
|
var series = container.calcHitPoint(global_1.x, global_1.y, result);
|
|
62734
|
-
|
|
62735
|
-
if (series) {
|
|
62940
|
+
if (series != null) {
|
|
62736
62941
|
selected.set(series, result);
|
|
62737
62942
|
}
|
|
62738
62943
|
else {
|
|
@@ -62742,23 +62947,28 @@
|
|
|
62742
62947
|
};
|
|
62743
62948
|
DChartSelectionSimple.prototype.onMove = function (e) {
|
|
62744
62949
|
var container = this._container;
|
|
62745
|
-
if (container) {
|
|
62746
|
-
|
|
62747
|
-
|
|
62748
|
-
|
|
62749
|
-
|
|
62750
|
-
|
|
62751
|
-
|
|
62752
|
-
|
|
62753
|
-
|
|
62754
|
-
|
|
62755
|
-
|
|
62756
|
-
|
|
62950
|
+
if (container == null) {
|
|
62951
|
+
return;
|
|
62952
|
+
}
|
|
62953
|
+
var plotArea = container.plotArea;
|
|
62954
|
+
if (plotArea.state.isGesturing) {
|
|
62955
|
+
return;
|
|
62956
|
+
}
|
|
62957
|
+
var hovered = this._hovered;
|
|
62958
|
+
if (e.target === container.plotArea) {
|
|
62959
|
+
var result = DChartSelectionSimple.WORK_SELECT;
|
|
62960
|
+
var global_2 = e.data.global;
|
|
62961
|
+
var series = container.calcHitPoint(global_2.x, global_2.y, result);
|
|
62962
|
+
if (series) {
|
|
62963
|
+
hovered.set(series, result);
|
|
62757
62964
|
}
|
|
62758
62965
|
else {
|
|
62759
62966
|
hovered.unset();
|
|
62760
62967
|
}
|
|
62761
62968
|
}
|
|
62969
|
+
else {
|
|
62970
|
+
hovered.unset();
|
|
62971
|
+
}
|
|
62762
62972
|
};
|
|
62763
62973
|
DChartSelectionSimple.prototype.bind = function (container) {
|
|
62764
62974
|
this._container = container;
|
|
@@ -62766,14 +62976,15 @@
|
|
|
62766
62976
|
this._hovered.bind(container);
|
|
62767
62977
|
var plotArea = container.plotArea;
|
|
62768
62978
|
plotArea.on(UtilPointerEvent.move, this._onMoveBound);
|
|
62769
|
-
plotArea.on(
|
|
62979
|
+
plotArea.view.on("gesturetap", this._onTapBound);
|
|
62770
62980
|
};
|
|
62771
62981
|
DChartSelectionSimple.prototype.unbind = function () {
|
|
62772
62982
|
var container = this._container;
|
|
62773
62983
|
this._container = null;
|
|
62774
|
-
if (container) {
|
|
62984
|
+
if (container != null) {
|
|
62775
62985
|
var plotArea = container.plotArea;
|
|
62776
62986
|
plotArea.off(UtilPointerEvent.move, this._onMoveBound);
|
|
62987
|
+
plotArea.view.off("gesturetap", this._onTapBound);
|
|
62777
62988
|
}
|
|
62778
62989
|
this._selected.unbind();
|
|
62779
62990
|
this._hovered.unbind();
|
|
@@ -67575,7 +67786,13 @@
|
|
|
67575
67786
|
DDiagram.prototype.onDown = function (e) {
|
|
67576
67787
|
var canvas = this.canvas;
|
|
67577
67788
|
if (canvas) {
|
|
67578
|
-
|
|
67789
|
+
var target = e.target;
|
|
67790
|
+
if (target === this || target === canvas) {
|
|
67791
|
+
_super.prototype.onDown.call(this, e, canvas.onShapeDown(e));
|
|
67792
|
+
}
|
|
67793
|
+
else {
|
|
67794
|
+
_super.prototype.onDown.call(this, e);
|
|
67795
|
+
}
|
|
67579
67796
|
}
|
|
67580
67797
|
else {
|
|
67581
67798
|
_super.prototype.onDown.call(this, e);
|
|
@@ -67629,7 +67846,10 @@
|
|
|
67629
67846
|
DDiagram.prototype.onShapeRightDown = function (e) {
|
|
67630
67847
|
var canvas = this.canvas;
|
|
67631
67848
|
if (canvas) {
|
|
67632
|
-
|
|
67849
|
+
var target = e.target;
|
|
67850
|
+
if (target === this || target === canvas) {
|
|
67851
|
+
canvas.onShapeRightDown(e);
|
|
67852
|
+
}
|
|
67633
67853
|
}
|
|
67634
67854
|
};
|
|
67635
67855
|
DDiagram.prototype.onShapeRightUp = function (e) {
|
|
@@ -80245,6 +80465,7 @@
|
|
|
80245
80465
|
UtilGestureMode: UtilGestureMode,
|
|
80246
80466
|
UtilGestureModifier: UtilGestureModifier,
|
|
80247
80467
|
UtilGestureModifiers: UtilGestureModifiers,
|
|
80468
|
+
UtilGestureTap: UtilGestureTap,
|
|
80248
80469
|
UtilGesture: UtilGesture,
|
|
80249
80470
|
UtilExtract: UtilExtract,
|
|
80250
80471
|
UtilExtractor: UtilExtractor,
|