@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
 
@@ -15975,12 +15975,30 @@
15975
15975
  */
15976
15976
  var UtilGestureTap = /** @class */ (function () {
15977
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;
15978
+ if (on != null) {
15979
+ this._onTap = on.tap;
15980
+ this._onLongPress = on.longpress;
15981
+ }
15982
+ this._threshold = this.toThreshold(options);
15981
15983
  this._unused = [];
15982
15984
  this._used = new Map();
15983
15985
  }
15986
+ UtilGestureTap.prototype.toThreshold = function (options) {
15987
+ var _a, _b;
15988
+ if (options != null) {
15989
+ var threshold = options.threshold;
15990
+ if (threshold != null) {
15991
+ return {
15992
+ distance: (_a = threshold.distance) !== null && _a !== void 0 ? _a : 10,
15993
+ long: (_b = threshold.long) !== null && _b !== void 0 ? _b : 500
15994
+ };
15995
+ }
15996
+ }
15997
+ return {
15998
+ distance: 10,
15999
+ long: 500
16000
+ };
16001
+ };
15984
16002
  UtilGestureTap.prototype.newData = function (target) {
15985
16003
  var used = this._used;
15986
16004
  var result = used.get(target);
@@ -16003,6 +16021,11 @@
16003
16021
  var target = data.target;
16004
16022
  if (target) {
16005
16023
  if (this._used.delete(target)) {
16024
+ var timeoutId = data.timeoutId;
16025
+ if (timeoutId != null) {
16026
+ data.timeoutId = undefined;
16027
+ window.clearTimeout(timeoutId);
16028
+ }
16006
16029
  data.target = undefined;
16007
16030
  data.pointers.clear();
16008
16031
  this._unused.push(data);
@@ -16023,7 +16046,7 @@
16023
16046
  };
16024
16047
  UtilGestureTap.prototype.onDown = function (target, e) {
16025
16048
  var _a;
16026
- if (this._onTap == null) {
16049
+ if (this._onTap == null && this._onLongPress == null) {
16027
16050
  return;
16028
16051
  }
16029
16052
  var layer = DApplications.getLayer(target);
@@ -16046,6 +16069,8 @@
16046
16069
  data.start(e);
16047
16070
  // Event handler
16048
16071
  data.bind(e);
16072
+ // Long press
16073
+ this.start(target, data, e);
16049
16074
  }
16050
16075
  };
16051
16076
  UtilGestureTap.prototype.onMove = function (e, data) {
@@ -16098,10 +16123,36 @@
16098
16123
  // Delete this data
16099
16124
  this.deleteData(data);
16100
16125
  };
16126
+ UtilGestureTap.prototype.onLongPress = function (target, data, e) {
16127
+ data.timeoutId = undefined;
16128
+ if (data.distance < this._threshold.distance) {
16129
+ data.distance = this._threshold.distance;
16130
+ var onLongPress = this._onLongPress;
16131
+ if (onLongPress != null) {
16132
+ onLongPress(target, e);
16133
+ }
16134
+ }
16135
+ };
16136
+ UtilGestureTap.prototype.start = function (target, data, e) {
16137
+ var _this = this;
16138
+ var thresholdLong = this._threshold.long;
16139
+ if (0 <= thresholdLong) {
16140
+ data.timeoutId = window.setTimeout(function () {
16141
+ _this.onLongPress(target, data, e);
16142
+ }, thresholdLong);
16143
+ }
16144
+ };
16101
16145
  UtilGestureTap.prototype.end = function (target, data, e) {
16102
- var onTap = this._onTap;
16103
- if (onTap && data.distance < this._threshold) {
16104
- onTap(target, e);
16146
+ var timeoutId = data.timeoutId;
16147
+ if (timeoutId != null) {
16148
+ data.timeoutId = undefined;
16149
+ window.clearTimeout(timeoutId);
16150
+ }
16151
+ if (data.distance < this._threshold.distance) {
16152
+ var onTap = this._onTap;
16153
+ if (onTap) {
16154
+ onTap(target, e);
16155
+ }
16105
16156
  }
16106
16157
  };
16107
16158
  UtilGestureTap.prototype.stop = function (target) {
@@ -16214,7 +16265,7 @@
16214
16265
  UtilGesture.prototype.onDown = function (target, e) {
16215
16266
  var _a;
16216
16267
  if (this._touch && !this.isTouch(e)) {
16217
- return this._tap.onDown(target, e);
16268
+ return;
16218
16269
  }
16219
16270
  if (!this._checkerStart(e, this._modifier, target)) {
16220
16271
  return this._tap.onDown(target, e);
@@ -16249,6 +16300,8 @@
16249
16300
  }
16250
16301
  // Event handler
16251
16302
  data.bind(e);
16303
+ // Tap
16304
+ this._tap.start(target, data, e);
16252
16305
  }
16253
16306
  };
16254
16307
  UtilGesture.prototype.newOnMove = function (data) {
@@ -16437,6 +16490,9 @@
16437
16490
  },
16438
16491
  tap: function (target, e) {
16439
16492
  _this.onTap(target, e);
16493
+ },
16494
+ longpress: function (target, e) {
16495
+ _this.onLongPress(target, e);
16440
16496
  }
16441
16497
  }
16442
16498
  });
@@ -16459,6 +16515,10 @@
16459
16515
  var parent = this._parent;
16460
16516
  parent.emit("gesturetap", target, e, parent);
16461
16517
  };
