@wcardinal/wcardinal-ui 0.429.0 → 0.431.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 (53) hide show
  1. package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-base.d.ts +2 -1
  2. package/dist/types/wcardinal/ui/d-chart-plot-area.d.ts +2 -1
  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-shape-base.d.ts +2 -2
  6. package/dist/types/wcardinal/ui/d-chart-selection-shape.d.ts +1 -1
  7. package/dist/types/wcardinal/ui/d-chart-selection-simple.d.ts +36 -3
  8. package/dist/types/wcardinal/ui/d-chart-selection-sub-impl.d.ts +6 -1
  9. package/dist/types/wcardinal/ui/d-chart-selection-sub.d.ts +18 -1
  10. package/dist/types/wcardinal/ui/d-chart-selection.d.ts +1 -1
  11. package/dist/types/wcardinal/ui/d-view-gesture-impl.d.ts +1 -0
  12. package/dist/types/wcardinal/ui/d-view.d.ts +9 -0
  13. package/dist/types/wcardinal/ui/util/util-gesture-data.d.ts +1 -0
  14. package/dist/types/wcardinal/ui/util/util-gesture-tap.d.ts +16 -2
  15. package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js +3 -0
  16. package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js.map +1 -1
  17. package/dist/wcardinal/ui/d-chart-plot-area.js.map +1 -1
  18. package/dist/wcardinal/ui/d-chart-selection-container-impl.js.map +1 -1
  19. package/dist/wcardinal/ui/d-chart-selection-container.js.map +1 -1
  20. package/dist/wcardinal/ui/d-chart-selection-shape-base.js +1 -1
  21. package/dist/wcardinal/ui/d-chart-selection-shape-base.js.map +1 -1
  22. package/dist/wcardinal/ui/d-chart-selection-shape.js.map +1 -1
  23. package/dist/wcardinal/ui/d-chart-selection-simple.js +60 -10
  24. package/dist/wcardinal/ui/d-chart-selection-simple.js.map +1 -1
  25. package/dist/wcardinal/ui/d-chart-selection-sub-impl.js +160 -61
  26. package/dist/wcardinal/ui/d-chart-selection-sub-impl.js.map +1 -1
  27. package/dist/wcardinal/ui/d-chart-selection-sub.js.map +1 -1
  28. package/dist/wcardinal/ui/d-chart-selection.js.map +1 -1
  29. package/dist/wcardinal/ui/d-view-gesture-impl.js +7 -0
  30. package/dist/wcardinal/ui/d-view-gesture-impl.js.map +1 -1
  31. package/dist/wcardinal/ui/d-view.js.map +1 -1
  32. package/dist/wcardinal/ui/util/util-gesture-data.js.map +1 -1
  33. package/dist/wcardinal/ui/util/util-gesture-tap.js +58 -7
  34. package/dist/wcardinal/ui/util/util-gesture-tap.js.map +1 -1
  35. package/dist/wcardinal/ui/util/util-gesture.js +3 -1
  36. package/dist/wcardinal/ui/util/util-gesture.js.map +1 -1
  37. package/dist/wcardinal-ui-theme-dark-en-us.js +1 -1
  38. package/dist/wcardinal-ui-theme-dark-en-us.min.js +1 -1
  39. package/dist/wcardinal-ui-theme-dark-ja-jp.js +1 -1
  40. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +1 -1
  41. package/dist/wcardinal-ui-theme-dark.js +1 -1
  42. package/dist/wcardinal-ui-theme-dark.min.js +1 -1
  43. package/dist/wcardinal-ui-theme-white-en-us.js +1 -1
  44. package/dist/wcardinal-ui-theme-white-en-us.min.js +1 -1
  45. package/dist/wcardinal-ui-theme-white-ja-jp.js +1 -1
  46. package/dist/wcardinal-ui-theme-white-ja-jp.min.js +1 -1
  47. package/dist/wcardinal-ui-theme-white.js +1 -1
  48. package/dist/wcardinal-ui-theme-white.min.js +1 -1
  49. package/dist/wcardinal-ui.cjs.js +292 -80
  50. package/dist/wcardinal-ui.js +292 -80
  51. package/dist/wcardinal-ui.min.js +2 -2
  52. package/dist/wcardinal-ui.min.js.map +1 -1
  53. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.429.0
