@wcardinal/wcardinal-ui 0.427.0 → 0.429.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/shape/action/e-shape-action-value-open.d.ts +8 -2
  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/shape/action/e-shape-action-value-open.js +23 -24
  46. package/dist/wcardinal/ui/shape/action/e-shape-action-value-open.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 +297 -77
  70. package/dist/wcardinal-ui.js +297 -77
  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.427.0
2
+ Winter Cardinal UI v0.429.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;
@@ -26417,34 +26586,33 @@ var EShapeActionValueOpen = /** @class */ (function (_super) {
26417
26586
  return new EShapeActionValueOpen(this.toSubType(serialized), condition, target, this.inNewWindow(serialized));
26418
26587
  };
26419
26588
  EShapeActionValueOpen.toSubType = function (serialized) {
26420
- if (serialized.length === 6) {
26421
- switch (serialized[2]) {
26422
- case EShapeActionValueOpenType.DIAGRAM_LEGACY:
26423
- return EShapeActionValueOpenType.DIAGRAM;
26424
- case EShapeActionValueOpenType.PAGE_LEGACY:
26425
- return EShapeActionValueOpenType.PAGE;
26426
- case EShapeActionValueOpenType.PAGE_INPLACE_LEGACY:
26427
- return EShapeActionValueOpenType.PAGE;
26428
- }
26429
- }
26430
- else {
26431
- return serialized[2];
26589
+ switch (serialized[2]) {
26590
+ case EShapeActionValueOpenType.DIAGRAM_LEGACY:
26591
+ return EShapeActionValueOpenType.DIAGRAM;
26592
+ case EShapeActionValueOpenType.PAGE_LEGACY:
26593
+ return EShapeActionValueOpenType.PAGE;
26594
+ case EShapeActionValueOpenType.PAGE_INPLACE_LEGACY:
26595
+ return EShapeActionValueOpenType.PAGE;
26596
+ case EShapeActionValueOpenType.DIAGRAM:
26597
+ return EShapeActionValueOpenType.DIAGRAM;
26598
+ case EShapeActionValueOpenType.PAGE:
26599
+ return EShapeActionValueOpenType.PAGE;
26432
26600
  }
26601
+ return EShapeActionValueOpenType.DIAGRAM;
26433
26602
  };
26434
26603
  EShapeActionValueOpen.inNewWindow = function (serialized) {
26435
- if (serialized.length === 6) {
26436
- switch (serialized[2]) {
26437
- case EShapeActionValueOpenType.DIAGRAM_LEGACY:
26438
- return false;
26439
- case EShapeActionValueOpenType.PAGE_LEGACY:
26440
- return true;
26441
- case EShapeActionValueOpenType.PAGE_INPLACE_LEGACY:
26442
- return false;
26443
- }
26444
- }
26445
- else {
26446
- return !!serialized[4];
26604
+ switch (serialized[2]) {
26605
+ case EShapeActionValueOpenType.DIAGRAM_LEGACY:
26606
+ return false;
26607
+ case EShapeActionValueOpenType.PAGE_LEGACY:
26608
+ return true;
26609
+ case EShapeActionValueOpenType.PAGE_INPLACE_LEGACY:
26610
+ return false;
26611
+ case EShapeActionValueOpenType.DIAGRAM:
26612
+ case EShapeActionValueOpenType.PAGE:
26613
+ return !!serialized[4];
26447
26614
  }
26615
+ return false;
26448
26616
  };
26449
26617
  return EShapeActionValueOpen;
26450
26618
  }(EShapeActionValueSubtyped));
@@ -82952,6 +83120,20 @@ var DChartPlotAreaTwofoldSubBase = /** @class */ (function () {
82952
83120
  enumerable: false,
82953
83121
  configurable: true
82954
83122
  });
83123
+ Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "state", {
83124
+ get: function () {
83125
+ return this._plotArea.state;
83126
+ },
83127
+ enumerable: false,
83128
+ configurable: true
83129
+ });
83130
+ Object.defineProperty(DChartPlotAreaTwofoldSubBase.prototype, "view", {
83131
+ get: function () {
83132
+ return this._plotArea.view;
83133
+ },
83134
+ enumerable: false,
83135
+ configurable: true
83136
+ });
82955
83137
  // eslint-disable-next-line @typescript-eslint/ban-types
