@visactor/vchart 2.0.11-alpha.0 → 2.0.11-alpha.1

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.
package/build/index.es.js CHANGED
@@ -61532,7 +61532,7 @@ const lookup = (data, opt) => {
61532
61532
  });
61533
61533
  };
61534
61534
 
61535
- const version = "2.0.11-alpha.0";
61535
+ const version = "2.0.11-alpha.1";
61536
61536
 
61537
61537
  const addVChartProperty = (data, op) => {
61538
61538
  const context = op.beforeCall();
@@ -95882,7 +95882,10 @@ class Tooltip extends BaseComponent {
95882
95882
  for (let i = 0, len = supportedTooltip.length; i < len; i++) {
95883
95883
  const type = supportedTooltip[i];
95884
95884
  const res = this.processor[type] ? this._showTooltipByMouseEvent(type, mouseEventData, params, isClick) : false;
95885
- if (res) {
95885
+ if (res === 'unShowByOption') {
95886
+ success[type] = 'unShowByOption';
95887
+ }
95888
+ else {
95886
95889
  success[type] = true;
95887
95890
  break;
95888
95891
  }
@@ -95896,22 +95899,20 @@ class Tooltip extends BaseComponent {
95896
95899
  }
95897
95900
  }
95898
95901
  if (!success.mark && !success.group && (!success.dimension || isNil$1(dimensionInfo))) {
95899
- this._handleChartMouseOut(params);
95902
+ if (success.mark !== 'unShowByOption' &&
95903
+ success.dimension !== 'unShowByOption' &&
95904
+ success.group !== 'unShowByOption') {
95905
+ this._handleChartMouseOut(params);
95906
+ }
95900
95907
  }
95901
95908
  else {
95902
95909
  this._initEventOfTooltipContent();
95903
95910
  }
95904
95911
  };
95905
95912
  this._showTooltipByMouseEvent = (activeType, mouseEventData, params, isClick, useCache) => {
95906
- var _a, _b;
95907
- if ((_a = this._option) === null || _a === void 0 ? void 0 : _a.componentShowContent) {
95908
- if (this._option.componentShowContent.tooltip === false) {
95909
- return false;
95910
- }
95911
- if (isObject$2(this._option.componentShowContent.tooltip) &&
95912
- this._option.componentShowContent.tooltip[activeType] === false) {
95913
- return false;
95914
- }
95913
+ var _a;
95914
+ if (!this._showContentByEvent(activeType)) {
95915
+ return 'unShowByOption';
95915
95916
  }
95916
95917
  const processor = this.processor[activeType];
95917
95918
  if (!processor.shouldHandleTooltip(params, mouseEventData.tooltipInfo[activeType])) {
@@ -95945,7 +95946,7 @@ class Tooltip extends BaseComponent {
95945
95946
  }, this._spec.hideTimer);
95946
95947
  }
95947
95948
  }
95948
- const vchart = (_b = this._option) === null || _b === void 0 ? void 0 : _b.globalInstance;
95949
+ const vchart = (_a = this._option) === null || _a === void 0 ? void 0 : _a.globalInstance;
95949
95950
  if (success && VChart.globalConfig.uniqueTooltip && vchart) {
95950
95951
  VChart.hideTooltip(vchart.id);
95951
95952
  }
@@ -96170,6 +96171,19 @@ class Tooltip extends BaseComponent {
96170
96171
  }
96171
96172
  return throttle(callback, wait);
96172
96173
  }
96174
+ _showContentByEvent(activeType) {
96175
+ var _a;
96176
+ if ((_a = this._option) === null || _a === void 0 ? void 0 : _a.componentShowContent) {
96177
+ if (this._option.componentShowContent.tooltip === false) {
96178
+ return false;
96179
+ }
96180
+ if (isObject$2(this._option.componentShowContent.tooltip) &&
96181
+ this._option.componentShowContent.tooltip[activeType] === false) {
96182
+ return false;
96183
+ }
96184
+ }
96185
+ return true;
96186
+ }
96173
96187
  reInit(spec) {
96174
96188
  var _a, _b, _c;
96175
96189
  super.reInit(spec);
@@ -96526,7 +96540,7 @@ class BaseCrossHair extends BaseComponent {
96526
96540
  }
96527
96541
  _registerEvent(eventName, isOut, click) {
96528
96542
  var _a;
96529
- if (!isOut && ((_a = this._option.componentShowContent) === null || _a === void 0 ? void 0 : _a.crosshair) === false) {
96543
+ if (((_a = this._option.componentShowContent) === null || _a === void 0 ? void 0 : _a.crosshair) === false) {
96530
96544
  return;
96531
96545
  }
96532
96546
  const handler = isOut ? this._handleOutEvent : click ? this._handleClickInEvent : this._handleHoverInEvent;
package/build/index.js CHANGED
@@ -61538,7 +61538,7 @@
61538
61538
  });
61539
61539
  };
61540
61540
 
61541
- const version = "2.0.11-alpha.0";
61541
+ const version = "2.0.11-alpha.1";
61542
61542
 
61543
61543
  const addVChartProperty = (data, op) => {
61544
61544
  const context = op.beforeCall();
@@ -95888,7 +95888,10 @@
95888
95888
  for (let i = 0, len = supportedTooltip.length; i < len; i++) {
95889
95889
  const type = supportedTooltip[i];
95890
95890
  const res = this.processor[type] ? this._showTooltipByMouseEvent(type, mouseEventData, params, isClick) : false;
95891
- if (res) {
95891
+ if (res === 'unShowByOption') {
95892
+ success[type] = 'unShowByOption';
95893
+ }
95894
+ else {
95892
95895
  success[type] = true;
95893
95896
  break;
95894
95897
  }
@@ -95902,22 +95905,20 @@
95902
95905
  }
95903
95906
  }
95904
95907
  if (!success.mark && !success.group && (!success.dimension || isNil$1(dimensionInfo))) {
95905
- this._handleChartMouseOut(params);
95908
+ if (success.mark !== 'unShowByOption' &&
95909
+ success.dimension !== 'unShowByOption' &&
95910
+ success.group !== 'unShowByOption') {
95911
+ this._handleChartMouseOut(params);
95912
+ }
95906
95913
  }
95907
95914
  else {
95908
95915
  this._initEventOfTooltipContent();
95909
95916
  }
95910
95917
  };
95911
95918
  this._showTooltipByMouseEvent = (activeType, mouseEventData, params, isClick, useCache) => {
95912
- var _a, _b;
95913
- if ((_a = this._option) === null || _a === void 0 ? void 0 : _a.componentShowContent) {
95914
- if (this._option.componentShowContent.tooltip === false) {
95915
- return false;
95916
- }
95917
- if (isObject$2(this._option.componentShowContent.tooltip) &&
95918
- this._option.componentShowContent.tooltip[activeType] === false) {
95919
- return false;
95920
- }
95919
+ var _a;
95920
+ if (!this._showContentByEvent(activeType)) {
95921
+ return 'unShowByOption';
95921
95922
  }
95922
95923
  const processor = this.processor[activeType];
95923
95924
  if (!processor.shouldHandleTooltip(params, mouseEventData.tooltipInfo[activeType])) {
@@ -95951,7 +95952,7 @@
95951
95952
  }, this._spec.hideTimer);
95952
95953
  }
95953
95954
  }
