@visactor/vchart 1.13.22-alpha.3 → 1.13.22-alpha.4
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/es5/index.js +1 -1
- package/build/index.es.js +8 -14
- package/build/index.js +8 -14
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +2 -3
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/interface.js +2 -1
- package/cjs/plugin/chart/scroll/scroll.js +14 -14
- package/cjs/plugin/chart/scroll/scroll.js.map +1 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +2 -3
- package/esm/core/index.js.map +1 -1
- package/esm/core/interface.js +2 -1
- package/esm/plugin/chart/scroll/scroll.js +13 -14
- package/esm/plugin/chart/scroll/scroll.js.map +1 -1
- 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.
|
|
64291
|
+
const version = "1.13.22-alpha.4";
|
|
64292
64292
|
|
|
64293
64293
|
const addVChartProperty = (data, op) => {
|
|
64294
64294
|
const context = op.beforeCall();
|
|
@@ -104744,18 +104744,12 @@ class ScrollPlugin extends BasePlugin {
|
|
|
104744
104744
|
const { percent: yPercent, y } = (_a = this._computeFinalScrollY(rootMark.attribute.y - scrollY)) !== null && _a !== void 0 ? _a : {};
|
|
104745
104745
|
const { percent: xPercent, x } = (_b = this._computeFinalScrollX(rootMark.attribute.x - scrollX)) !== null && _b !== void 0 ? _b : {};
|
|
104746
104746
|
const eventResult = {};
|
|
104747
|
-
|
|
104747
|
+
const isScroll = isValidNumber$1(x) || isValidNumber$1(y);
|
|
104748
104748
|
if (isValidNumber$1(x)) {
|
|
104749
|
-
if (e.deltaMode !== 0 && this._lastScrollX !== x) {
|
|
104750
|
-
isScroll = true;
|
|
104751
|
-
}
|
|
104752
104749
|
this._updateScrollX(rootMark, x, xPercent);
|
|
104753
104750
|
eventResult.x = x;
|
|
104754
104751
|
}
|
|
104755
104752
|
if (isValidNumber$1(y)) {
|
|
104756
|
-
if (e.deltaMode !== 0 && this._lastScrollY !== y) {
|
|
104757
|
-
isScroll = true;
|
|
104758
|
-
}
|
|
104759
104753
|
this._updateScrollY(rootMark, y, yPercent);
|
|
104760
104754
|
eventResult.y = y;
|
|
104761
104755
|
}
|
|
@@ -104821,6 +104815,7 @@ class ScrollPlugin extends BasePlugin {
|
|
|
104821
104815
|
}
|
|
104822
104816
|
_computeFinalScrollY(y) {
|
|
104823
104817
|
var _a;
|
|
104818
|
+
y = Math.max(this._scrollLimit.y.min, Math.min(y, this._scrollLimit.y.max));
|
|
104824
104819
|
if (this._lastScrollY === y) {
|
|
104825
104820
|
return null;
|
|
104826
104821
|
}
|
|
@@ -104828,15 +104823,15 @@ class ScrollPlugin extends BasePlugin {
|
|
|
104828
104823
|
if (((_a = this._spec.y) === null || _a === void 0 ? void 0 : _a.enable) === false) {
|
|
104829
104824
|
return null;
|
|
104830
104825
|
}
|
|
104831
|
-
const
|
|
104832
|
-
const percent = Math.abs(finalY / this._scrollLimit.y.size);
|
|
104826
|
+
const percent = Math.abs(y / this._scrollLimit.y.size);
|
|
104833
104827
|
return {
|
|
104834
|
-
y
|
|
104828
|
+
y,
|
|
104835
104829
|
percent
|
|
104836
104830
|
};
|
|
104837
104831
|
}
|
|
104838
104832
|
_computeFinalScrollX(x) {
|
|
104839
104833
|
var _a;
|
|
104834
|
+
x = Math.max(this._scrollLimit.x.min, Math.min(x, this._scrollLimit.x.max));
|
|
104840
104835
|
if (this._lastScrollX === x) {
|
|
104841
104836
|
return null;
|
|
104842
104837
|
}
|
|
@@ -104844,10 +104839,9 @@ class ScrollPlugin extends BasePlugin {
|
|
|
104844
104839
|
if (((_a = this._spec.x) === null || _a === void 0 ? void 0 : _a.enable) === false) {
|
|
104845
104840
|
return null;
|
|
104846
104841
|
}
|
|
104847
|
-
const
|
|
104848
|
-
const percent = Math.abs(finalX / this._scrollLimit.x.size);
|
|
104842
|
+
const percent = Math.abs(x / this._scrollLimit.x.size);
|
|
104849
104843
|
return {
|
|
104850
|
-
x
|
|
104844
|
+
x,
|
|
104851
104845
|
percent
|
|
104852
104846
|
};
|
|
104853
104847
|
}
|
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.
|
|
64297
|
+
const version = "1.13.22-alpha.4";
|
|
64298
64298
|
|
|
64299
64299
|
const addVChartProperty = (data, op) => {
|
|
64300
64300
|
const context = op.beforeCall();
|
|
@@ -104750,18 +104750,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
104750
104750
|
const { percent: yPercent, y } = (_a = this._computeFinalScrollY(rootMark.attribute.y - scrollY)) !== null && _a !== void 0 ? _a : {};
|
|
104751
104751
|
const { percent: xPercent, x } = (_b = this._computeFinalScrollX(rootMark.attribute.x - scrollX)) !== null && _b !== void 0 ? _b : {};
|
|
104752
104752
|
const eventResult = {};
|
|
104753
|
-
|
|
104753
|
+
const isScroll = isValidNumber$1(x) || isValidNumber$1(y);
|
|
104754
104754
|
if (isValidNumber$1(x)) {
|
|
104755
|
-
if (e.deltaMode !== 0 && this._lastScrollX !== x) {
|
|
104756
|
-
isScroll = true;
|
|
104757
|
-
}
|
|
104758
104755
|
this._updateScrollX(rootMark, x, xPercent);
|
|
104759
104756
|
eventResult.x = x;
|
|
104760
104757
|
}
|
|
104761
104758
|
if (isValidNumber$1(y)) {
|
|
104762
|
-
if (e.deltaMode !== 0 && this._lastScrollY !== y) {
|
|
104763
|
-
isScroll = true;
|
|
104764
|
-
}
|
|
104765
104759
|
this._updateScrollY(rootMark, y, yPercent);
|
|
104766
104760
|
eventResult.y = y;
|
|
104767
104761
|
}
|
|
@@ -104827,6 +104821,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
104827
104821
|
}
|
|
104828
104822
|
_computeFinalScrollY(y) {
|
|
104829
104823
|
var _a;
|
|
104824
|
+
y = Math.max(this._scrollLimit.y.min, Math.min(y, this._scrollLimit.y.max));
|
|
104830
104825
|
if (this._lastScrollY === y) {
|
|
104831
104826
|
return null;
|
|
104832
104827
|
}
|
|
@@ -104834,15 +104829,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
104834
104829
|
if (((_a = this._spec.y) === null || _a === void 0 ? void 0 : _a.enable) === false) {
|
|
104835
104830
|
return null;
|
|
104836
104831
|
}
|
|
104837
|
-
const
|
|
104838
|
-
const percent = Math.abs(finalY / this._scrollLimit.y.size);
|
|
104832
|
+
const percent = Math.abs(y / this._scrollLimit.y.size);
|
|
104839
104833
|
return {
|
|
104840
|
-
y
|
|
104834
|
+
y,
|
|
104841
104835
|
percent
|
|
104842
104836
|
};
|
|
104843
104837
|
}
|
|
104844
104838
|
_computeFinalScrollX(x) {
|
|
104845
104839
|
var _a;
|
|
104840
|
+
x = Math.max(this._scrollLimit.x.min, Math.min(x, this._scrollLimit.x.max));
|
|
104846
104841
|
if (this._lastScrollX === x) {
|
|
104847
104842
|
return null;
|
|
104848
104843
|
}
|
|
@@ -104850,10 +104845,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
104850
104845
|
if (((_a = this._spec.x) === null || _a === void 0 ? void 0 : _a.enable) === false) {
|
|
104851
104846
|
return null;
|
|
104852
104847
|
}
|
|
104853
|
-
const
|
|
104854
|
-
const percent = Math.abs(finalX / this._scrollLimit.x.size);
|
|
104848
|
+
const percent = Math.abs(x / this._scrollLimit.x.size);
|
|
104855
104849
|
return {
|
|
104856
|
-
x
|
|
104850
|
+
x,
|
|
104857
104851
|
percent
|
|
104858
104852
|
};
|
|
104859
104853
|
}
|