@wcardinal/wcardinal-ui 0.426.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.
Files changed (73) hide show
  1. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-base.d.ts +4 -0
  2. package/dist/types/wcardinal/ui/d-chart-plot-area.d.ts +3 -0
  3. package/dist/types/wcardinal/ui/d-chart-selection-container-impl.d.ts +1 -1
  4. package/dist/types/wcardinal/ui/d-chart-selection-container.d.ts +1 -1
  5. package/dist/types/wcardinal/ui/d-chart-selection-gridline-x.d.ts +2 -1
  6. package/dist/types/wcardinal/ui/d-chart-selection-gridline-y.d.ts +2 -1
  7. package/dist/types/wcardinal/ui/d-chart-selection-marker.d.ts +3 -2
  8. package/dist/types/wcardinal/ui/d-chart-selection-shape-base.d.ts +1 -1
  9. package/dist/types/wcardinal/ui/d-chart-selection-shape.d.ts +1 -1
  10. package/dist/types/wcardinal/ui/d-chart-selection-simple.d.ts +10 -2
  11. package/dist/types/wcardinal/ui/d-view-gesture-impl.d.ts +3 -2
  12. package/dist/types/wcardinal/ui/d-view-to-target.d.ts +5 -1
  13. package/dist/types/wcardinal/ui/d-view.d.ts +11 -2
  14. package/dist/types/wcardinal/ui/util/dynamic-sdf-font-atlas.d.ts +2 -0
  15. package/dist/types/wcardinal/ui/util/index.d.ts +2 -0
  16. package/dist/types/wcardinal/ui/util/util-gesture-data.d.ts +1 -0
  17. package/dist/types/wcardinal/ui/util/util-gesture-tap.d.ts +26 -0
  18. package/dist/types/wcardinal/ui/util/util-gesture-target.d.ts +5 -0
  19. package/dist/types/wcardinal/ui/util/util-gesture.d.ts +8 -6
  20. package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js +14 -0
  21. package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js.map +1 -1
  22. package/dist/wcardinal/ui/d-chart-plot-area.js.map +1 -1
  23. package/dist/wcardinal/ui/d-chart-selection-container-impl.js +3 -3
  24. package/dist/wcardinal/ui/d-chart-selection-container-impl.js.map +1 -1
  25. package/dist/wcardinal/ui/d-chart-selection-container.js.map +1 -1
  26. package/dist/wcardinal/ui/d-chart-selection-gridline-x.js +1 -1
  27. package/dist/wcardinal/ui/d-chart-selection-gridline-x.js.map +1 -1
  28. package/dist/wcardinal/ui/d-chart-selection-gridline-y.js +1 -1
  29. package/dist/wcardinal/ui/d-chart-selection-gridline-y.js.map +1 -1
  30. package/dist/wcardinal/ui/d-chart-selection-marker.js +4 -3
  31. package/dist/wcardinal/ui/d-chart-selection-marker.js.map +1 -1
  32. package/dist/wcardinal/ui/d-chart-selection-shape-base.js +1 -1
  33. package/dist/wcardinal/ui/d-chart-selection-shape-base.js.map +1 -1
  34. package/dist/wcardinal/ui/d-chart-selection-shape.js.map +1 -1
  35. package/dist/wcardinal/ui/d-chart-selection-simple.js +49 -21
  36. package/dist/wcardinal/ui/d-chart-selection-simple.js.map +1 -1
  37. package/dist/wcardinal/ui/d-chart-selection-sub-impl.js +3 -2
  38. package/dist/wcardinal/ui/d-chart-selection-sub-impl.js.map +1 -1
  39. package/dist/wcardinal/ui/d-diagram.js +11 -2
  40. package/dist/wcardinal/ui/d-diagram.js.map +1 -1
  41. package/dist/wcardinal/ui/d-view-gesture-impl.js +18 -3
  42. package/dist/wcardinal/ui/d-view-gesture-impl.js.map +1 -1
  43. package/dist/wcardinal/ui/d-view-to-target.js.map +1 -1
  44. package/dist/wcardinal/ui/d-view.js.map +1 -1
  45. package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas.js +25 -7
  46. package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas.js.map +1 -1
  47. package/dist/wcardinal/ui/util/index.js +2 -0
  48. package/dist/wcardinal/ui/util/index.js.map +1 -1
  49. package/dist/wcardinal/ui/util/util-gesture-data.js +1 -0
  50. package/dist/wcardinal/ui/util/util-gesture-data.js.map +1 -1
  51. package/dist/wcardinal/ui/util/util-gesture-tap.js +148 -0
  52. package/dist/wcardinal/ui/util/util-gesture-tap.js.map +1 -0
  53. package/dist/wcardinal/ui/util/util-gesture-target.js +2 -0
  54. package/dist/wcardinal/ui/util/util-gesture-target.js.map +1 -0
  55. package/dist/wcardinal/ui/util/util-gesture.js +26 -15
  56. package/dist/wcardinal/ui/util/util-gesture.js.map +1 -1
  57. package/dist/wcardinal-ui-theme-dark-en-us.js +1 -1
  58. package/dist/wcardinal-ui-theme-dark-en-us.min.js +1 -1
  59. package/dist/wcardinal-ui-theme-dark-ja-jp.js +1 -1
  60. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +1 -1
  61. package/dist/wcardinal-ui-theme-dark.js +1 -1
  62. package/dist/wcardinal-ui-theme-dark.min.js +1 -1
  63. package/dist/wcardinal-ui-theme-white-en-us.js +1 -1
  64. package/dist/wcardinal-ui-theme-white-en-us.min.js +1 -1
  65. package/dist/wcardinal-ui-theme-white-ja-jp.js +1 -1
  66. package/dist/wcardinal-ui-theme-white-ja-jp.min.js +1 -1
  67. package/dist/wcardinal-ui-theme-white.js +1 -1
  68. package/dist/wcardinal-ui-theme-white.min.js +1 -1
  69. package/dist/wcardinal-ui.cjs.js +299 -60
  70. package/dist/wcardinal-ui.js +299 -60
  71. package/dist/wcardinal-ui.min.js +2 -2
  72. package/dist/wcardinal-ui.min.js.map +1 -1
  73. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.426.0