95954
- const vchart = (_b = this._option) === null || _b === void 0 ? void 0 : _b.globalInstance;
95955
+ const vchart = (_a = this._option) === null || _a === void 0 ? void 0 : _a.globalInstance;
95955
95956
  if (success && VChart.globalConfig.uniqueTooltip && vchart) {
95956
95957
  VChart.hideTooltip(vchart.id);
95957
95958
  }
@@ -96176,6 +96177,19 @@
96176
96177
  }
96177
96178
  return throttle(callback, wait);
96178
96179
  }
96180
+ _showContentByEvent(activeType) {
96181
+ var _a;
96182
+ if ((_a = this._option) === null || _a === void 0 ? void 0 : _a.componentShowContent) {
96183
+ if (this._option.componentShowContent.tooltip === false) {
96184
+ return false;
96185
+ }
96186
+ if (isObject$2(this._option.componentShowContent.tooltip) &&
96187
+ this._option.componentShowContent.tooltip[activeType] === false) {
96188
+ return false;
96189
+ }
96190
+ }
96191
+ return true;
96192
+ }
96179
96193
  reInit(spec) {
96180
96194
  var _a, _b, _c;
96181
96195
  super.reInit(spec);
@@ -96532,7 +96546,7 @@
96532
96546
  }
96533
96547
  _registerEvent(eventName, isOut, click) {
96534
96548
  var _a;
96535
- if (!isOut && ((_a = this._option.componentShowContent) === null || _a === void 0 ? void 0 : _a.crosshair) === false) {
96549
+ if (((_a = this._option.componentShowContent) === null || _a === void 0 ? void 0 : _a.crosshair) === false) {
96536
96550
  return;
96537
96551
  }
96538
96552
  const handler = isOut ? this._handleOutEvent : click ? this._handleClickInEvent : this._handleHoverInEvent;