@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
 
@@ -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(data.target, dx, dy, x, y, ds);
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
- var onEasingEnd = this._onEasingEnd;
16226
- if (onEasingEnd && target != null) {
16227
- onEasingEnd(target);
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
- var _a;
16384
+ this._tap.stop(target);
16232
16385
  var data = this._used.get(target);
16233
- if (data == null) {
16234
- return;
16235
- }
16236
- (_a = data.easing) === null || _a === void 0 ? void 0 : _a.stop();
16237
- this.deleteData(data);
16238
- var onStop = this._onStop;
16239
- if (onStop) {
16240
- onStop(target);
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.onGestureMove = function (target, dx, dy, x, y, ds) {
16300
- if (target) {
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;
@@ -21619,6 +21788,8 @@
21619
21788
  }
21620
21789
  this._characters = characters;
21621
21790
  this._isDirty = true;
21791
+ this._isTouched = false;
21792
+ this._life = DynamicFontAtlasCharacter.LIFE;
21622
21793
  }
21623
21794
  Object.defineProperty(DynamicSDFFontAtlas.prototype, "id", {
21624
21795
  get: function () {
@@ -21675,6 +21846,7 @@
21675
21846
  configurable: true
21676
21847
  });
21677
21848
  DynamicSDFFontAtlas.prototype.begin = function () {
21849
+ this._isTouched = false;
21678
21850
  this._characters.forEach(function (character) {
21679
21851
  if (!(character.type & DynamicFontAtlasCharacterType.RESERVED)) {
21680
21852
  character.ref = 0;
@@ -21684,15 +21856,26 @@
21684
21856
  DynamicSDFFontAtlas.prototype.end = function () {
21685
21857
  var _this = this;
21686
21858
  var characters = this._characters;
21687
- characters.forEach(function (character, id) {
21688
- if (character.ref <= 0 && !(character.type & DynamicFontAtlasCharacterType.RESERVED)) {
21689
- character.life -= 1;
21690
- if (character.life <= 0) {
21691
- characters.delete(id);
21692
- _this._isDirty = true;
21859
+ if (this._isTouched) {
21860
+ this._life = DynamicFontAtlasCharacter.LIFE;
21861
+ characters.forEach(function (character, id) {
21862
+ if (character.ref <= 0 &&
21863
+ !(character.type & DynamicFontAtlasCharacterType.RESERVED)) {
21864
+ character.life -= 1;
21865
+ if (character.life <= 0) {
21866
+ characters.delete(id);
21867
+ _this._isDirty = true;
21868
+ }
21693
21869
  }
21870
+ });
21871
+ }
21872
+ else {
21873
+ this._life -= 1;
21874
+ if (this._life <= 0 && 0 < characters.size) {
21875
+ characters.clear();
21876
+ this._isDirty = true;
21694
21877
  }
21695
- });
21878
+ }
21696
21879
  };
21697
21880
  DynamicSDFFontAtlas.prototype.newChar = function (character, type) {
21698
21881
  return new DynamicFontAtlasCharacter(type, character, 0, 0, 1, 1, 0);
@@ -21704,12 +21887,16 @@
21704
21887
  var data = cs.get(nac);
21705
21888
  if (data != null) {
21706
21889
  data.ref += 1;
21890
+ data.life = DynamicFontAtlasCharacter.LIFE;
21707
21891
  }
21708
21892
  else {
21709
21893
  cs.set(nac, this.newChar(nac, DynamicFontAtlasCharacterType.LETTER));
21710
21894
  this._isDirty = true;
21711
21895
  }
21712
21896
  }
21897
+ if (0 < characters.length) {
21898
+ this._isTouched = true;
21899
+ }
21713
21900
  };
21714
21901
  DynamicSDFFontAtlas.prototype.get = function (id) {
21715
21902
  return this._characters.get(id);
@@ -61773,6 +61960,20 @@
61773
61960
  enumerable: false,
61774
61961
  configurable: true
61775
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
+ });
61776
61977
  // eslint-disable-next-line @typescript-eslint/ban-types
61777
61978
  DChartPlotAreaTwofoldSubBase.prototype.on = function (name, callback, context) {
61778
61979
  this._plotArea.on(name, callback, context);
@@ -62280,9 +62481,9 @@
62280
62481
  this._x.unset();
62281
62482
  this._y.unset();
62282
62483
  };
62283
- DChartSelectionContainerImpl.prototype.update = function (container, position, mappedPosition) {
62284
- var isXUpdated = this._x.update(container, position, mappedPosition);
62285
- 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);
62286
62487
  return isXUpdated || isYUpdated;
62287
62488
  };
62288
62489
  return DChartSelectionContainerImpl;
@@ -62341,7 +62542,7 @@
62341
62542
  return theme.newShape(state);
62342
62543
  };
62343
62544
  DChartSelectionShapeBase.prototype.set = function (container, position, mappedPosition, series) {
62344
- this.update(container, position, mappedPosition);
62545
+ this.update(container, position, mappedPosition, series);
62345
62546
  var shape = this._shape;
62346
62547
  if (shape) {
62347
62548
  this._style(shape, series);
@@ -62383,7 +62584,7 @@
62383
62584
  function DChartSelectionGridlineX() {
62384
62585
  return _super !== null && _super.apply(this, arguments) || this;
62385
62586
  }
62386
- DChartSelectionGridlineX.prototype.update = function (container, position, mappedPosition) {
62587
+ DChartSelectionGridlineX.prototype.update = function (container, position, mappedPosition, series) {
62387
62588
  var shape = this._shape;
62388
62589
  if (shape) {
62389
62590
  var mappedX = mappedPosition.x;
@@ -62410,7 +62611,7 @@
62410
62611
  function DChartSelectionGridlineY() {
62411
62612
  return _super !== null && _super.apply(this, arguments) || this;
62412
62613
  }
62413
- DChartSelectionGridlineY.prototype.update = function (container, position, mappedPosition) {
62614
+ DChartSelectionGridlineY.prototype.update = function (container, position, mappedPosition, series) {
62414
62615
  var shape = this._shape;
62415
62616
  if (shape) {
62416
62617
  var mappedY = mappedPosition.y;
@@ -62437,16 +62638,17 @@
62437
62638
  function DChartSelectionMarker() {
62438
62639
  return _super !== null && _super.apply(this, arguments) || this;
62439
62640
  }
62440
- DChartSelectionMarker.prototype.update = function (container, position, mappedPosition) {
62641
+ DChartSelectionMarker.prototype.update = function (container, position, mappedPosition, series) {
62441
62642
  var shape = this._shape;
62442
62643
  if (shape) {
62443
62644
  shape.transform.position.copyFrom(mappedPosition);
62444
- shape.visible = this.isVisible(container, position, mappedPosition);
62645
+ shape.visible = this.isVisible(container, position, mappedPosition, series);
62445
62646
  return true;
62446
62647
  }
62447
62648
  return false;
62448
62649
  };
62449
- 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;
62450
62652
  var x = mappedPosition.x;
62451
62653
  var y = mappedPosition.y;
62452
62654
  var bounds = container.plotArea.getPixelBounds();
@@ -62621,8 +62823,9 @@
62621
62823
  var work = this._work;
62622
62824
  work.set(coordinateX.transform.map(coordinateX.map(position.x)), coordinateY.transform.map(coordinateY.map(position.y)));
62623
62825
  container.plotArea.container.localTransform.apply(work, work);
62624
- var isGridlineUpdated = this._gridline.update(container, position, work);
62625
- var isMarkerUpdated = this._marker.update(container, position, work);
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);
62626
62829
  return isGridlineUpdated || isMarkerUpdated;
62627
62830
  }
62628
62831
  return false;
@@ -62643,6 +62846,7 @@
62643
62846
  var point = toEnum((_a = options === null || options === void 0 ? void 0 : options.point) !== null && _a !== void 0 ? _a : DChartSelectionPoint.CLOSER, DChartSelectionPoint);
62644
62847
  _this._selected = _this.newSelected(point, options === null || options === void 0 ? void 0 : options.selected);
62645
62848
  _this._hovered = _this.newHovered(point, options === null || options === void 0 ? void 0 : options.hovered);
62849
+ _this._dismiss = _this.toDismiss(options);
62646
62850
  // Events
62647
62851
  var on = options === null || options === void 0 ? void 0 : options.on;
62648
62852
  if (on != null) {
@@ -62653,15 +62857,27 @@
62653
62857
  }
62654
62858
  }
62655
62859
  }
62656
- //
62657
62860
  _this._onMoveBound = function (e) {
62658
62861
  _this.onMove(e);
62659
62862
  };
62660
- _this._onClickBound = function (e) {
62661
- _this.onClick(e);
62863
+ _this._onTapBound = function (target, e) {
62864
+ _this.onTap(e);
62662
62865
  };
62663
62866
  return _this;
62664
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
+ };
62665
62881
  DChartSelectionSimple.prototype.newSelected = function (point, options) {
62666
62882
  return new DChartSelectionSubImpl(this.toSelectedOptions(point, options));
62667
62883
  };
@@ -62707,14 +62923,21 @@
62707
62923
  }
62708
62924
  return options;
62709
62925
  };
62710
- DChartSelectionSimple.prototype.onClick = function (e) {
62926
+ DChartSelectionSimple.prototype.onTap = function (e) {
62711
62927
  var container = this._container;
62712
- if (container && e.target === container.plotArea) {
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 {
62713
62937
  var result = DChartSelectionSimple.WORK_SELECT;
62714
62938
  var global_1 = e.data.global;
62715
62939
  var series = container.calcHitPoint(global_1.x, global_1.y, result);
62716
- var selected = this._selected;
62717
- if (series) {
62940
+ if (series != null) {
62718
62941
  selected.set(series, result);
62719
62942
  }
62720
62943
  else {
@@ -62724,23 +62947,28 @@
62724
62947
  };
62725
62948
  DChartSelectionSimple.prototype.onMove = function (e) {
62726
62949
  var container = this._container;
62727
- if (container) {
62728
- var hovered = this._hovered;
62729
- if (e.target === container.plotArea) {
62730
- var result = DChartSelectionSimple.WORK_SELECT;
62731
- var global_2 = e.data.global;
62732
- var series = container.calcHitPoint(global_2.x, global_2.y, result);
62733
- if (series) {
62734
- hovered.set(series, result);
62735
- }
62736
- else {
62737
- hovered.unset();
62738
- }
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);
62739
62964
  }
62740
62965
  else {
62741
62966
  hovered.unset();
62742
62967
  }
62743
62968
  }
62969
+ else {
62970
+ hovered.unset();
62971
+ }
62744
62972
  };
62745
62973
  DChartSelectionSimple.prototype.bind = function (container) {
62746
62974
  this._container = container;
@@ -62748,14 +62976,15 @@
62748
62976
  this._hovered.bind(container);
62749
62977
  var plotArea = container.plotArea;
62750
62978
  plotArea.on(UtilPointerEvent.move, this._onMoveBound);
62751
- plotArea.on(UtilPointerEvent.tap, this._onClickBound);
62979
+ plotArea.view.on("gesturetap", this._onTapBound);
62752
62980
  };
62753
62981
  DChartSelectionSimple.prototype.unbind = function () {
62754
62982
  var container = this._container;
62755
62983
  this._container = null;
62756
- if (container) {
62984
+ if (container != null) {
62757
62985
  var plotArea = container.plotArea;
62758
62986
  plotArea.off(UtilPointerEvent.move, this._onMoveBound);
62987
+ plotArea.view.off("gesturetap", this._onTapBound);
62759
62988
  }
62760
62989
  this._selected.unbind();
62761
62990
  this._hovered.unbind();
@@ -67557,7 +67786,13 @@
67557
67786
  DDiagram.prototype.onDown = function (e) {
67558
67787
  var canvas = this.canvas;
67559
67788
  if (canvas) {
67560
- _super.prototype.onDown.call(this, e, canvas.onShapeDown(e));
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
+ }
67561
67796
  }
67562
67797
  else {
67563
67798
  _super.prototype.onDown.call(this, e);
@@ -67611,7 +67846,10 @@
67611
67846
  DDiagram.prototype.onShapeRightDown = function (e) {
67612
67847
  var canvas = this.canvas;
67613
67848
  if (canvas) {
67614
- canvas.onShapeRightDown(e);
67849
+ var target = e.target;
67850
+ if (target === this || target === canvas) {
67851
+ canvas.onShapeRightDown(e);
67852
+ }
67615
67853
  }
67616
67854
  };
67617
67855
  DDiagram.prototype.onShapeRightUp = function (e) {
@@ -80227,6 +80465,7 @@
80227
80465
  UtilGestureMode: UtilGestureMode,
80228
80466
  UtilGestureModifier: UtilGestureModifier,
80229
80467
  UtilGestureModifiers: UtilGestureModifiers,
80468
+ UtilGestureTap: UtilGestureTap,
80230
80469
  UtilGesture: UtilGesture,
80231
80470
  UtilExtract: UtilExtract,
80232
80471
  UtilExtractor: UtilExtractor,