16518
+ DViewGestureImpl.prototype.onLongPress = function (target, e) {
16519
+ var parent = this._parent;
16520
+ parent.emit("gesturelongpress", target, e, parent);
16521
+ };
16462
16522
  DViewGestureImpl.prototype.onGestureMove = function (target, dx, dy, x, y, ds, work) {
16463
16523
  if (target != null) {
16464
16524
  // Scale
@@ -62001,6 +62061,9 @@
62001
62061
  DChartPlotAreaTwofoldSubBase.prototype.toBoundsDirty = function () {
62002
62062
  this._isContainerBoundsDirty = true;
62003
62063
  };
62064
+ DChartPlotAreaTwofoldSubBase.prototype.toLocal = function (position, from, result, skipUpdate) {
62065
+ return this._plotArea.toLocal(position, from, result, skipUpdate);
62066
+ };
62004
62067
  DChartPlotAreaTwofoldSubBase.prototype.destroy = function () {
62005
62068
  this._container.destroy();
62006
62069
  this._series.destroy();
@@ -62543,7 +62606,7 @@
62543
62606
  DChartSelectionShapeBase.prototype.set = function (container, position, mappedPosition, series) {
62544
62607
  this.update(container, position, mappedPosition, series);
62545
62608
  var shape = this._shape;
62546
- if (shape) {
62609
+ if (shape != null) {
62547
62610
  this._style(shape, series);
62548
62611
  }
62549
62612
  };
@@ -62680,18 +62743,25 @@
62680
62743
  var DChartSelectionSubImpl = /** @class */ (function (_super) {
62681
62744
  __extends(DChartSelectionSubImpl, _super);
62682
62745
  function DChartSelectionSubImpl(options) {
62683
- var _a, _b, _c, _d, _e;
62746
+ var _a, _b, _c;
62684
62747
  var _this = _super.call(this) || this;
62685
62748
  _this._container = null;
62686
62749
  _this._series = null;
62687
62750
  _this._isEnabled = (_a = options.enable) !== null && _a !== void 0 ? _a : true;
62688
- _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));
62751
+ _this._isVisible = false;
62752
+ var gridline = options.gridline;
62753
+ if (gridline != null) {
62754
+ _this._gridline = new DChartSelectionContainerImpl(new DChartSelectionGridlineX(gridline.x), new DChartSelectionGridlineY(gridline.y));
62755
+ }
62756
+ else {
62757
+ _this._gridline = new DChartSelectionContainerImpl(new DChartSelectionGridlineX(), new DChartSelectionGridlineY());
62758
+ }
62689
62759
  _this._marker = new DChartSelectionMarker(options.marker);
62690
- _this._state = (_d = options.state) !== null && _d !== void 0 ? _d : DBaseState.HOVERED;
62760
+ _this._state = (_b = options.state) !== null && _b !== void 0 ? _b : DBaseState.HOVERED;
62691
62761
  _this._coordinateX = null;
62692
62762
  _this._coordinateY = null;
62693
62763
  _this._position = new pixi_js.Point();
62694
- _this._point = (_e = options.point) !== null && _e !== void 0 ? _e : DChartSelectionPoint.CLOSER;
62764
+ _this._point = (_c = options.point) !== null && _c !== void 0 ? _c : DChartSelectionPoint.CLOSER;
62695
62765
  _this._work = new pixi_js.Point();
62696
62766
  // Events
62697
62767
  var on = options.on;
@@ -62719,6 +62789,13 @@
62719
62789
  this._coordinateX = null;
62720
62790
  this._coordinateY = null;
62721
62791
  };
62792
+ Object.defineProperty(DChartSelectionSubImpl.prototype, "visible", {
62793
+ get: function () {
62794
+ return this._isVisible;
62795
+ },
62796
+ enumerable: false,
62797
+ configurable: true
62798
+ });
62722
62799
  Object.defineProperty(DChartSelectionSubImpl.prototype, "series", {
62723
62800
  get: function () {
62724
62801
  return this._series;
@@ -62748,49 +62825,116 @@
62748
62825
  configurable: true
62749
62826
  });
62750
62827
  DChartSelectionSubImpl.prototype.set = function (series, result) {
62828
+ if (isNumber(series)) {
62829
+ this.set1(series, result);
62830
+ }
62831
+ else {
62832
+ this.set2(series, result);
62833
+ }
62834
+ };
62835
+ DChartSelectionSubImpl.prototype.set1 = function (x, y) {
62751
62836
  var container = this._container;
62752
- var coordinateX = (this._coordinateX = series.coordinate.x);
62753
- var coordinateY = (this._coordinateY = series.coordinate.y);
62754
- if (container && coordinateX && coordinateY) {
62755
- var transform = container.plotArea.container.localTransform;
62756
- var position = this._position;
62757
- var work = this._work;
62758
- if (result instanceof DChartSeriesHitResult) {
62759
- var x = result.x;
62760
- var y = result.y;
62761
- switch (this._point) {
62762
- case DChartSelectionPoint.PREVIOUS:
62763
- x = result.p0x;
62764
- y = result.p0y;
62765
- break;
62766
- case DChartSelectionPoint.NEXT:
62767
- x = result.p1x;
62768
- y = result.p1y;
62769
- break;
62770
- case DChartSelectionPoint.CLOSER:
62771
- if (Math.abs(result.p0x - result.x) < Math.abs(result.p1x - result.x)) {
62772
- x = result.p0x;
62773
- y = result.p0y;
62774
- }
62775
- else {
62776
- x = result.p1x;
62777
- y = result.p1y;
62778
- }
62779
- }
62780
- work.set(x, y);
62781
- transform.apply(work, work);
62782
- position.set(coordinateX.unmap(coordinateX.transform.unmap(x)), coordinateY.unmap(coordinateY.transform.unmap(y)));
62783
- }
62784
- else {
62785
- position.copyFrom(result.position);
62786
- work.set(coordinateX.transform.map(coordinateX.map(position.x)), coordinateY.transform.map(coordinateY.map(position.y)));
62787
- transform.apply(work, work);
62837
+ if (container == null) {
62838
+ return;
62839
+ }
62840
+ var work = this._work;
62841
+ work.set(x, y);
62842
+ var plotArea = container.plotArea;
62843
+ plotArea.container.toLocal(work, undefined, work, true);
62844
+ var coordinate = plotArea.coordinate;
62845
+ var coordinateX = coordinate.x.get(0);
62846
+ var coordinateY = coordinate.y.get(0);
62847
+ var newPositionX = work.x;
62848
+ var newPositionY = work.y;
62849
+ if (coordinateX && coordinateY) {
62850
+ newPositionX = coordinateX.unmap(coordinateX.transform.unmap(newPositionX));
62851
+ newPositionY = coordinateY.unmap(coordinateY.transform.unmap(newPositionY));
62852
+ }
62853
+ else {
62854
+ coordinateX = null;
62855
+ coordinateY = null;
62856
+ }
62857
+ var oldSeries = this._series;
62858
+ var position = this._position;
62859
+ if (this._isVisible &&
62860
+ oldSeries == null &&
62861
+ newPositionX === position.x &&
62862
+ newPositionY === position.y) {
62863
+ return;
62864
+ }
62865
+ this._isVisible = true;
62866
+ position.set(newPositionX, newPositionY);
62867
+ this._coordinateX = coordinateX;
62868
+ this._coordinateY = coordinateY;
62869
+ plotArea.container.localTransform.apply(work, work);
62870
+ this._gridline.set(container, position, work, null);
62871
+ this._marker.set(container, position, work, null);
62872
+ if (oldSeries != null) {
62873
+ var state = this._state;
62874
+ if (oldSeries) {
62875
+ oldSeries.state.remove(state);
62788
62876
  }
62789
- this._gridline.set(container, position, work, series);
62790
- this._marker.set(container, position, work, series);
62791
- DApplications.update(container.plotArea);
62877
+ this._series = null;
62878
+ }
62879
+ this.emit("change", this);
62880
+ DApplications.update(plotArea);
62881
+ };
62882
+ DChartSelectionSubImpl.prototype.set2 = function (series, result) {
62883
+ var container = this._container;
62884
+ if (container == null) {
62885
+ return;
62886
+ }
62887
+ var work = this._work;
62888
+ var x = result.x;
62889
+ var y = result.y;
62890
+ switch (this._point) {
62891
+ case DChartSelectionPoint.PREVIOUS:
62892
+ x = result.p0x;
62893
+ y = result.p0y;
62894
+ break;
62895
+ case DChartSelectionPoint.NEXT:
62896
+ x = result.p1x;
62897
+ y = result.p1y;
62898
+ break;
62899
+ case DChartSelectionPoint.CLOSER:
62900
+ if (Math.abs(result.p0x - result.x) < Math.abs(result.p1x - result.x)) {
62901
+ x = result.p0x;
62902
+ y = result.p0y;
62903
+ }
62904
+ else {
62905
+ x = result.p1x;
62906
+ y = result.p1y;
62907
+ }
62908
+ }
62909
+ work.set(x, y);
62910
+ var plotArea = container.plotArea;
62911
+ plotArea.container.localTransform.apply(work, work);
62912
+ var coordinateX = series.coordinate.x;
62913
+ var coordinateY = series.coordinate.y;
62914
+ var newPositionX = x;
62915
+ var newPositionY = y;
62916
+ if (coordinateX && coordinateY) {
62917
+ newPositionX = coordinateX.unmap(coordinateX.transform.unmap(newPositionX));
62918
+ newPositionY = coordinateY.unmap(coordinateY.transform.unmap(newPositionY));
62919
+ }
62920
+ else {
62921
+ coordinateX = null;
62922
+ coordinateY = null;
62792
62923
  }
62793
62924
  var oldSeries = this._series;
62925
+ var position = this._position;
62926
+ if (this._isVisible &&
62927
+ oldSeries === series &&
62928
+ newPositionX === position.x &&
62929
+ newPositionY === position.y) {
62930
+ return;
62931
+ }
62932
+ this._isVisible = true;
62933
+ position.set(newPositionX, newPositionY);
62934
+ this._coordinateX = coordinateX;
62935
+ this._coordinateY = coordinateY;
62936
+ this._gridline.set(container, position, work, series);
62937
+ this._marker.set(container, position, work, series);
62794
62938
  if (oldSeries !== series) {
62795
62939
  var state = this._state;
62796
62940
  if (oldSeries) {
@@ -62800,34 +62944,52 @@
62800
62944
  series.state.add(state);
62801
62945
  }
62802
62946
  this.emit("change", this);
62947
+ DApplications.update(plotArea);
62803
62948
  };
62804
62949
  DChartSelectionSubImpl.prototype.unset = function () {
62805
- var series = this._series;
62806
- if (series) {
62950
+ var container = this._container;
62951
+ if (container == null) {
62952
+ return;
62953
+ }
62954
+ var oldSeries = this._series;
62955
+ if (!this._isVisible && oldSeries == null) {
62956
+ return;
62957
+ }
62958
+ this._isVisible = false;
62959
+ this._coordinateX = null;
62960
+ this._coordinateY = null;
62961
+ this._gridline.unset();
62962
+ this._marker.unset();
62963
+ if (oldSeries != null) {
62807
62964
  this._series = null;
62808
- this._coordinateX = null;
62809
- this._coordinateY = null;
62810
- series.state.remove(this._state);
62811
- this._gridline.unset();
62812
- this._marker.unset();
62813
- this.emit("change", this);
62965
+ oldSeries.state.remove(this._state);
62814
62966
  }
62967
+ this.emit("change", this);
62968
+ DApplications.update(container.plotArea);
62815
62969
  };
62816
62970
  DChartSelectionSubImpl.prototype.update = function () {
62817
62971
  var container = this._container;
62972
+ if (container == null) {
62973
+ return false;
62974
+ }
62975
+ if (!this._isVisible) {
62976
+ return false;
62977
+ }
62978
+ var position = this._position;
62979
+ var work = this._work;
62818
62980
  var coordinateX = this._coordinateX;
62819
62981
  var coordinateY = this._coordinateY;
62820
- if (container && coordinateX && coordinateY) {
62821
- var position = this._position;
62822
- var work = this._work;
62982
+ if (coordinateX && coordinateY) {
62823
62983
  work.set(coordinateX.transform.map(coordinateX.map(position.x)), coordinateY.transform.map(coordinateY.map(position.y)));
62824
- container.plotArea.container.localTransform.apply(work, work);
62825
- var series = this._series;
62826
- var isGridlineUpdated = this._gridline.update(container, position, work, series);
62827
- var isMarkerUpdated = this._marker.update(container, position, work, series);
62828
- return isGridlineUpdated || isMarkerUpdated;
62829
62984
  }
62830
- return false;
62985
+ else {
62986
+ work.copyFrom(position);
62987
+ }
62988
+ container.plotArea.container.localTransform.apply(work, work);
62989
+ var series = this._series;
62990
+ var isGridlineUpdated = this._gridline.update(container, position, work, series);
62991
+ var isMarkerUpdated = this._marker.update(container, position, work, series);
62992
+ return isGridlineUpdated || isMarkerUpdated;
62831
62993
  };
62832
62994
  return DChartSelectionSubImpl;
62833
62995
  }(pixi_js.utils.EventEmitter));
@@ -62862,6 +63024,9 @@
62862
63024
  _this._onTapBound = function (target, e) {
62863
63025
  _this.onTap(e);
62864
63026
  };
63027
+ _this._onLongPressBound = function (target, e) {
63028
+ _this.onLongPress(e);
63029
+ };
62865
63030
  return _this;
62866
63031
  }
62867
63032
  DChartSelectionSimple.prototype.toDismiss = function (options) {
@@ -62869,13 +63034,39 @@
62869
63034
  if (options != null) {
62870
63035
  var dismiss = options.dismiss;
62871
63036
  if (dismiss != null) {
62872
- if (dismiss.enable === false) {
62873
- return undefined;
62874
- }
62875
- return toEnum((_a = dismiss.modifier) !== null && _a !== void 0 ? _a : UtilGestureModifier.NOT_NONE, UtilGestureModifier);
63037
+ return {
63038
+ enable: (_a = dismiss.enable) !== null && _a !== void 0 ? _a : true,
63039
+ tap: this.toDismissTap(dismiss.tap),
63040
+ longPress: this.toDismissLongPress(dismiss.longPress),
63041
+ noSeries: this.toDismissNoSeries(dismiss.noSeries)
63042
+ };
62876
63043
  }
62877
63044
  }
62878
- return UtilGestureModifier.NOT_NONE;
63045
+ return {
63046
+ enable: true,
63047
+ tap: this.toDismissTap(),
63048
+ longPress: this.toDismissLongPress(),
63049
+ noSeries: this.toDismissNoSeries()
63050
+ };
63051
+ };
63052
+ DChartSelectionSimple.prototype.toDismissTap = function (options) {
63053
+ var _a, _b;
63054
+ return {
63055
+ enable: (_a = options === null || options === void 0 ? void 0 : options.enable) !== null && _a !== void 0 ? _a : true,
63056
+ modifier: toEnum((_b = options === null || options === void 0 ? void 0 : options.modifier) !== null && _b !== void 0 ? _b : UtilGestureModifier.NOT_NONE, UtilGestureModifier)
63057
+ };
63058
+ };
63059
+ DChartSelectionSimple.prototype.toDismissLongPress = function (options) {
63060
+ var _a;
63061
+ return {
63062
+ enable: (_a = options === null || options === void 0 ? void 0 : options.enable) !== null && _a !== void 0 ? _a : true
63063
+ };
63064
+ };
63065
+ DChartSelectionSimple.prototype.toDismissNoSeries = function (options) {
63066
+ var _a;
63067
+ return {
63068
+ enable: (_a = options === null || options === void 0 ? void 0 : options.enable) !== null && _a !== void 0 ? _a : true
63069
+ };
62879
63070
  };
62880
63071
  DChartSelectionSimple.prototype.newSelected = function (point, options) {
62881
63072
  return new DChartSelectionSubImpl(this.toSelectedOptions(point, options));
@@ -62929,7 +63120,9 @@
62929
63120
  }
62930
63121
  var dismiss = this._dismiss;
62931
63122
  var selected = this._selected;
62932
- if (dismiss != null && UtilGestureModifiers.match(e, dismiss)) {
63123
+ if (dismiss.enable &&
63124
+ dismiss.tap.enable &&
63125
+ UtilGestureModifiers.match(e, dismiss.tap.modifier)) {
62933
63126
  selected.unset();
62934
63127
  }
62935
63128
  else {
@@ -62940,10 +63133,25 @@
62940
63133
  selected.set(series, result);
62941
63134
  }
62942
63135
  else {
62943
- selected.unset();
63136
+ if (dismiss.enable && dismiss.noSeries.enable) {
63137
+ selected.unset();
63138
+ }
63139
+ else {
63140
+ selected.set(global_1.x, global_1.y);
63141
+ }
62944
63142
  }
62945
63143
  }
62946
63144
  };
63145
+ DChartSelectionSimple.prototype.onLongPress = function (e) {
63146
+ var container = this._container;
63147
+ if (container == null) {
63148
+ return;
63149
+ }
63150
+ var dismiss = this._dismiss;
63151
+ if (dismiss.enable && dismiss.longPress.enable) {
63152
+ this._selected.unset();
63153
+ }
63154
+ };
62947
63155
  DChartSelectionSimple.prototype.onMove = function (e) {
62948
63156
  var container = this._container;
62949
63157
  if (container == null) {
@@ -62958,7 +63166,7 @@
62958
63166
  var result = DChartSelectionSimple.WORK_SELECT;
62959
63167
  var global_2 = e.data.global;
62960
63168
  var series = container.calcHitPoint(global_2.x, global_2.y, result);
62961
- if (series) {
63169
+ if (series != null) {
62962
63170
  hovered.set(series, result);
62963
63171
  }
62964
63172
  else {
@@ -62974,16 +63182,20 @@
62974
63182
  this._selected.bind(container);
62975
63183
  this._hovered.bind(container);
62976
63184
  var plotArea = container.plotArea;
63185
+ var plotAreaView = plotArea.view;
62977
63186
  plotArea.on(UtilPointerEvent.move, this._onMoveBound);
62978
- plotArea.view.on("gesturetap", this._onTapBound);
63187
+ plotAreaView.on("gesturetap", this._onTapBound);
63188
+ plotAreaView.on("gesturelongpress", this._onLongPressBound);
62979
63189
  };
62980
63190
  DChartSelectionSimple.prototype.unbind = function () {
62981
63191
  var container = this._container;
62982
63192
  this._container = null;
62983
63193
  if (container != null) {
62984
63194
  var plotArea = container.plotArea;
63195
+ var plotAreaView = plotArea.view;
62985
63196
  plotArea.off(UtilPointerEvent.move, this._onMoveBound);
62986
- plotArea.view.off("gesturetap", this._onTapBound);
63197
+ plotAreaView.off("gesturetap", this._onTapBound);
63198
+ plotAreaView.off("gesturelongpress", this._onLongPressBound);
62987
63199
  }
62988
63200
  this._selected.unbind();
62989
63201
  this._hovered.unbind();