@visactor/vchart 1.13.22-alpha.1 → 1.13.22-alpha.3

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 (40) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.es.js +14 -5
  3. package/build/index.js +14 -5
  4. package/build/index.min.js +1 -1
  5. package/build/tsconfig.tsbuildinfo +1 -1
  6. package/cjs/animation/config.js +2 -1
  7. package/cjs/animation/utils.js +1 -2
  8. package/cjs/constant/funnel.js +1 -2
  9. package/cjs/constant/scatter.js +2 -1
  10. package/cjs/core/index.d.ts +1 -1
  11. package/cjs/core/index.js +1 -1
  12. package/cjs/core/index.js.map +1 -1
  13. package/cjs/core/interface.js +1 -2
  14. package/cjs/core/vchart.js +2 -1
  15. package/cjs/env/env.js +1 -1
  16. package/cjs/env/index.js +1 -1
  17. package/cjs/event/bubble.js +1 -1
  18. package/cjs/interaction/config.js +1 -1
  19. package/cjs/interaction/dimension-trigger.js +1 -1
  20. package/cjs/interaction/index.js +1 -1
  21. package/cjs/plugin/chart/scroll/scroll.js +5 -4
  22. package/cjs/plugin/chart/scroll/scroll.js.map +1 -1
  23. package/esm/animation/config.js +2 -1
  24. package/esm/animation/utils.js +1 -2
  25. package/esm/constant/funnel.js +1 -2
  26. package/esm/constant/scatter.js +2 -1
  27. package/esm/core/index.d.ts +1 -1
  28. package/esm/core/index.js +1 -1
  29. package/esm/core/index.js.map +1 -1
  30. package/esm/core/interface.js +1 -2
  31. package/esm/core/vchart.js +2 -1
  32. package/esm/env/env.js +1 -1
  33. package/esm/env/index.js +1 -1
  34. package/esm/event/bubble.js +1 -1
  35. package/esm/interaction/config.js +1 -1
  36. package/esm/interaction/dimension-trigger.js +1 -1
  37. package/esm/interaction/index.js +1 -1
  38. package/esm/plugin/chart/scroll/scroll.js +5 -4
  39. package/esm/plugin/chart/scroll/scroll.js.map +1 -1
  40. package/package.json +4 -4
package/build/index.es.js CHANGED
@@ -64288,7 +64288,7 @@ const registerVChartCore = () => {
64288
64288
  };
64289
64289
  registerVChartCore();
64290
64290
 
64291
- const version = "1.13.22-alpha.1";
64291
+ const version = "1.13.22-alpha.3";
64292
64292
 
64293
64293
  const addVChartProperty = (data, op) => {
64294
64294
  const context = op.beforeCall();
@@ -104735,10 +104735,6 @@ class ScrollPlugin extends BasePlugin {
104735
104735
  };
104736
104736
  this.onWheel = (e) => {
104737
104737
  var _a, _b;
104738
- if (this._spec.preventDefault !== false) {
104739
- e.preventDefault();
104740
- e.stopPropagation();
104741
- }
104742
104738
  const scrollX = e.deltaX;
104743
104739
  const scrollY = e.deltaY;
104744
104740
  const rootMark = this.getRootMark();
@@ -104748,14 +104744,27 @@ class ScrollPlugin extends BasePlugin {
104748
104744
  const { percent: yPercent, y } = (_a = this._computeFinalScrollY(rootMark.attribute.y - scrollY)) !== null && _a !== void 0 ? _a : {};
104749
104745
  const { percent: xPercent, x } = (_b = this._computeFinalScrollX(rootMark.attribute.x - scrollX)) !== null && _b !== void 0 ? _b : {};
104750
104746
  const eventResult = {};
104747
+ let isScroll = false;
104751
104748
  if (isValidNumber$1(x)) {
104749
+ if (e.deltaMode !== 0 && this._lastScrollX !== x) {
104750
+ isScroll = true;
104751
+ }
104752
104752
  this._updateScrollX(rootMark, x, xPercent);
104753
104753
  eventResult.x = x;
104754
104754
  }
104755
104755
  if (isValidNumber$1(y)) {
104756
+ if (e.deltaMode !== 0 && this._lastScrollY !== y) {
104757
+ isScroll = true;
104758
+ }
104756
104759
  this._updateScrollY(rootMark, y, yPercent);
104757
104760
  eventResult.y = y;
104758
104761
  }
104762
+ if (isScroll) {
104763
+ if (this._spec.preventDefault !== false) {
104764
+ e.preventDefault();
104765
+ e.stopPropagation();
104766
+ }
104767
+ }
104759
104768
  this._event.emit('chartScroll', eventResult);
104760
104769
  };
104761
104770
  }
package/build/index.js CHANGED
@@ -64294,7 +64294,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
64294
64294
  };
64295
64295
  registerVChartCore();
64296
64296
 
64297
- const version = "1.13.22-alpha.1";
64297
+ const version = "1.13.22-alpha.3";
64298
64298
 
64299
64299
  const addVChartProperty = (data, op) => {
64300
64300
  const context = op.beforeCall();
@@ -104741,10 +104741,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
104741
104741
  };
104742
104742
  this.onWheel = (e) => {
104743
104743
  var _a, _b;
104744
- if (this._spec.preventDefault !== false) {
104745
- e.preventDefault();
104746
- e.stopPropagation();
104747
- }
104748
104744
  const scrollX = e.deltaX;
104749
104745
  const scrollY = e.deltaY;
104750
104746
  const rootMark = this.getRootMark();
@@ -104754,14 +104750,27 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
104754
104750
  const { percent: yPercent, y } = (_a = this._computeFinalScrollY(rootMark.attribute.y - scrollY)) !== null && _a !== void 0 ? _a : {};
104755
104751
  const { percent: xPercent, x } = (_b = this._computeFinalScrollX(rootMark.attribute.x - scrollX)) !== null && _b !== void 0 ? _b : {};
104756
104752
  const eventResult = {};
104753
+ let isScroll = false;
104757
104754
  if (isValidNumber$1(x)) {
104755
+ if (e.deltaMode !== 0 && this._lastScrollX !== x) {
104756
+ isScroll = true;
104757
+ }
104758
104758
  this._updateScrollX(rootMark, x, xPercent);
104759
104759
  eventResult.x = x;
104760
104760
  }
104761
104761
  if (isValidNumber$1(y)) {
104762
+ if (e.deltaMode !== 0 && this._lastScrollY !== y) {
104763
+ isScroll = true;
104764
+ }
104762
104765
  this._updateScrollY(rootMark, y, yPercent);
104763
104766
  eventResult.y = y;
104764
104767
  }
104768
+ if (isScroll) {
104769
+ if (this._spec.preventDefault !== false) {
104770
+ e.preventDefault();
104771
+ e.stopPropagation();
104772
+ }
104773
+ }
104765
104774
  this._event.emit('chartScroll', eventResult);
104766
104775
  };
104767
104776
  }