2
+ Winter Cardinal UI v0.431.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -15978,12 +15978,30 @@ var UtilGestureEasing = /** @class */ (function () {
15978
15978
  */
15979
15979
  var UtilGestureTap = /** @class */ (function () {
15980
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;
15981
+ if (on != null) {
15982
+ this._onTap = on.tap;
15983
+ this._onLongPress = on.longpress;
15984
+ }
15985
+ this._threshold = this.toThreshold(options);
15984
15986
  this._unused = [];
15985
15987
  this._used = new Map();
15986
15988
  }
15989
+ UtilGestureTap.prototype.toThreshold = function (options) {
15990
+ var _a, _b;
15991
+ if (options != null) {
15992
+ var threshold = options.threshold;
15993
+ if (threshold != null) {
15994
+ return {
15995
+ distance: (_a = threshold.distance) !== null && _a !== void 0 ? _a : 10,
15996
+ long: (_b = threshold.long) !== null && _b !== void 0 ? _b : 500
15997
+ };
15998
+ }
15999
+ }
16000
+ return {
16001
+ distance: 10,
16002
+ long: 500
16003
+ };
16004
+ };
15987
16005
  UtilGestureTap.prototype.newData = function (target) {
15988
16006
  var used = this._used;
15989
16007
  var result = used.get(target);
@@ -16006,6 +16024,11 @@ var UtilGestureTap = /** @class */ (function () {
16006
16024
  var target = data.target;
16007
16025
  if (target) {
16008
16026
  if (this._used.delete(target)) {
16027
+ var timeoutId = data.timeoutId;
16028
+ if (timeoutId != null) {
16029
+ data.timeoutId = undefined;
16030
+ window.clearTimeout(timeoutId);
16031
+ }
16009
16032
  data.target = undefined;
16010
16033
  data.pointers.clear();
16011
16034
  this._unused.push(data);
@@ -16026,7 +16049,7 @@ var UtilGestureTap = /** @class */ (function () {
16026
16049
  };
16027
16050
  UtilGestureTap.prototype.onDown = function (target, e) {
16028
16051
  var _a;
16029
- if (this._onTap == null) {
16052
+ if (this._onTap == null && this._onLongPress == null) {
16030
16053
  return;
16031
16054
  }
16032
16055
  var layer = DApplications.getLayer(target);
@@ -16049,6 +16072,8 @@ var UtilGestureTap = /** @class */ (function () {
16049
16072
  data.start(e);
16050
16073
  // Event handler
16051
16074
  data.bind(e);
16075
+ // Long press
16076
+ this.start(target, data, e);
16052
16077
  }
16053
16078
  };
16054
16079
  UtilGestureTap.prototype.onMove = function (e, data) {
@@ -16101,10 +16126,36 @@ var UtilGestureTap = /** @class */ (function () {
16101
16126
  // Delete this data
16102
16127
  this.deleteData(data);
16103
16128
  };
16129
+ UtilGestureTap.prototype.onLongPress = function (target, data, e) {
16130
+ data.timeoutId = undefined;
16131
+ if (data.distance < this._threshold.distance) {
16132
+ data.distance = this._threshold.distance;
16133
+ var onLongPress = this._onLongPress;
16134
+ if (onLongPress != null) {
16135
+ onLongPress(target, e);
16136
+ }
16137
+ }
16138
+ };
16139
+ UtilGestureTap.prototype.start = function (target, data, e) {
16140
+ var _this = this;
16141
+ var thresholdLong = this._threshold.long;
16142
+ if (0 <= thresholdLong) {
16143
+ data.timeoutId = window.setTimeout(function () {
16144
+ _this.onLongPress(target, data, e);
16145
+ }, thresholdLong);
16146
+ }
16147
+ };
16104
16148
  UtilGestureTap.prototype.end = function (target, data, e) {
16105
- var onTap = this._onTap;
16106
- if (onTap && data.distance < this._threshold) {
16107
- onTap(target, e);
16149
+ var timeoutId = data.timeoutId;
16150
+ if (timeoutId != null) {
16151
+ data.timeoutId = undefined;
16152
+ window.clearTimeout(timeoutId);
16153
+ }
16154
+ if (data.distance < this._threshold.distance) {
16155
+ var onTap = this._onTap;
16156
+ if (onTap) {
16157
+ onTap(target, e);
16158
+ }
16108
16159
  }
16109
16160
  };
16110
16161
  UtilGestureTap.prototype.stop = function (target) {
@@ -16217,7 +16268,7 @@ var UtilGesture = /** @class */ (function () {
16217
16268
  UtilGesture.prototype.onDown = function (target, e) {
16218
16269
  var _a;
16219
16270
  if (this._touch && !this.isTouch(e)) {
16220
- return this._tap.onDown(target, e);
16271
+ return;
16221
16272
  }
16222
16273
  if (!this._checkerStart(e, this._modifier, target)) {
16223
16274
  return this._tap.onDown(target, e);
@@ -16252,6 +16303,8 @@ var UtilGesture = /** @class */ (function () {
16252
16303
  }
16253
16304
  // Event handler
16254
16305
  data.bind(e);
16306
+ // Tap
16307
+ this._tap.start(target, data, e);
16255
16308
  }
16256
16309
  };
16257
16310
  UtilGesture.prototype.newOnMove = function (data) {
@@ -16440,6 +16493,9 @@ var DViewGestureImpl = /** @class */ (function () {
16440
16493
  },
16441
16494
  tap: function (target, e) {
16442
16495
  _this.onTap(target, e);
16496
+ },
16497
+ longpress: function (target, e) {
16498
+ _this.onLongPress(target, e);
16443
16499
  }
16444
16500
  }
16445
16501
  });
@@ -16462,6 +16518,10 @@ var DViewGestureImpl = /** @class */ (function () {
16462
16518
  var parent = this._parent;
16463
16519
  parent.emit("gesturetap", target, e, parent);
16464
16520
  };
16521
+ DViewGestureImpl.prototype.onLongPress = function (target, e) {
16522
+ var parent = this._parent;
16523
+ parent.emit("gesturelongpress", target, e, parent);
16524
+ };
16465
16525
  DViewGestureImpl.prototype.onGestureMove = function (target, dx, dy, x, y, ds, work) {
16466
16526
  if (target != null) {
16467
16527
  // Scale
@@ -83162,6 +83222,9 @@ var DChartPlotAreaTwofoldSubBase = /** @class */ (function () {
83162
83222
  DChartPlotAreaTwofoldSubBase.prototype.toBoundsDirty = function () {
83163
83223
  this._isContainerBoundsDirty = true;
83164
83224
  };
83225
+ DChartPlotAreaTwofoldSubBase.prototype.toLocal = function (position, from, result, skipUpdate) {
83226
+ return this._plotArea.toLocal(position, from, result, skipUpdate);
83227
+ };
83165
83228
  DChartPlotAreaTwofoldSubBase.prototype.destroy = function () {
83166
83229
  this._container.destroy();
83167
83230
  this._series.destroy();
@@ -83704,7 +83767,7 @@ var DChartSelectionShapeBase = /** @class */ (function () {
83704
83767
  DChartSelectionShapeBase.prototype.set = function (container, position, mappedPosition, series) {
83705
83768
  this.update(container, position, mappedPosition, series);
83706
83769
  var shape = this._shape;
83707
- if (shape) {
83770
+ if (shape != null) {
83708
83771
  this._style(shape, series);
83709
83772
  }
83710
83773
  };
@@ -83841,18 +83904,25 @@ var DChartSelectionPoint = {
83841
83904
  var DChartSelectionSubImpl = /** @class */ (function (_super) {
83842
83905
  __extends(DChartSelectionSubImpl, _super);
83843
83906
  function DChartSelectionSubImpl(options) {
83844
- var _a, _b, _c, _d, _e;
83907
+ var _a, _b, _c;
83845
83908
  var _this = _super.call(this) || this;
83846
83909
  _this._container = null;
83847
83910
  _this._series = null;
83848
83911
  _this._isEnabled = (_a = options.enable) !== null && _a !== void 0 ? _a : true;
83849
- _this._gridline = new DChartSelectionContainerImpl(new DChartSelectionGridlineX((_b = options.gridline) === null || _b === void 0 ? void 0 : _b.x), new DChartSelectionGridlineY((_c = options.gridline) === null || _c === void 0 ? void 0 : _c.y));
83912
+ _this._isVisible = false;
83913
+ var gridline = options.gridline;
83914
+ if (gridline != null) {
83915
+ _this._gridline = new DChartSelectionContainerImpl(new DChartSelectionGridlineX(gridline.x), new DChartSelectionGridlineY(gridline.y));
83916
+ }
83917
+ else {
83918
+ _this._gridline = new DChartSelectionContainerImpl(new DChartSelectionGridlineX(), new DChartSelectionGridlineY());
83919
+ }
83850
83920
  _this._marker = new DChartSelectionMarker(options.marker);
83851
- _this._state = (_d = options.state) !== null && _d !== void 0 ? _d : DBaseState.HOVERED;
83921
+ _this._state = (_b = options.state) !== null && _b !== void 0 ? _b : DBaseState.HOVERED;
83852
83922
  _this._coordinateX = null;
83853
83923
  _this._coordinateY = null;
83854
83924
  _this._position = new pixi_js.Point();
83855
- _this._point = (_e = options.point) !== null && _e !== void 0 ? _e : DChartSelectionPoint.CLOSER;
83925
+ _this._point = (_c = options.point) !== null && _c !== void 0 ? _c : DChartSelectionPoint.CLOSER;
83856
83926
  _this._work = new pixi_js.Point();
83857
83927
  // Events
83858
83928
  var on = options.on;
@@ -83880,6 +83950,13 @@ var DChartSelectionSubImpl = /** @class */ (function (_super) {
83880
83950
  this._coordinateX = null;
83881
83951
  this._coordinateY = null;
83882
83952
  };
83953
+ Object.defineProperty(DChartSelectionSubImpl.prototype, "visible", {
83954
+ get: function () {
83955
+ return this._isVisible;
83956
+ },
83957
+ enumerable: false,
83958
+ configurable: true
83959
+ });
83883
83960
  Object.defineProperty(DChartSelectionSubImpl.prototype, "series", {
83884
83961
  get: function () {
83885
83962
  return this._series;
@@ -83909,49 +83986,116 @@ var DChartSelectionSubImpl = /** @class */ (function (_super) {
83909
83986
  configurable: true
83910
83987
  });
83911
83988
  DChartSelectionSubImpl.prototype.set = function (series, result) {
83989
+ if (isNumber(series)) {
83990
+ this.set1(series, result);
83991
+ }
83992
+ else {
83993
+ this.set2(series, result);
83994
+ }
83995
+ };
83996
+ DChartSelectionSubImpl.prototype.set1 = function (x, y) {
83912
83997
  var container = this._container;
83913
- var coordinateX = (this._coordinateX = series.coordinate.x);
83914
- var coordinateY = (this._coordinateY = series.coordinate.y);
83915
- if (container && coordinateX && coordinateY) {
83916
- var transform = container.plotArea.container.localTransform;
83917
- var position = this._position;
83918
- var work = this._work;
83919
- if (result instanceof DChartSeriesHitResult) {
83920
- var x = result.x;
83921
- var y = result.y;
83922
- switch (this._point) {
83923
- case DChartSelectionPoint.PREVIOUS:
83924
- x = result.p0x;
83925
- y = result.p0y;
83926
- break;
83927
- case DChartSelectionPoint.NEXT:
83928
- x = result.p1x;
83929
- y = result.p1y;
83930
- break;
83931
- case DChartSelectionPoint.CLOSER:
83932
- if (Math.abs(result.p0x - result.x) < Math.abs(result.p1x - result.x)) {
83933
- x = result.p0x;
83934
- y = result.p0y;
83935
- }
83936
- else {
83937
- x = result.p1x;
83938
- y = result.p1y;
83939
- }
83940
- }
83941
- work.set(x, y);
83942
- transform.apply(work, work);
83943
- position.set(coordinateX.unmap(coordinateX.transform.unmap(x)), coordinateY.unmap(coordinateY.transform.unmap(y)));
83944
- }
83945
- else {
83946
- position.copyFrom(result.position);
83947
- work.set(coordinateX.transform.map(coordinateX.map(position.x)), coordinateY.transform.map(coordinateY.map(position.y)));
83948
- transform.apply(work, work);
83998
+ if (container == null) {
83999
+ return;
84000
+ }
84001
+ var work = this._work;
84002
+ work.set(x, y);
84003
+ var plotArea = container.plotArea;
84004
+ plotArea.container.toLocal(work, undefined, work, true);
84005
+ var coordinate = plotArea.coordinate;
84006
+ var coordinateX = coordinate.x.get(0);
84007
+ var coordinateY = coordinate.y.get(0);
84008
+ var newPositionX = work.x;
84009
+ var newPositionY = work.y;
84010
+ if (coordinateX && coordinateY) {
84011
+ newPositionX = coordinateX.unmap(coordinateX.transform.unmap(newPositionX));
84012
+ newPositionY = coordinateY.unmap(coordinateY.transform.unmap(newPositionY));
84013
+ }
84014
+ else {
84015
+ coordinateX = null;
84016
+ coordinateY = null;
84017
+ }
84018
+ var oldSeries = this._series;
84019
+ var position = this._position;
84020
+ if (this._isVisible &&
84021
+ oldSeries == null &&
84022
+ newPositionX === position.x &&
84023
+ newPositionY === position.y) {
84024
+ return;
84025
+ }
84026
+ this._isVisible = true;
84027
+ position.set(newPositionX, newPositionY);
84028
+ this._coordinateX = coordinateX;
84029
+ this._coordinateY = coordinateY;
84030
+ plotArea.container.localTransform.apply(work, work);
84031
+ this._gridline.set(container, position, work, null);
84032
+ this._marker.set(container, position, work, null);
84033
+ if (oldSeries != null) {
84034
+ var state = this._state;
84035
+ if (oldSeries) {
84036
+ oldSeries.state.remove(state);
83949
84037
  }
83950
- this._gridline.set(container, position, work, series);
83951
- this._marker.set(container, position, work, series);
83952
- DApplications.update(container.plotArea);
84038
+ this._series = null;
84039
+ }
84040
+ this.emit("change", this);
84041
+ DApplications.update(plotArea);
84042
+ };
84043
+ DChartSelectionSubImpl.prototype.set2 = function (series, result) {
84044
+ var container = this._container;
84045
+ if (container == null) {
84046
+ return;
84047
+ }
84048
+ var work = this._work;
84049
+ var x = result.x;
84050
+ var y = result.y;
84051
+ switch (this._point) {
84052
+ case DChartSelectionPoint.PREVIOUS:
84053
+ x = result.p0x;
84054
+ y = result.p0y;
84055
+ break;
84056
+ case DChartSelectionPoint.NEXT:
84057
+ x = result.p1x;
84058
+ y = result.p1y;
84059
+ break;
84060
+ case DChartSelectionPoint.CLOSER:
84061
+ if (Math.abs(result.p0x - result.x) < Math.abs(result.p1x - result.x)) {
84062
+ x = result.p0x;
84063
+ y = result.p0y;
84064
+ }
84065
+ else {
84066
+ x = result.p1x;
84067
+ y = result.p1y;
84068
+ }
84069
+ }
84070
+ work.set(x, y);
84071
+ var plotArea = container.plotArea;
84072
+ plotArea.container.localTransform.apply(work, work);
84073
+ var coordinateX = series.coordinate.x;
84074
+ var coordinateY = series.coordinate.y;
84075
+ var newPositionX = x;
84076
+ var newPositionY = y;
84077
+ if (coordinateX && coordinateY) {
84078
+ newPositionX = coordinateX.unmap(coordinateX.transform.unmap(newPositionX));
84079
+ newPositionY = coordinateY.unmap(coordinateY.transform.unmap(newPositionY));
84080
+ }
84081
+ else {
84082
+ coordinateX = null;
84083
+ coordinateY = null;
83953
84084
  }
83954
84085
  var oldSeries = this._series;
84086
+ var position = this._position;
84087
+ if (this._isVisible &&
84088
+ oldSeries === series &&
84089
+ newPositionX === position.x &&
84090
+ newPositionY === position.y) {
84091
+ return;
84092
+ }
84093
+ this._isVisible = true;
84094
+ position.set(newPositionX, newPositionY);
84095
+ this._coordinateX = coordinateX;
84096
+ this._coordinateY = coordinateY;
84097
+ this._gridline.set(container, position, work, series);
84098
+ this._marker.set(container, position, work, series);
83955
84099
  if (oldSeries !== series) {
83956
84100
  var state = this._state;
83957
84101
  if (oldSeries) {
@@ -83961,34 +84105,52 @@ var DChartSelectionSubImpl = /** @class */ (function (_super) {
83961
84105
  series.state.add(state);
83962
84106
  }
83963
84107
  this.emit("change", this);
84108
+ DApplications.update(plotArea);
83964
84109
  };
83965
84110
  DChartSelectionSubImpl.prototype.unset = function () {
83966
- var series = this._series;
83967
- if (series) {
84111
+ var container = this._container;
84112
+ if (container == null) {
84113
+ return;
84114
+ }
84115
+ var oldSeries = this._series;
84116
+ if (!this._isVisible && oldSeries == null) {
84117
+ return;
84118
+ }
84119
+ this._isVisible = false;
84120
+ this._coordinateX = null;
84121
+ this._coordinateY = null;
84122
+ this._gridline.unset();
84123
+ this._marker.unset();
84124
+ if (oldSeries != null) {
83968
84125
  this._series = null;
83969
- this._coordinateX = null;
83970
- this._coordinateY = null;
83971
- series.state.remove(this._state);
83972
- this._gridline.unset();
83973
- this._marker.unset();
83974
- this.emit("change", this);
84126
+ oldSeries.state.remove(this._state);
83975
84127
  }
84128
+ this.emit("change", this);
84129
+ DApplications.update(container.plotArea);
83976
84130
  };
83977
84131
  DChartSelectionSubImpl.prototype.update = function () {
83978
84132
  var container = this._container;
84133
+ if (container == null) {
84134
+ return false;
84135
+ }
84136
+ if (!this._isVisible) {
84137
+ return false;
84138
+ }
84139
+ var position = this._position;
84140
+ var work = this._work;
83979
84141
  var coordinateX = this._coordinateX;
83980
84142
  var coordinateY = this._coordinateY;
83981
- if (container && coordinateX && coordinateY) {
83982
- var position = this._position;
83983
- var work = this._work;
84143
+ if (coordinateX && coordinateY) {
83984
84144
  work.set(coordinateX.transform.map(coordinateX.map(position.x)), coordinateY.transform.map(coordinateY.map(position.y)));
83985
- container.plotArea.container.localTransform.apply(work, 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);
83989
- return isGridlineUpdated || isMarkerUpdated;
83990
84145
  }
83991
- return false;
84146
+ else {
84147
+ work.copyFrom(position);
84148
+ }
84149
+ container.plotArea.container.localTransform.apply(work, work);
84150
+ var series = this._series;
84151
+ var isGridlineUpdated = this._gridline.update(container, position, work, series);
84152
+ var isMarkerUpdated = this._marker.update(container, position, work, series);
84153
+ return isGridlineUpdated || isMarkerUpdated;
83992
84154
  };
83993
84155
  return DChartSelectionSubImpl;
83994
84156
  }(pixi_js.utils.EventEmitter));
@@ -84023,6 +84185,9 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
84023
84185
  _this._onTapBound = function (target, e) {
84024
84186
  _this.onTap(e);
84025
84187
  };
84188
+ _this._onLongPressBound = function (target, e) {
84189
+ _this.onLongPress(e);
84190
+ };
84026
84191
  return _this;
84027
84192
  }
84028
84193
  DChartSelectionSimple.prototype.toDismiss = function (options) {
@@ -84030,13 +84195,39 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
84030
84195
  if (options != null) {
84031
84196
  var dismiss = options.dismiss;
84032
84197
  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);
84198
+ return {
84199
+ enable: (_a = dismiss.enable) !== null && _a !== void 0 ? _a : true,
84200
+ tap: this.toDismissTap(dismiss.tap),
84201
+ longPress: this.toDismissLongPress(dismiss.longPress),
84202
+ noSeries: this.toDismissNoSeries(dismiss.noSeries)
84203
+ };
84037
84204
  }
84038
84205
  }
84039
- return UtilGestureModifier.NOT_NONE;
84206
+ return {
84207
+ enable: true,
84208
+ tap: this.toDismissTap(),
84209
+ longPress: this.toDismissLongPress(),
84210
+ noSeries: this.toDismissNoSeries()
84211
+ };
84212
+ };
84213
+ DChartSelectionSimple.prototype.toDismissTap = function (options) {
84214
+ var _a, _b;
84215
+ return {
84216
+ enable: (_a = options === null || options === void 0 ? void 0 : options.enable) !== null && _a !== void 0 ? _a : true,
84217
+ modifier: toEnum((_b = options === null || options === void 0 ? void 0 : options.modifier) !== null && _b !== void 0 ? _b : UtilGestureModifier.NOT_NONE, UtilGestureModifier)
84218
+ };
84219
+ };
84220
+ DChartSelectionSimple.prototype.toDismissLongPress = function (options) {
84221
+ var _a;
84222
+ return {
84223
+ enable: (_a = options === null || options === void 0 ? void 0 : options.enable) !== null && _a !== void 0 ? _a : true
84224
+ };
84225
+ };
84226
+ DChartSelectionSimple.prototype.toDismissNoSeries = function (options) {
84227
+ var _a;
84228
+ return {
84229
+ enable: (_a = options === null || options === void 0 ? void 0 : options.enable) !== null && _a !== void 0 ? _a : true
84230
+ };
84040
84231
  };
84041
84232
  DChartSelectionSimple.prototype.newSelected = function (point, options) {
84042
84233
  return new DChartSelectionSubImpl(this.toSelectedOptions(point, options));
@@ -84090,7 +84281,9 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
84090
84281
  }
84091
84282
  var dismiss = this._dismiss;
84092
84283
  var selected = this._selected;
84093
- if (dismiss != null && UtilGestureModifiers.match(e, dismiss)) {
84284
+ if (dismiss.enable &&
84285
+ dismiss.tap.enable &&
84286
+ UtilGestureModifiers.match(e, dismiss.tap.modifier)) {
84094
84287
  selected.unset();
84095
84288
  }
84096
84289
  else {
@@ -84101,10 +84294,25 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
84101
84294
  selected.set(series, result);
84102
84295
  }
84103
84296
  else {
84104
- selected.unset();
84297
+ if (dismiss.enable && dismiss.noSeries.enable) {
84298
+ selected.unset();
84299
+ }
84300
+ else {
84301
+ selected.set(global_1.x, global_1.y);
84302
+ }
84105
84303
  }
84106
84304
  }
84107
84305
  };
84306
+ DChartSelectionSimple.prototype.onLongPress = function (e) {
84307
+ var container = this._container;
84308
+ if (container == null) {
84309
+ return;
84310
+ }
84311
+ var dismiss = this._dismiss;
84312
+ if (dismiss.enable && dismiss.longPress.enable) {
84313
+ this._selected.unset();
84314
+ }
84315
+ };
84108
84316
  DChartSelectionSimple.prototype.onMove = function (e) {
84109
84317
  var container = this._container;
84110
84318
  if (container == null) {
@@ -84119,7 +84327,7 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
84119
84327
  var result = DChartSelectionSimple.WORK_SELECT;
84120
84328
  var global_2 = e.data.global;
84121
84329
  var series = container.calcHitPoint(global_2.x, global_2.y, result);
84122
- if (series) {
84330
+ if (series != null) {
84123
84331
  hovered.set(series, result);
84124
84332
  }
84125
84333
  else {
@@ -84135,16 +84343,20 @@ var DChartSelectionSimple = /** @class */ (function (_super) {
84135
84343
  this._selected.bind(container);
84136
84344
  this._hovered.bind(container);
84137
84345
  var plotArea = container.plotArea;
84346
+ var plotAreaView = plotArea.view;
84138
84347
  plotArea.on(UtilPointerEvent.move, this._onMoveBound);
84139
- plotArea.view.on("gesturetap", this._onTapBound);
84348
+ plotAreaView.on("gesturetap", this._onTapBound);
84349
+ plotAreaView.on("gesturelongpress", this._onLongPressBound);
84140
84350
  };
84141
84351
  DChartSelectionSimple.prototype.unbind = function () {
84142
84352
  var container = this._container;
84143
84353
  this._container = null;
84144
84354
  if (container != null) {
84145
84355
  var plotArea = container.plotArea;
84356
+ var plotAreaView = plotArea.view;
84146
84357
  plotArea.off(UtilPointerEvent.move, this._onMoveBound);
84147
- plotArea.view.off("gesturetap", this._onTapBound);
84358
+ plotAreaView.off("gesturetap", this._onTapBound);
84359
+ plotAreaView.off("gesturelongpress", this._onLongPressBound);
84148
84360
  }
84149
84361
  this._selected.unbind();
84150
84362
  this._hovered.unbind();