@visactor/vchart 2.0.20-alpha.0 → 2.0.20-alpha.2
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 +29 -9
- package/build/index.js +29 -9
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/compile/compiler.d.ts +2 -0
- package/cjs/compile/compiler.js +14 -2
- package/cjs/compile/compiler.js.map +1 -1
- package/cjs/compile/mark/interface.d.ts +0 -1
- package/cjs/compile/mark/interface.js.map +1 -1
- package/cjs/compile/mark/mark-state-manager.d.ts +0 -1
- package/cjs/compile/mark/mark-state-manager.js +0 -3
- package/cjs/compile/mark/mark-state-manager.js.map +1 -1
- package/cjs/mark/base/base-mark.d.ts +0 -1
- package/cjs/mark/base/base-mark.js +0 -3
- package/cjs/mark/base/base-mark.js.map +1 -1
- package/cjs/mark/interface/common.d.ts +0 -1
- package/cjs/mark/interface/common.js.map +1 -1
- package/cjs/series/base/base-series.js +1 -1
- package/cjs/series/base/base-series.js.map +1 -1
- package/esm/compile/compiler.d.ts +2 -0
- package/esm/compile/compiler.js +14 -2
- package/esm/compile/compiler.js.map +1 -1
- package/esm/compile/mark/interface.d.ts +0 -1
- package/esm/compile/mark/interface.js.map +1 -1
- package/esm/compile/mark/mark-state-manager.d.ts +0 -1
- package/esm/compile/mark/mark-state-manager.js +0 -3
- package/esm/compile/mark/mark-state-manager.js.map +1 -1
- package/esm/mark/base/base-mark.d.ts +0 -1
- package/esm/mark/base/base-mark.js +0 -3
- package/esm/mark/base/base-mark.js.map +1 -1
- package/esm/mark/interface/common.d.ts +0 -1
- package/esm/mark/interface/common.js.map +1 -1
- package/esm/series/base/base-series.js +1 -1
- package/esm/series/base/base-series.js.map +1 -1
- package/package.json +4 -4
package/build/index.es.js
CHANGED
|
@@ -55091,6 +55091,33 @@ class Compiler {
|
|
|
55091
55091
|
updateLayoutTag() {
|
|
55092
55092
|
this._layoutState = LayoutState.before;
|
|
55093
55093
|
}
|
|
55094
|
+
_isGeoRegionRoamDragEnabled() {
|
|
55095
|
+
var _a, _b;
|
|
55096
|
+
const chartSpec = (_b = (_a = this._compileChart) === null || _a === void 0 ? void 0 : _a.getSpec) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
55097
|
+
const regions = chartSpec === null || chartSpec === void 0 ? void 0 : chartSpec.region;
|
|
55098
|
+
if (!isArray$1(regions)) {
|
|
55099
|
+
return false;
|
|
55100
|
+
}
|
|
55101
|
+
return regions.some((region) => {
|
|
55102
|
+
var _a;
|
|
55103
|
+
if ((region === null || region === void 0 ? void 0 : region.coordinate) !== 'geo' || !region.roam) {
|
|
55104
|
+
return false;
|
|
55105
|
+
}
|
|
55106
|
+
if (region.roam === true) {
|
|
55107
|
+
return true;
|
|
55108
|
+
}
|
|
55109
|
+
return (_a = region.roam.drag) !== null && _a !== void 0 ? _a : true;
|
|
55110
|
+
});
|
|
55111
|
+
}
|
|
55112
|
+
_shouldDisableCanvasTouchAction() {
|
|
55113
|
+
if (!isTrueBrowser(this._option.mode)) {
|
|
55114
|
+
return false;
|
|
55115
|
+
}
|
|
55116
|
+
const supportsTouchEvents = isValid$1(this._option.supportsTouchEvents)
|
|
55117
|
+
? this._option.supportsTouchEvents
|
|
55118
|
+
: vglobal.supportsTouchEvents;
|
|
55119
|
+
return supportsTouchEvents === false && this._isGeoRegionRoamDragEnabled();
|
|
55120
|
+
}
|
|
55094
55121
|
_setCanvasStyle() {
|
|
55095
55122
|
if (!this._stage) {
|
|
55096
55123
|
return;
|
|
@@ -55101,6 +55128,7 @@ class Compiler {
|
|
|
55101
55128
|
const canvas = this.getCanvas();
|
|
55102
55129
|
if (canvas) {
|
|
55103
55130
|
canvas.style.display = 'block';
|
|
55131
|
+
canvas.style.touchAction = this._shouldDisableCanvasTouchAction() ? 'none' : '';
|
|
55104
55132
|
}
|
|
55105
55133
|
}
|
|
55106
55134
|
}
|
|
@@ -55119,6 +55147,7 @@ class Compiler {
|
|
|
55119
55147
|
this._cachedMarks = null;
|
|
55120
55148
|
}
|
|
55121
55149
|
chart.compile();
|
|
55150
|
+
this._setCanvasStyle();
|
|
55122
55151
|
chart.afterCompile();
|
|
55123
55152
|
}
|
|
55124
55153
|
clearNextRender() {
|
|
@@ -57698,9 +57727,6 @@ class MarkStateManager extends StateManager {
|
|
|
57698
57727
|
}
|
|
57699
57728
|
});
|
|
57700
57729
|
}
|
|
57701
|
-
clearAllStateInfo() {
|
|
57702
|
-
this._stateInfoList = [];
|
|
57703
|
-
}
|
|
57704
57730
|
_isMultiMark() {
|
|
57705
57731
|
return !this._mark || isMultiDatumMark(this._mark.type);
|
|
57706
57732
|
}
|
|
@@ -59423,11 +59449,6 @@ class BaseMark extends GrammarItem {
|
|
|
59423
59449
|
runAnimation() {
|
|
59424
59450
|
this._runStateAnimation(this.getGraphics());
|
|
59425
59451
|
}
|
|
59426
|
-
clearBeforeReInit() {
|
|
59427
|
-
this.state.clearAllStateInfo();
|
|
59428
|
-
this.uncommit();
|
|
59429
|
-
this.stateStyle = {};
|
|
59430
|
-
}
|
|
59431
59452
|
}
|
|
59432
59453
|
|
|
59433
59454
|
var MarkTypeEnum;
|
|
@@ -63527,7 +63548,6 @@ class BaseSeries extends BaseModel {
|
|
|
63527
63548
|
super.reInit(spec);
|
|
63528
63549
|
const marks = this.getMarksWithoutRoot();
|
|
63529
63550
|
marks.forEach(mark => {
|
|
63530
|
-
mark.clearBeforeReInit();
|
|
63531
63551
|
this._spec[mark.name] && this.initMarkStyleWithSpec(mark, this._spec[mark.name]);
|
|
63532
63552
|
});
|
|
63533
63553
|
this.initMarkStyle();
|
package/build/index.js
CHANGED
|
@@ -55097,6 +55097,33 @@
|
|
|
55097
55097
|
updateLayoutTag() {
|
|
55098
55098
|
this._layoutState = LayoutState.before;
|
|
55099
55099
|
}
|
|
55100
|
+
_isGeoRegionRoamDragEnabled() {
|
|
55101
|
+
var _a, _b;
|
|
55102
|
+
const chartSpec = (_b = (_a = this._compileChart) === null || _a === void 0 ? void 0 : _a.getSpec) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
55103
|
+
const regions = chartSpec === null || chartSpec === void 0 ? void 0 : chartSpec.region;
|
|
55104
|
+
if (!isArray$1(regions)) {
|
|
55105
|
+
return false;
|
|
55106
|
+
}
|
|
55107
|
+
return regions.some((region) => {
|
|
55108
|
+
var _a;
|
|
55109
|
+
if ((region === null || region === void 0 ? void 0 : region.coordinate) !== 'geo' || !region.roam) {
|
|
55110
|
+
return false;
|
|
55111
|
+
}
|
|
55112
|
+
if (region.roam === true) {
|
|
55113
|
+
return true;
|
|
55114
|
+
}
|
|
55115
|
+
return (_a = region.roam.drag) !== null && _a !== void 0 ? _a : true;
|
|
55116
|
+
});
|
|
55117
|
+
}
|
|
55118
|
+
_shouldDisableCanvasTouchAction() {
|
|
55119
|
+
if (!isTrueBrowser(this._option.mode)) {
|
|
55120
|
+
return false;
|
|
55121
|
+
}
|
|
55122
|
+
const supportsTouchEvents = isValid$1(this._option.supportsTouchEvents)
|
|
55123
|
+
? this._option.supportsTouchEvents
|
|
55124
|
+
: vglobal.supportsTouchEvents;
|
|
55125
|
+
return supportsTouchEvents === false && this._isGeoRegionRoamDragEnabled();
|
|
55126
|
+
}
|
|
55100
55127
|
_setCanvasStyle() {
|
|
55101
55128
|
if (!this._stage) {
|
|
55102
55129
|
return;
|
|
@@ -55107,6 +55134,7 @@
|
|
|
55107
55134
|
const canvas = this.getCanvas();
|
|
55108
55135
|
if (canvas) {
|
|
55109
55136
|
canvas.style.display = 'block';
|
|
55137
|
+
canvas.style.touchAction = this._shouldDisableCanvasTouchAction() ? 'none' : '';
|
|
55110
55138
|
}
|
|
55111
55139
|
}
|
|
55112
55140
|
}
|
|
@@ -55125,6 +55153,7 @@
|
|
|
55125
55153
|
this._cachedMarks = null;
|
|
55126
55154
|
}
|
|
55127
55155
|
chart.compile();
|
|
55156
|
+
this._setCanvasStyle();
|
|
55128
55157
|
chart.afterCompile();
|
|
55129
55158
|
}
|
|
55130
55159
|
clearNextRender() {
|
|
@@ -57704,9 +57733,6 @@
|
|
|
57704
57733
|
}
|
|
57705
57734
|
});
|
|
57706
57735
|
}
|
|
57707
|
-
clearAllStateInfo() {
|
|
57708
|
-
this._stateInfoList = [];
|
|
57709
|
-
}
|
|
57710
57736
|
_isMultiMark() {
|
|
57711
57737
|
return !this._mark || isMultiDatumMark(this._mark.type);
|
|
57712
57738
|
}
|
|
@@ -59429,11 +59455,6 @@
|
|
|
59429
59455
|
runAnimation() {
|
|
59430
59456
|
this._runStateAnimation(this.getGraphics());
|
|
59431
59457
|
}
|
|
59432
|
-
clearBeforeReInit() {
|
|
59433
|
-
this.state.clearAllStateInfo();
|
|
59434
|
-
this.uncommit();
|
|
59435
|
-
this.stateStyle = {};
|
|
59436
|
-
}
|
|
59437
59458
|
}
|
|
59438
59459
|
|
|
59439
59460
|
exports.MarkTypeEnum = void 0;
|
|
@@ -63533,7 +63554,6 @@
|
|
|
63533
63554
|
super.reInit(spec);
|
|
63534
63555
|
const marks = this.getMarksWithoutRoot();
|
|
63535
63556
|
marks.forEach(mark => {
|
|
63536
|
-
mark.clearBeforeReInit();
|
|
63537
63557
|
this._spec[mark.name] && this.initMarkStyleWithSpec(mark, this._spec[mark.name]);
|
|
63538
63558
|
});
|
|
63539
63559
|
this.initMarkStyle();
|