2
+ Winter Cardinal UI v0.428.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.426.0
2
+ Winter Cardinal UI v0.428.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.426.0
2
+ Winter Cardinal UI v0.428.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.426.0
2
+ Winter Cardinal UI v0.428.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.426.0
2
+ Winter Cardinal UI v0.428.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.426.0
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(data.target, dx, dy, x, y, ds);
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
- var onEasingEnd = this._onEasingEnd;
16229
- if (onEasingEnd && target != null) {
16230
- onEasingEnd(target);
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
- var _a;
16387
+ this._tap.stop(target);
16235
16388
  var data = this._used.get(target);
16236
- if (data == null) {
16237
- return;
16238
- }
16239
- (_a = data.easing) === null || _a === void 0 ? void 0 : _a.stop();
16240
- this.deleteData(data);
16241
- var onStop = this._onStop;
16242
- if (onStop) {
16243
- onStop(target);
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.onGestureMove = function (target, dx, dy, x, y, ds) {
16303
- if (target) {
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;
@@ -21622,6 +21791,8 @@ var DynamicSDFFontAtlas = /** @class */ (function () {
21622
21791
  }
21623
21792
  this._characters = characters;
21624
21793
  this._isDirty = true;
21794
+ this._isTouched = false;
21795
+ this._life = DynamicFontAtlasCharacter.LIFE;
21625
21796
  }
21626
21797
  Object.defineProperty(DynamicSDFFontAtlas.prototype, "id", {
21627
21798
  get: function () {
@@ -21678,6 +21849,7 @@ var DynamicSDFFontAtlas = /** @class */ (function () {
21678
21849
  configurable: true
21679
21850
  });
21680
21851
  DynamicSDFFontAtlas.prototype.begin = function () {
21852
+ this._isTouched = false;
21681
21853
  this._characters.forEach(function (character) {
21682
21854
  if (!(character.type & DynamicFontAtlasCharacterType.RESERVED)) {
21683
21855
  character.ref = 0;
@@ -21687,15 +21859,26 @@ var DynamicSDFFontAtlas = /** @class */ (function () {
21687
21859
  DynamicSDFFontAtlas.prototype.end = function () {
21688
21860
  var _this = this;
21689
21861
  var characters = this._characters;
21690
- characters.forEach(function (character, id) {
21691
- if (character.ref <= 0 && !(character.type & DynamicFontAtlasCharacterType.RESERVED)) {
21692
- character.life -= 1;
21693
- if (character.life <= 0) {
21694
- characters.delete(id);
21695
- _this._isDirty = true;
21862
+ if (this._isTouched) {
21863
+ this._life = DynamicFontAtlasCharacter.LIFE;
21864
+ characters.forEach(function (character, id) {
21865
+ if (character.ref <= 0 &&
21866
+ !(character.type & DynamicFontAtlasCharacterType.RESERVED)) {
21867
+ character.life -= 1;
21868
+ if (character.life <= 0) {
21869
+ characters.delete(id);
21870
+ _this._isDirty = true;
21871
+ }
21696
21872
  }
21873
+ });
21874
+ }
21875
+ else {
21876
+ this._life -= 1;
21877
+ if (this._life <= 0 && 0 < characters.size) {
21878
+ characters.clear();
21879
+ this._isDirty = true;
21697
21880
  }
21698
- });
21881
+ }
21699
21882
  };
21700
21883
  DynamicSDFFontAtlas.prototype.newChar = function (character, type) {
21701
21884
  return new DynamicFontAtlasCharacter(type, character, 0, 0, 1, 1, 0);
@@ -21707,12 +21890,16 @@ var DynamicSDFFontAtlas = /** @class */ (function () {
21707
21890
  var data = cs.get(nac);
21708
21891
  if (data != null) {
21709
21892
  data.ref += 1;
21893
+ data.life = DynamicFontAtlasCharacter.LIFE;
21710
21894
  }
21711
21895
  else {
21712
21896
  cs.set(nac, this.newChar(nac, DynamicFontAtlasCharacterType.LETTER));
21713
21897
  this._isDirty = true;
21714
21898
  }
21715
21899
  }
21900
+ if (0 < characters.length) {
21901
+ this._isTouched = true;
21902
+ }
21716
21903
  };
21717
21904
  DynamicSDFFontAtlas.prototype.get = function (id) {
21718
21905
  return this._characters.get(id);
@@ -82934,6 +83121,20 @@ var DChartPlotAreaTwofoldSubBase = /** @class */ (function () {
82934
83121
  enumerable: false,
82935
83122
  configurable: true
82936
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
+ });
82937
83138
  // eslint-disable-next-line @typescript-eslint/ban-types
82938
83139
  DChartPlotAreaTwofoldSubBase.prototype.on = function (name, callback, context) {
82939
83140
  this._plotArea.on(name, callback, context);
@@ -83441,9 +83642,9 @@ var DChartSelectionContainerImpl = /** @class */ (function () {
83441
83642
  this._x.unset();
83442
83643
  this._y.unset();
83443
83644
  };
83444
- DChartSelectionContainerImpl.prototype.update = function (container, position, mappedPosition) {
83445
- var isXUpdated = this._x.update(container, position, mappedPosition);
83446
- 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);
83447
83648
  return isXUpdated || isYUpdated;
83448
83649
  };
83449
83650
  return DChartSelectionContainerImpl;
@@ -83502,7 +83703,7 @@ var DChartSelectionShapeBase = /** @class */ (function () {
83502
83703
  return theme.newShape(state);
83503
83704
  };
83504
83705
  DChartSelectionShapeBase.prototype.set = function (container, position, mappedPosition, series) {
83505
- this.update(container, position, mappedPosition);
83706
+ this.update(container, position, mappedPosition, series);
83506
83707
  var shape = this._shape;
83507
83708
  if (shape) {
83508
83709
  this._style(shape, series);
@@ -83544,7 +83745,7 @@ var DChartSelectionGridlineX = /** @class */ (function (_super) {
83544
83745
  function DChartSelectionGridlineX() {
83545
83746
  return _super !== null && _super.apply(this, arguments) || this;
83546
83747
  }
83547
- DChartSelectionGridlineX.prototype.update = function (container, position, mappedPosition) {
83748
+ DChartSelectionGridlineX.prototype.update = function (container, position, mappedPosition, series) {
83548
83749
  var shape = this._shape;
83549
83750
  if (shape) {
83550
83751
  var mappedX = mappedPosition.x;
@@ -83571,7 +83772,7 @@ var DChartSelectionGridlineY = /** @class */ (function (_super) {
83571
83772
  function DChartSelectionGridlineY() {
83572
83773
  return _super !== null && _super.apply(this, arguments) || this;
83573
83774
  }
83574
- DChartSelectionGridlineY.prototype.update = function (container, position, mappedPosition) {
83775
+ DChartSelectionGridlineY.prototype.update = function (container, position, mappedPosition, series) {
83575
83776
  var shape = this._shape;
83576
83777
  if (shape) {
83577
83778
  var mappedY = mappedPosition.y;
@@ -83598,16 +83799,17 @@ var DChartSelectionMarker = /** @class */ (function (_super) {
83598
83799
  function DChartSelectionMarker() {
83599
83800
  return _super !== null && _super.apply(this, arguments) || this;
83600
83801
  }
83601
- DChartSelectionMarker.prototype.update = function (container, position, mappedPosition) {
83802
+ DChartSelectionMarker.prototype.update = function (container, position, mappedPosition, series) {
83602
83803
  var shape = this._shape;
83603
83804
  if (shape) {
83604
83805
  shape.transform.position.copyFrom(mappedPosition);
83605
- shape.visible = this.isVisible(container, position, mappedPosition);
83806
+ shape.visible = this.isVisible(container, position, mappedPosition, series);
83606
83807
  return true;
83607
83808
  }
83608
83809
  return false;
83609
83810
  };
83610
- 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;
83611
83813
  var x = mappedPosition.x;
83612
83814
  var y = mappedPosition.y;
83613
83815
  var bounds = container.plotArea.getPixelBounds();
@@ -83782,8 +83984,9 @@ var DChartSelectionSubImpl = /** @class */ (function (_super) {
83782
83984
  var work = this._work;
83783
83985
  work.set(coordinateX.transform.map(coordinateX.map(position.x)), coordinateY.transform.map(coordinateY.map(position.y)));
83784
83986
  container.plotArea.container.localTransform.apply(work, work);
83785
- var isGridlineUpdated = this._gridline.update(container, position, work);
83786
- var isMarkerUpdated = this._marker.update(container, position, work);
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);
83787
83990
  return isGridlineUpdated || isMarkerUpdated;
83788
83991
  }
83789
83992
  return false;
@@ -83804,6 +84007,7 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
83804
84007
  var point = toEnum((_a = options === null || options === void 0 ? void 0 : options.point) !== null && _a !== void 0 ? _a : DChartSelectionPoint.CLOSER, DChartSelectionPoint);
83805
84008
  _this._selected = _this.newSelected(point, options === null || options === void 0 ? void 0 : options.selected);
83806
84009
  _this._hovered = _this.newHovered(point, options === null || options === void 0 ? void 0 : options.hovered);
84010
+ _this._dismiss = _this.toDismiss(options);
83807
84011
  // Events
83808
84012
  var on = options === null || options === void 0 ? void 0 : options.on;
83809
84013
  if (on != null) {
@@ -83814,15 +84018,27 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
83814
84018
  }
83815
84019
  }
83816
84020
  }
83817
- //
83818
84021
  _this._onMoveBound = function (e) {
83819
84022
  _this.onMove(e);
83820
84023
  };
83821
- _this._onClickBound = function (e) {
83822
- _this.onClick(e);
84024
+ _this._onTapBound = function (target, e) {
84025
+ _this.onTap(e);
83823
84026
  };
83824
84027
  return _this;
83825
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
+ };
83826
84042
  DChartSelectionSimple.prototype.newSelected = function (point, options) {
83827
84043
  return new DChartSelectionSubImpl(this.toSelectedOptions(point, options));
83828
84044
  };
@@ -83868,14 +84084,21 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
83868
84084
  }
83869
84085
  return options;
83870
84086
  };
83871
- DChartSelectionSimple.prototype.onClick = function (e) {
84087
+ DChartSelectionSimple.prototype.onTap = function (e) {
83872
84088
  var container = this._container;
83873
- if (container && e.target === container.plotArea) {
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 {
83874
84098
  var result = DChartSelectionSimple.WORK_SELECT;
83875
84099
  var global_1 = e.data.global;
83876
84100
  var series = container.calcHitPoint(global_1.x, global_1.y, result);
83877
- var selected = this._selected;
83878
- if (series) {
84101
+ if (series != null) {
83879
84102
  selected.set(series, result);
83880
84103
  }
83881
84104
  else {
@@ -83885,23 +84108,28 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
83885
84108
  };
83886
84109
  DChartSelectionSimple.prototype.onMove = function (e) {
83887
84110
  var container = this._container;
83888
- if (container) {
83889
- var hovered = this._hovered;
83890
- if (e.target === container.plotArea) {
83891
- var result = DChartSelectionSimple.WORK_SELECT;
83892
- var global_2 = e.data.global;
83893
- var series = container.calcHitPoint(global_2.x, global_2.y, result);
83894
- if (series) {
83895
- hovered.set(series, result);
83896
- }
83897
- else {
83898
- hovered.unset();
83899
- }
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);
83900
84125
  }
83901
84126
  else {
83902
84127
  hovered.unset();
83903
84128
  }
83904
84129
  }
84130
+ else {
84131
+ hovered.unset();
84132
+ }
83905
84133
  };
83906
84134
  DChartSelectionSimple.prototype.bind = function (container) {
83907
84135
  this._container = container;
@@ -83909,14 +84137,15 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
83909
84137
  this._hovered.bind(container);
83910
84138
  var plotArea = container.plotArea;
83911
84139
  plotArea.on(UtilPointerEvent.move, this._onMoveBound);
83912
- plotArea.on(UtilPointerEvent.tap, this._onClickBound);
84140
+ plotArea.view.on("gesturetap", this._onTapBound);
83913
84141
  };
83914
84142
  DChartSelectionSimple.prototype.unbind = function () {
83915
84143
  var container = this._container;
83916
84144
  this._container = null;
83917
- if (container) {
84145
+ if (container != null) {
83918
84146
  var plotArea = container.plotArea;
83919
84147
  plotArea.off(UtilPointerEvent.move, this._onMoveBound);
84148
+ plotArea.view.off("gesturetap", this._onTapBound);
83920
84149
  }
83921
84150
  this._selected.unbind();
83922
84151
  this._hovered.unbind();
@@ -88718,7 +88947,13 @@ var DDiagram = /** @class */ (function (_super) {
88718
88947
  DDiagram.prototype.onDown = function (e) {
88719
88948
  var canvas = this.canvas;
88720
88949
  if (canvas) {
88721
- _super.prototype.onDown.call(this, e, canvas.onShapeDown(e));
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
+ }
88722
88957
  }
88723
88958
  else {
88724
88959
  _super.prototype.onDown.call(this, e);
@@ -88772,7 +89007,10 @@ var DDiagram = /** @class */ (function (_super) {
88772
89007
  DDiagram.prototype.onShapeRightDown = function (e) {
88773
89008
  var canvas = this.canvas;
88774
89009
  if (canvas) {
88775
- canvas.onShapeRightDown(e);
89010
+ var target = e.target;
89011
+ if (target === this || target === canvas) {
89012
+ canvas.onShapeRightDown(e);
89013
+ }
88776
89014
  }
88777
89015
  };
88778
89016
  DDiagram.prototype.onShapeRightUp = function (e) {
@@ -102169,6 +102407,7 @@ exports.UtilGestureEasingHistory = UtilGestureEasingHistory;
102169
102407
  exports.UtilGestureMode = UtilGestureMode;
102170
102408
  exports.UtilGestureModifier = UtilGestureModifier;
102171
102409
  exports.UtilGestureModifiers = UtilGestureModifiers;
102410
+ exports.UtilGestureTap = UtilGestureTap;
102172
102411
  exports.UtilHsv = UtilHsv;
102173
102412
  exports.UtilHtmlElement = UtilHtmlElement;
102174
102413
  exports.UtilHtmlElementClipperExImpl = UtilHtmlElementClipperExImpl;