82956
83138
  DChartPlotAreaTwofoldSubBase.prototype.on = function (name, callback, context) {
82957
83139
  this._plotArea.on(name, callback, context);
@@ -83459,9 +83641,9 @@ var DChartSelectionContainerImpl = /** @class */ (function () {
83459
83641
  this._x.unset();
83460
83642
  this._y.unset();
83461
83643
  };
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);
83644
+ DChartSelectionContainerImpl.prototype.update = function (container, position, mappedPosition, series) {
83645
+ var isXUpdated = this._x.update(container, position, mappedPosition, series);
83646
+ var isYUpdated = this._y.update(container, position, mappedPosition, series);
83465
83647
  return isXUpdated || isYUpdated;
83466
83648
  };
83467
83649
  return DChartSelectionContainerImpl;
@@ -83520,7 +83702,7 @@ var DChartSelectionShapeBase = /** @class */ (function () {
83520
83702
  return theme.newShape(state);
83521
83703
  };
83522
83704
  DChartSelectionShapeBase.prototype.set = function (container, position, mappedPosition, series) {
83523
- this.update(container, position, mappedPosition);
83705
+ this.update(container, position, mappedPosition, series);
83524
83706
  var shape = this._shape;
83525
83707
  if (shape) {
83526
83708
  this._style(shape, series);
@@ -83562,7 +83744,7 @@ var DChartSelectionGridlineX = /** @class */ (function (_super) {
83562
83744
  function DChartSelectionGridlineX() {
83563
83745
  return _super !== null && _super.apply(this, arguments) || this;
83564
83746
  }
83565
- DChartSelectionGridlineX.prototype.update = function (container, position, mappedPosition) {
83747
+ DChartSelectionGridlineX.prototype.update = function (container, position, mappedPosition, series) {
83566
83748
  var shape = this._shape;
83567
83749
  if (shape) {
83568
83750
  var mappedX = mappedPosition.x;
@@ -83589,7 +83771,7 @@ var DChartSelectionGridlineY = /** @class */ (function (_super) {
83589
83771
  function DChartSelectionGridlineY() {
83590
83772
  return _super !== null && _super.apply(this, arguments) || this;
83591
83773
  }
83592
- DChartSelectionGridlineY.prototype.update = function (container, position, mappedPosition) {
83774
+ DChartSelectionGridlineY.prototype.update = function (container, position, mappedPosition, series) {
83593
83775
  var shape = this._shape;
83594
83776
  if (shape) {
83595
83777
  var mappedY = mappedPosition.y;
@@ -83616,16 +83798,17 @@ var DChartSelectionMarker = /** @class */ (function (_super) {
83616
83798
  function DChartSelectionMarker() {
83617
83799
  return _super !== null && _super.apply(this, arguments) || this;
83618
83800
  }
83619
- DChartSelectionMarker.prototype.update = function (container, position, mappedPosition) {
83801
+ DChartSelectionMarker.prototype.update = function (container, position, mappedPosition, series) {
83620
83802
  var shape = this._shape;
83621
83803
  if (shape) {
83622
83804
  shape.transform.position.copyFrom(mappedPosition);
83623
- shape.visible = this.isVisible(container, position, mappedPosition);
83805
+ shape.visible = this.isVisible(container, position, mappedPosition, series);
83624
83806
  return true;
83625
83807
  }
83626
83808
  return false;
83627
83809
  };
83628
- DChartSelectionMarker.prototype.isVisible = function (container, position, mappedPosition) {
83810
+ DChartSelectionMarker.prototype.isVisible = function (container, position, mappedPosition, series) {
83811
+ container = (series === null || series === void 0 ? void 0 : series.container) || container;
83629
83812
  var x = mappedPosition.x;
83630
83813
  var y = mappedPosition.y;
83631
83814
  var bounds = container.plotArea.getPixelBounds();
@@ -83800,8 +83983,9 @@ var DChartSelectionSubImpl = /** @class */ (function (_super) {
83800
83983
  var work = this._work;
83801
83984
  work.set(coordinateX.transform.map(coordinateX.map(position.x)), coordinateY.transform.map(coordinateY.map(position.y)));
83802
83985
  container.plotArea.container.localTransform.apply(work, work);
83803
- var isGridlineUpdated = this._gridline.update(container, position, work);
83804
- var isMarkerUpdated = this._marker.update(container, position, work);
83986
+ var series = this._series;
83987
+ var isGridlineUpdated = this._gridline.update(container, position, work, series);
83988
+ var isMarkerUpdated = this._marker.update(container, position, work, series);
83805
83989
  return isGridlineUpdated || isMarkerUpdated;
83806
83990
  }
83807
83991
  return false;
@@ -83822,6 +84006,7 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
83822
84006
  var point = toEnum((_a = options === null || options === void 0 ? void 0 : options.point) !== null && _a !== void 0 ? _a : DChartSelectionPoint.CLOSER, DChartSelectionPoint);
83823
84007
  _this._selected = _this.newSelected(point, options === null || options === void 0 ? void 0 : options.selected);
83824
84008
  _this._hovered = _this.newHovered(point, options === null || options === void 0 ? void 0 : options.hovered);
84009
+ _this._dismiss = _this.toDismiss(options);
83825
84010
  // Events
83826
84011
  var on = options === null || options === void 0 ? void 0 : options.on;
83827
84012
  if (on != null) {
@@ -83832,15 +84017,27 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
83832
84017
  }
83833
84018
  }
83834
84019
  }
83835
- //
83836
84020
  _this._onMoveBound = function (e) {
83837
84021
  _this.onMove(e);
83838
84022
  };
83839
- _this._onClickBound = function (e) {
83840
- _this.onClick(e);
84023
+ _this._onTapBound = function (target, e) {
84024
+ _this.onTap(e);
83841
84025
  };
83842
84026
  return _this;
83843
84027
  }
84028
+ DChartSelectionSimple.prototype.toDismiss = function (options) {
84029
+ var _a;
84030
+ if (options != null) {
84031
+ var dismiss = options.dismiss;
84032
+ if (dismiss != null) {
84033
+ if (dismiss.enable === false) {
84034
+ return undefined;
84035
+ }
84036
+ return toEnum((_a = dismiss.modifier) !== null && _a !== void 0 ? _a : UtilGestureModifier.NOT_NONE, UtilGestureModifier);
84037
+ }
84038
+ }
84039
+ return UtilGestureModifier.NOT_NONE;
84040
+ };
83844
84041
  DChartSelectionSimple.prototype.newSelected = function (point, options) {
83845
84042
  return new DChartSelectionSubImpl(this.toSelectedOptions(point, options));
83846
84043
  };
@@ -83886,14 +84083,21 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
83886
84083
  }
83887
84084
  return options;
83888
84085
  };
83889
- DChartSelectionSimple.prototype.onClick = function (e) {
84086
+ DChartSelectionSimple.prototype.onTap = function (e) {
83890
84087
  var container = this._container;
83891
- if (container && e.target === container.plotArea) {
84088
+ if (container == null) {
84089
+ return;
84090
+ }
84091
+ var dismiss = this._dismiss;
84092
+ var selected = this._selected;
84093
+ if (dismiss != null && UtilGestureModifiers.match(e, dismiss)) {
84094
+ selected.unset();
84095
+ }
84096
+ else {
83892
84097
  var result = DChartSelectionSimple.WORK_SELECT;
83893
84098
  var global_1 = e.data.global;
83894
84099
  var series = container.calcHitPoint(global_1.x, global_1.y, result);
83895
- var selected = this._selected;
83896
- if (series) {
84100
+ if (series != null) {
83897
84101
  selected.set(series, result);
83898
84102
  }
83899
84103
  else {
@@ -83903,23 +84107,28 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
83903
84107
  };
83904
84108
  DChartSelectionSimple.prototype.onMove = function (e) {
83905
84109
  var container = this._container;
83906
- if (container) {
83907
- var hovered = this._hovered;
83908
- if (e.target === container.plotArea) {
83909
- var result = DChartSelectionSimple.WORK_SELECT;
83910
- var global_2 = e.data.global;
83911
- var series = container.calcHitPoint(global_2.x, global_2.y, result);
83912
- if (series) {
83913
- hovered.set(series, result);
83914
- }
83915
- else {
83916
- hovered.unset();
83917
- }
84110
+ if (container == null) {
84111
+ return;
84112
+ }
84113
+ var plotArea = container.plotArea;
84114
+ if (plotArea.state.isGesturing) {
84115
+ return;
84116
+ }
84117
+ var hovered = this._hovered;
84118
+ if (e.target === container.plotArea) {
84119
+ var result = DChartSelectionSimple.WORK_SELECT;
84120
+ var global_2 = e.data.global;
84121
+ var series = container.calcHitPoint(global_2.x, global_2.y, result);
84122
+ if (series) {
84123
+ hovered.set(series, result);
83918
84124
  }
83919
84125
  else {
83920
84126
  hovered.unset();
83921
84127
  }
83922
84128
  }
84129
+ else {
84130
+ hovered.unset();
84131
+ }
83923
84132
  };
83924
84133
  DChartSelectionSimple.prototype.bind = function (container) {
83925
84134
  this._container = container;
@@ -83927,14 +84136,15 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
83927
84136
  this._hovered.bind(container);
83928
84137
  var plotArea = container.plotArea;
83929
84138
  plotArea.on(UtilPointerEvent.move, this._onMoveBound);
83930
- plotArea.on(UtilPointerEvent.tap, this._onClickBound);
84139
+ plotArea.view.on("gesturetap", this._onTapBound);
83931
84140
  };
83932
84141
  DChartSelectionSimple.prototype.unbind = function () {
83933
84142
  var container = this._container;
83934
84143
  this._container = null;
83935
- if (container) {
84144
+ if (container != null) {
83936
84145
  var plotArea = container.plotArea;
83937
84146
  plotArea.off(UtilPointerEvent.move, this._onMoveBound);
84147
+ plotArea.view.off("gesturetap", this._onTapBound);
83938
84148
  }
83939
84149
  this._selected.unbind();
83940
84150
  this._hovered.unbind();
@@ -88736,7 +88946,13 @@ var DDiagram = /** @class */ (function (_super) {
88736
88946
  DDiagram.prototype.onDown = function (e) {
88737
88947
  var canvas = this.canvas;
88738
88948
  if (canvas) {
88739
- _super.prototype.onDown.call(this, e, canvas.onShapeDown(e));
88949
+ var target = e.target;
88950
+ if (target === this || target === canvas) {
88951
+ _super.prototype.onDown.call(this, e, canvas.onShapeDown(e));
88952
+ }
88953
+ else {
88954
+ _super.prototype.onDown.call(this, e);
88955
+ }
88740
88956
  }
88741
88957
  else {
88742
88958
  _super.prototype.onDown.call(this, e);
@@ -88790,7 +89006,10 @@ var DDiagram = /** @class */ (function (_super) {
88790
89006
  DDiagram.prototype.onShapeRightDown = function (e) {
88791
89007
  var canvas = this.canvas;
88792
89008
  if (canvas) {
88793
- canvas.onShapeRightDown(e);
89009
+ var target = e.target;
89010
+ if (target === this || target === canvas) {
89011
+ canvas.onShapeRightDown(e);
89012
+ }
88794
89013
  }
88795
89014
  };
88796
89015
  DDiagram.prototype.onShapeRightUp = function (e) {
@@ -102187,6 +102406,7 @@ exports.UtilGestureEasingHistory = UtilGestureEasingHistory;
102187
102406
  exports.UtilGestureMode = UtilGestureMode;
102188
102407
  exports.UtilGestureModifier = UtilGestureModifier;
102189
102408
  exports.UtilGestureModifiers = UtilGestureModifiers;
102409
+ exports.UtilGestureTap = UtilGestureTap;
102190
102410
  exports.UtilHsv = UtilHsv;
102191
102411
  exports.UtilHtmlElement = UtilHtmlElement;
102192
102412
  exports.UtilHtmlElementClipperExImpl = UtilHtmlElementClipperExImpl;