@visactor/react-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/index.js
CHANGED
|
@@ -47252,11 +47252,24 @@
|
|
|
47252
47252
|
updateLayoutTag() {
|
|
47253
47253
|
this._layoutState = LayoutState.before;
|
|
47254
47254
|
}
|
|
47255
|
+
_isGeoRegionRoamDragEnabled() {
|
|
47256
|
+
var _a, _b;
|
|
47257
|
+
const chartSpec = null === (_b = null === (_a = this._compileChart) || void 0 === _a ? void 0 : _a.getSpec) || void 0 === _b ? void 0 : _b.call(_a),
|
|
47258
|
+
regions = null == chartSpec ? void 0 : chartSpec.region;
|
|
47259
|
+
return !!isArray$1(regions) && regions.some(region => {
|
|
47260
|
+
var _a;
|
|
47261
|
+
return !("geo" !== (null == region ? void 0 : region.coordinate) || !region.roam) && (!0 === region.roam || null === (_a = region.roam.drag) || void 0 === _a || _a);
|
|
47262
|
+
});
|
|
47263
|
+
}
|
|
47264
|
+
_shouldDisableCanvasTouchAction() {
|
|
47265
|
+
if (!isTrueBrowser(this._option.mode)) return !1;
|
|
47266
|
+
return !1 === (isValid$1(this._option.supportsTouchEvents) ? this._option.supportsTouchEvents : vglobal.supportsTouchEvents) && this._isGeoRegionRoamDragEnabled();
|
|
47267
|
+
}
|
|
47255
47268
|
_setCanvasStyle() {
|
|
47256
47269
|
if (this._stage && this._container.dom && !isString$1(this._container.dom)) {
|
|
47257
47270
|
this._container.dom.style.display = "block", this._container.dom.style.position = "relative";
|
|
47258
47271
|
const canvas = this.getCanvas();
|
|
47259
|
-
canvas && (canvas.style.display = "block");
|
|
47272
|
+
canvas && (canvas.style.display = "block", canvas.style.touchAction = this._shouldDisableCanvasTouchAction() ? "none" : "");
|
|
47260
47273
|
}
|
|
47261
47274
|
}
|
|
47262
47275
|
compile(ctx, option) {
|
|
@@ -47264,7 +47277,7 @@
|
|
|
47264
47277
|
const {
|
|
47265
47278
|
chart: chart
|
|
47266
47279
|
} = ctx;
|
|
47267
|
-
this._compileChart = chart, this.initView(), this._stage && ("render" !== (null == option ? void 0 : option.actionSource) && this._cachedMarks && (this.reuseOrMorphing(option.morphConfig), this._cachedMarks = null), chart.compile(), chart.afterCompile());
|
|
47280
|
+
this._compileChart = chart, this.initView(), this._stage && ("render" !== (null == option ? void 0 : option.actionSource) && this._cachedMarks && (this.reuseOrMorphing(option.morphConfig), this._cachedMarks = null), chart.compile(), this._setCanvasStyle(), chart.afterCompile());
|
|
47268
47281
|
}
|
|
47269
47282
|
clearNextRender() {
|
|
47270
47283
|
return !!this._nextRafId && (vglobal.getSpecifiedCancelAnimationFrame(10)(this._nextRafId), this._nextRafId = null, !0);
|
|
@@ -49153,9 +49166,6 @@
|
|
|
49153
49166
|
});
|
|
49154
49167
|
});
|
|
49155
49168
|
}
|
|
49156
|
-
clearAllStateInfo() {
|
|
49157
|
-
this._stateInfoList = [];
|
|
49158
|
-
}
|
|
49159
49169
|
_isMultiMark() {
|
|
49160
49170
|
return !this._mark || isMultiDatumMark(this._mark.type);
|
|
49161
49171
|
}
|
|
@@ -50304,9 +50314,6 @@
|
|
|
50304
50314
|
runAnimation() {
|
|
50305
50315
|
this._runStateAnimation(this.getGraphics());
|
|
50306
50316
|
}
|
|
50307
|
-
clearBeforeReInit() {
|
|
50308
|
-
this.state.clearAllStateInfo(), this.uncommit(), this.stateStyle = {};
|
|
50309
|
-
}
|
|
50310
50317
|
}
|
|
50311
50318
|
|
|
50312
50319
|
class GroupMark extends BaseMark {
|
|
@@ -53038,7 +53045,7 @@
|
|
|
53038
53045
|
super.reInit(spec);
|
|
53039
53046
|
const marks = this.getMarksWithoutRoot();
|
|
53040
53047
|
marks.forEach(mark => {
|
|
53041
|
-
|
|
53048
|
+
this._spec[mark.name] && this.initMarkStyleWithSpec(mark, this._spec[mark.name]);
|
|
53042
53049
|
}), this.initMarkStyle(), marks.forEach(mark => {
|
|
53043
53050
|
mark.commit(!1);
|
|
53044
53051
|
}), this._updateExtensionMarkSpec(), this._updateSpecData(), this._tooltipHelper && this._tooltipHelper.updateTooltipSpec();
|