@visactor/vchart 2.0.23-alpha.0 → 2.0.23-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 +91 -167
- package/build/index.js +91 -167
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/util.js +2 -1
- package/cjs/component/index.js +1 -1
- package/cjs/component/util.js +1 -1
- package/cjs/constant/attribute.js +1 -2
- package/cjs/constant/scroll-bar.js +2 -1
- package/cjs/constant/waterfall.js +1 -2
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/interface.js +1 -1
- package/cjs/core/util.js +1 -1
- package/cjs/core/vchart.js +2 -3
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/series/map/map.js +6 -18
- package/cjs/series/map/map.js.map +1 -1
- package/cjs/series/scatter/scatter.d.ts +2 -0
- package/cjs/series/scatter/scatter.js +28 -18
- package/cjs/series/scatter/scatter.js.map +1 -1
- package/esm/chart/util.js +2 -1
- package/esm/component/index.js +1 -1
- package/esm/component/util.js +1 -1
- package/esm/constant/attribute.js +1 -2
- package/esm/constant/scroll-bar.js +2 -1
- package/esm/constant/waterfall.js +1 -2
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/core/interface.js +1 -1
- package/esm/core/util.js +1 -1
- package/esm/core/vchart.js +2 -3
- package/esm/core/vchart.js.map +1 -1
- package/esm/series/map/map.js +6 -18
- package/esm/series/map/map.js.map +1 -1
- package/esm/series/scatter/scatter.d.ts +2 -0
- package/esm/series/scatter/scatter.js +28 -18
- package/esm/series/scatter/scatter.js.map +1 -1
- package/package.json +7 -7
package/build/index.es.js
CHANGED
|
@@ -16065,7 +16065,6 @@ const GRAPHIC_UPDATE_TAG_KEY = ["lineWidth", "scaleX", "scaleY", "angle", "ancho
|
|
|
16065
16065
|
const tempConstantXYKey = ["x", "y"],
|
|
16066
16066
|
tempConstantScaleXYKey = ["scaleX", "scaleY"],
|
|
16067
16067
|
tempConstantAngleKey = ["angle"],
|
|
16068
|
-
builtinTextureTypes = new Set(["circle", "diamond", "rect", "vertical-line", "horizontal-line", "bias-lr", "bias-rl", "grid", "wave"]),
|
|
16069
16068
|
point = new Point();
|
|
16070
16069
|
const NOWORK_ANIMATE_ATTR = {
|
|
16071
16070
|
strokeSeg: 1,
|
|
@@ -16122,7 +16121,7 @@ class Graphic extends Node {
|
|
|
16122
16121
|
}
|
|
16123
16122
|
constructor(params = {}) {
|
|
16124
16123
|
var _a;
|
|
16125
|
-
super(), this._AABBBounds = new AABBBounds(), this._updateTag = UpdateTag.INIT, this.attribute = params, this.valid = this.isValid(), this.updateAABBBoundsStamp = 0, params.background
|
|
16124
|
+
super(), this._AABBBounds = new AABBBounds(), this._updateTag = UpdateTag.INIT, this.attribute = params, this.valid = this.isValid(), this.updateAABBBoundsStamp = 0, params.background ? this.loadImage(null !== (_a = params.background.background) && void 0 !== _a ? _a : params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic);
|
|
16126
16125
|
}
|
|
16127
16126
|
getGraphicService() {
|
|
16128
16127
|
var _a, _b;
|
|
@@ -16311,7 +16310,7 @@ class Graphic extends Node {
|
|
|
16311
16310
|
});
|
|
16312
16311
|
}
|
|
16313
16312
|
setAttributes(params, forceUpdateTag = !1, context) {
|
|
16314
|
-
params && ((params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background
|
|
16313
|
+
params && ((params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background ? this.loadImage(params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic), this._setAttributes(params, forceUpdateTag, context));
|
|
16315
16314
|
}
|
|
16316
16315
|
_setAttributes(params, forceUpdateTag = !1, context) {
|
|
16317
16316
|
const keys = Object.keys(params);
|
|
@@ -16326,7 +16325,7 @@ class Graphic extends Node {
|
|
|
16326
16325
|
const params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate({
|
|
16327
16326
|
[key]: value
|
|
16328
16327
|
}, this.attribute, key, context);
|
|
16329
|
-
params ? this._setAttributes(params, forceUpdateTag, context) : isNil$1(null === (_a = this.normalAttrs) || void 0 === _a ? void 0 : _a[key]) ? (this.attribute[key] = value, this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTag(key) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.addUpdateLayoutTag(), this.onAttributeUpdate(context)) : this.normalAttrs[key] = value, "background" === key ? this.loadImage(value, !0) : "
|
|
16328
|
+
params ? this._setAttributes(params, forceUpdateTag, context) : isNil$1(null === (_a = this.normalAttrs) || void 0 === _a ? void 0 : _a[key]) ? (this.attribute[key] = value, this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTag(key) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.addUpdateLayoutTag(), this.onAttributeUpdate(context)) : this.normalAttrs[key] = value, "background" === key ? this.loadImage(value, !0) : "shadowGraphic" === key && this.setShadowGraphic(value);
|
|
16330
16329
|
}
|
|
16331
16330
|
needUpdateTags(keys, k = GRAPHIC_UPDATE_TAG_KEY) {
|
|
16332
16331
|
for (let i = 0; i < k.length; i++) {
|
|
@@ -16345,7 +16344,7 @@ class Graphic extends Node {
|
|
|
16345
16344
|
const context = {
|
|
16346
16345
|
type: AttributeUpdateType.INIT
|
|
16347
16346
|
};
|
|
16348
|
-
params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params, this.attribute = params, params.background
|
|
16347
|
+
params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params, this.attribute = params, params.background ? this.loadImage(params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic), this._updateTag = UpdateTag.INIT, this.valid = this.isValid(), this.onAttributeUpdate(context);
|
|
16349
16348
|
}
|
|
16350
16349
|
translate(x, y) {
|
|
16351
16350
|
var _a, _b;
|
|
@@ -16736,9 +16735,6 @@ class Graphic extends Node {
|
|
|
16736
16735
|
function backgroundNotImage(image) {
|
|
16737
16736
|
return "string" == typeof image ? !(image.startsWith("<svg") || isValidUrl$1(image) || image.includes("/") || isBase64$1(image)) : !(!image.fill && !image.stroke) || !("string" != typeof image.gradient || !Array.isArray(image.stops));
|
|
16738
16737
|
}
|
|
16739
|
-
function isExternalTexture(texture) {
|
|
16740
|
-
return !!texture && ("string" == typeof texture ? !builtinTextureTypes.has(texture) && (texture.startsWith("<svg") || isValidUrl$1(texture) || texture.includes("/") || isBase64$1(texture)) : isObject$2(texture));
|
|
16741
|
-
}
|
|
16742
16738
|
Graphic.userSymbolMap = {}, Graphic.mixin(EventTarget);
|
|
16743
16739
|
|
|
16744
16740
|
var GroupUpdateAABBBoundsMode;
|
|
@@ -20390,7 +20386,6 @@ class DefaultBaseClipRenderAfterContribution {
|
|
|
20390
20386
|
}
|
|
20391
20387
|
const defaultBaseClipRenderAfterContribution = new DefaultBaseClipRenderAfterContribution();
|
|
20392
20388
|
|
|
20393
|
-
const builtinProceduralTextureTypes = new Set(["circle", "diamond", "rect", "vertical-line", "horizontal-line", "bias-lr", "bias-rl", "grid"]);
|
|
20394
20389
|
function formatRatio(ratio) {
|
|
20395
20390
|
return ratio <= .5 ? 4 * ratio - 1 : -4 * ratio + 3;
|
|
20396
20391
|
}
|
|
@@ -20504,43 +20499,38 @@ class DefaultBaseTextureRenderContribution {
|
|
|
20504
20499
|
texture && this.drawTexture(texture, graphic, context, x, y, graphicAttribute, textureColor, textureSize, texturePadding);
|
|
20505
20500
|
}
|
|
20506
20501
|
drawTexture(texture, graphic, context, x, y, graphicAttribute, textureColor, textureSize, texturePadding) {
|
|
20507
|
-
var _a
|
|
20502
|
+
var _a;
|
|
20508
20503
|
const {
|
|
20509
20504
|
textureRatio = graphicAttribute.textureRatio,
|
|
20510
20505
|
textureOptions = null
|
|
20511
20506
|
} = graphic.attribute;
|
|
20512
|
-
let pattern =
|
|
20513
|
-
|
|
20514
|
-
|
|
20515
|
-
|
|
20516
|
-
|
|
20517
|
-
|
|
20518
|
-
|
|
20519
|
-
|
|
20520
|
-
|
|
20521
|
-
|
|
20522
|
-
|
|
20523
|
-
|
|
20524
|
-
|
|
20525
|
-
|
|
20526
|
-
|
|
20527
|
-
|
|
20528
|
-
|
|
20529
|
-
|
|
20530
|
-
|
|
20531
|
-
|
|
20532
|
-
|
|
20533
|
-
|
|
20534
|
-
|
|
20535
|
-
|
|
20536
|
-
|
|
20537
|
-
break;
|
|
20538
|
-
case "grid":
|
|
20539
|
-
pattern = this.createGridPattern(textureSize, texturePadding, textureColor, context);
|
|
20540
|
-
}
|
|
20541
|
-
pattern || (pattern = this.createResourcePattern(texture, graphic, context, texturePadding, textureRadius)), pattern && null !== patternKey && this.textureMap.set(patternKey, pattern);
|
|
20507
|
+
let pattern = this.textureMap.get(texture);
|
|
20508
|
+
if (!pattern) switch (texture) {
|
|
20509
|
+
case "circle":
|
|
20510
|
+
pattern = this.createCirclePattern(textureSize, texturePadding, textureColor, context);
|
|
20511
|
+
break;
|
|
20512
|
+
case "diamond":
|
|
20513
|
+
pattern = this.createDiamondPattern(textureSize, texturePadding, textureColor, context);
|
|
20514
|
+
break;
|
|
20515
|
+
case "rect":
|
|
20516
|
+
pattern = this.createRectPattern(textureSize, texturePadding, textureColor, context);
|
|
20517
|
+
break;
|
|
20518
|
+
case "vertical-line":
|
|
20519
|
+
pattern = this.createVerticalLinePattern(textureSize, texturePadding, textureColor, context);
|
|
20520
|
+
break;
|
|
20521
|
+
case "horizontal-line":
|
|
20522
|
+
pattern = this.createHorizontalLinePattern(textureSize, texturePadding, textureColor, context);
|
|
20523
|
+
break;
|
|
20524
|
+
case "bias-lr":
|
|
20525
|
+
pattern = this.createBiasLRLinePattern(textureSize, texturePadding, textureColor, context);
|
|
20526
|
+
break;
|
|
20527
|
+
case "bias-rl":
|
|
20528
|
+
pattern = this.createBiasRLLinePattern(textureSize, texturePadding, textureColor, context);
|
|
20529
|
+
break;
|
|
20530
|
+
case "grid":
|
|
20531
|
+
pattern = this.createGridPattern(textureSize, texturePadding, textureColor, context);
|
|
20542
20532
|
}
|
|
20543
|
-
if (
|
|
20533
|
+
if (textureOptions && textureOptions.dynamicTexture) {
|
|
20544
20534
|
const {
|
|
20545
20535
|
gridConfig = {},
|
|
20546
20536
|
useNewCanvas: useNewCanvas
|
|
@@ -20585,24 +20575,10 @@ class DefaultBaseTextureRenderContribution {
|
|
|
20585
20575
|
for (let i = 0; i < gridRows; i++) for (let j = 0; j < gridColumns; j++) {
|
|
20586
20576
|
const _x = x + cellSize / 2 + j * cellSize,
|
|
20587
20577
|
_y = y + cellSize / 2 + i * cellSize;
|
|
20588
|
-
null === (
|
|
20578
|
+
null === (_a = textureOptions.beforeDynamicTexture) || void 0 === _a || _a.call(textureOptions, context, i, j, gridRows, gridColumns, textureRatio, graphic, b.width(), b.height()), context.beginPath(), !1 === parsedPath.draw(context, Math.min(sizeW - gutterColumn, sizeH - gutterRow), _x, _y, 0) && context.closePath(), context.fillStyle = textureColor, textureOptions.dynamicTexture(context, i, j, gridRows, gridColumns, textureRatio, graphic, b.width(), b.height());
|
|
20589
20579
|
}
|
|
20590
20580
|
useNewCanvas && (originalContext.globalAlpha = 1, originalContext.drawImage(newCanvas.nativeCanvas, 0, 0, newCanvas.nativeCanvas.width, newCanvas.nativeCanvas.height, b.x1, b.y1, b.width() * originalContext.dpr, b.height() * originalContext.dpr)), originalContext.restore();
|
|
20591
|
-
} else if (pattern) {
|
|
20592
|
-
if (pattern.setTransform) {
|
|
20593
|
-
const alignToGraphic = !!(null == textureOptions ? void 0 : textureOptions.alignToGraphic),
|
|
20594
|
-
alignOffsetX = null !== (_c = null == textureOptions ? void 0 : textureOptions.alignOffsetX) && void 0 !== _c ? _c : 0,
|
|
20595
|
-
alignOffsetY = null !== (_d = null == textureOptions ? void 0 : textureOptions.alignOffsetY) && void 0 !== _d ? _d : 0;
|
|
20596
|
-
let translateX = 0,
|
|
20597
|
-
translateY = 0;
|
|
20598
|
-
if (alignToGraphic) {
|
|
20599
|
-
const m = context.currentMatrix;
|
|
20600
|
-
translateX = (null !== (_e = null == m ? void 0 : m.e) && void 0 !== _e ? _e : 0) + x + alignOffsetX, translateY = (null !== (_f = null == m ? void 0 : m.f) && void 0 !== _f ? _f : 0) + y + alignOffsetY;
|
|
20601
|
-
} else (alignOffsetX || alignOffsetY) && (translateX = alignOffsetX, translateY = alignOffsetY);
|
|
20602
|
-
pattern.setTransform(new DOMMatrix([1 / context.dpr, 0, 0, 1 / context.dpr, translateX, translateY]));
|
|
20603
|
-
}
|
|
20604
|
-
context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.fillStyle = pattern, context.fill(), context.highPerformanceRestore();
|
|
20605
|
-
} else if ("wave" === texture) {
|
|
20581
|
+
} else if (pattern) context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.fillStyle = pattern, context.fill(), context.highPerformanceRestore();else if ("wave" === texture) {
|
|
20606
20582
|
context.save(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.clip();
|
|
20607
20583
|
const b = graphic.AABBBounds;
|
|
20608
20584
|
drawWave(context, textureRatio, b.width(), b.height(), Object.assign(Object.assign({}, textureOptions || {}), {
|
|
@@ -20610,45 +20586,6 @@ class DefaultBaseTextureRenderContribution {
|
|
|
20610
20586
|
}), x + b.x1 - x, y + b.y1 - y), context.restore();
|
|
20611
20587
|
}
|
|
20612
20588
|
}
|
|
20613
|
-
getPatternCacheKey(texture, textureSize, texturePadding, textureColor, dpr, textureRadius) {
|
|
20614
|
-
return "string" != typeof texture ? texturePadding > 0 || textureRadius > 0 ? null : texture : "wave" === texture ? null : builtinProceduralTextureTypes.has(texture) ? `builtin:${texture}|size:${textureSize}|padding:${texturePadding}|color:${textureColor}|dpr:${dpr}` : `resource:${texture}|padding:${texturePadding}|radius:${textureRadius}|dpr:${dpr}`;
|
|
20615
|
-
}
|
|
20616
|
-
createResourcePattern(texture, graphic, context, texturePadding, textureRadius) {
|
|
20617
|
-
var _a;
|
|
20618
|
-
const resource = null === (_a = graphic.resources) || void 0 === _a ? void 0 : _a.get(texture),
|
|
20619
|
-
data = "success" === (null == resource ? void 0 : resource.state) ? resource.data : "object" == typeof texture ? texture : null;
|
|
20620
|
-
if (!data) return null;
|
|
20621
|
-
if (texturePadding > 0 || textureRadius > 0) {
|
|
20622
|
-
const w = data.naturalWidth || data.width,
|
|
20623
|
-
h = data.naturalHeight || data.height;
|
|
20624
|
-
if (w > 0 && h > 0) {
|
|
20625
|
-
const tileW = w + 2 * texturePadding,
|
|
20626
|
-
tileH = h + 2 * texturePadding,
|
|
20627
|
-
canvas = canvasAllocate.allocate({
|
|
20628
|
-
width: tileW,
|
|
20629
|
-
height: tileH,
|
|
20630
|
-
dpr: context.dpr
|
|
20631
|
-
}),
|
|
20632
|
-
ctx = canvas.getContext("2d");
|
|
20633
|
-
if (ctx) {
|
|
20634
|
-
if (ctx.inuse = !0, ctx.clearMatrix(), ctx.setTransformForCurrent(!0), ctx.clearRect(0, 0, tileW, tileH), textureRadius > 0) {
|
|
20635
|
-
const r = Math.max(0, Math.min(textureRadius, Math.min(w, h) / 2)),
|
|
20636
|
-
x0 = texturePadding,
|
|
20637
|
-
y0 = texturePadding,
|
|
20638
|
-
x1 = x0 + w,
|
|
20639
|
-
y1 = y0 + h;
|
|
20640
|
-
ctx.beginPath(), ctx.moveTo(x0 + r, y0), ctx.lineTo(x1 - r, y0), ctx.quadraticCurveTo(x1, y0, x1, y0 + r), ctx.lineTo(x1, y1 - r), ctx.quadraticCurveTo(x1, y1, x1 - r, y1), ctx.lineTo(x0 + r, y1), ctx.quadraticCurveTo(x0, y1, x0, y1 - r), ctx.lineTo(x0, y0 + r), ctx.quadraticCurveTo(x0, y0, x0 + r, y0), ctx.closePath(), ctx.clip();
|
|
20641
|
-
}
|
|
20642
|
-
ctx.drawImage(data, texturePadding, texturePadding, w, h);
|
|
20643
|
-
const pattern = context.createPattern(canvas.nativeCanvas, "repeat");
|
|
20644
|
-
return (null == pattern ? void 0 : pattern.setTransform) && pattern.setTransform(new DOMMatrix([1 / context.dpr, 0, 0, 1 / context.dpr, 0, 0])), canvasAllocate.free(canvas), pattern;
|
|
20645
|
-
}
|
|
20646
|
-
canvasAllocate.free(canvas);
|
|
20647
|
-
}
|
|
20648
|
-
}
|
|
20649
|
-
const pattern = context.createPattern(data, "repeat");
|
|
20650
|
-
return (null == pattern ? void 0 : pattern.setTransform) && pattern.setTransform(new DOMMatrix([1 / context.dpr, 0, 0, 1 / context.dpr, 0, 0])), pattern;
|
|
20651
|
-
}
|
|
20652
20589
|
}
|
|
20653
20590
|
const defaultBaseTextureRenderContribution = new DefaultBaseTextureRenderContribution();
|
|
20654
20591
|
|
|
@@ -61847,10 +61784,13 @@ class VChart {
|
|
|
61847
61784
|
(_a = this._chart) === null || _a === void 0 ? void 0 : _a.setLayout(layout);
|
|
61848
61785
|
}
|
|
61849
61786
|
reLayout() {
|
|
61850
|
-
|
|
61851
|
-
|
|
61852
|
-
|
|
61853
|
-
|
|
61787
|
+
if (!this._chart || !this._compiler || this._isReleased) {
|
|
61788
|
+
return;
|
|
61789
|
+
}
|
|
61790
|
+
this._chart.resetLayoutItemTag();
|
|
61791
|
+
this._chart.setLayoutTag(true, null, false);
|
|
61792
|
+
this._compiler.render();
|
|
61793
|
+
this._chart.onEvaluateEnd();
|
|
61854
61794
|
}
|
|
61855
61795
|
getCompiler() {
|
|
61856
61796
|
return this._compiler;
|
|
@@ -62239,7 +62179,7 @@ const lookup = (data, opt) => {
|
|
|
62239
62179
|
});
|
|
62240
62180
|
};
|
|
62241
62181
|
|
|
62242
|
-
const version = "2.0.
|
|
62182
|
+
const version = "2.0.22";
|
|
62243
62183
|
|
|
62244
62184
|
const addVChartProperty = (data, op) => {
|
|
62245
62185
|
const context = op.beforeCall();
|
|
@@ -74086,45 +74026,55 @@ class ScatterSeries extends CartesianSeries {
|
|
|
74086
74026
|
}, STATE_VALUE_ENUM.STATE_NORMAL, AttributeLevel.Series);
|
|
74087
74027
|
}
|
|
74088
74028
|
}
|
|
74089
|
-
|
|
74090
|
-
var _a
|
|
74091
|
-
this.
|
|
74092
|
-
|
|
74093
|
-
|
|
74094
|
-
|
|
74095
|
-
|
|
74096
|
-
|
|
74097
|
-
|
|
74029
|
+
_updateSymbolGraphicPosition() {
|
|
74030
|
+
var _a;
|
|
74031
|
+
const graphics = (_a = this._symbolMark) === null || _a === void 0 ? void 0 : _a.getGraphics();
|
|
74032
|
+
if (!graphics || !graphics.length) {
|
|
74033
|
+
return;
|
|
74034
|
+
}
|
|
74035
|
+
graphics.forEach((graphicItem) => {
|
|
74036
|
+
var _a, _b;
|
|
74037
|
+
const datum = (_b = (_a = graphicItem === null || graphicItem === void 0 ? void 0 : graphicItem.context) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b[0];
|
|
74038
|
+
const newPosition = this.dataToPosition(datum);
|
|
74039
|
+
if (newPosition && graphicItem) {
|
|
74040
|
+
graphicItem.setAttributes({
|
|
74041
|
+
x: newPosition.x,
|
|
74042
|
+
y: newPosition.y
|
|
74043
|
+
});
|
|
74098
74044
|
}
|
|
74099
|
-
graphics.forEach((graphicItem, i) => {
|
|
74100
|
-
var _a, _b;
|
|
74101
|
-
const datum = (_b = (_a = graphicItem === null || graphicItem === void 0 ? void 0 : graphicItem.context) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b[0];
|
|
74102
|
-
const newPosition = this.dataToPosition(datum);
|
|
74103
|
-
if (newPosition && graphicItem) {
|
|
74104
|
-
graphicItem.translateTo(newPosition.x, newPosition.y);
|
|
74105
|
-
}
|
|
74106
|
-
});
|
|
74107
74045
|
});
|
|
74108
|
-
|
|
74109
|
-
|
|
74110
|
-
|
|
74046
|
+
}
|
|
74047
|
+
_ensureLabelGraphicPostMatrix() {
|
|
74048
|
+
var _a, _b;
|
|
74049
|
+
const labelGraphic = (_b = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent()) === null || _b === void 0 ? void 0 : _b.getComponent();
|
|
74050
|
+
if (labelGraphic && !labelGraphic.attribute.postMatrix) {
|
|
74051
|
+
labelGraphic.setAttributes({
|
|
74052
|
+
postMatrix: new Matrix()
|
|
74053
|
+
});
|
|
74111
74054
|
}
|
|
74112
|
-
|
|
74113
|
-
|
|
74114
|
-
|
|
74055
|
+
return labelGraphic;
|
|
74056
|
+
}
|
|
74057
|
+
handleZoom(e) {
|
|
74058
|
+
const { scale, scaleCenter } = e;
|
|
74059
|
+
if (scale === 1) {
|
|
74060
|
+
return;
|
|
74115
74061
|
}
|
|
74116
|
-
|
|
74117
|
-
|
|
74118
|
-
|
|
74119
|
-
|
|
74120
|
-
postMatrix: new Matrix()
|
|
74121
|
-
});
|
|
74122
|
-
}
|
|
74123
|
-
labelGroup.scale(e.scale, e.scale, e.scaleCenter);
|
|
74062
|
+
this._updateSymbolGraphicPosition();
|
|
74063
|
+
const labelGraphic = this._ensureLabelGraphicPostMatrix();
|
|
74064
|
+
if (labelGraphic) {
|
|
74065
|
+
labelGraphic.scale(scale, scale, scaleCenter);
|
|
74124
74066
|
}
|
|
74125
74067
|
}
|
|
74126
74068
|
handlePan(e) {
|
|
74127
|
-
|
|
74069
|
+
const { delta } = e;
|
|
74070
|
+
if ((delta === null || delta === void 0 ? void 0 : delta[0]) === 0 && (delta === null || delta === void 0 ? void 0 : delta[1]) === 0) {
|
|
74071
|
+
return;
|
|
74072
|
+
}
|
|
74073
|
+
this._updateSymbolGraphicPosition();
|
|
74074
|
+
const labelGraphic = this._ensureLabelGraphicPostMatrix();
|
|
74075
|
+
if (labelGraphic) {
|
|
74076
|
+
labelGraphic.translate(delta[0], delta[1]);
|
|
74077
|
+
}
|
|
74128
74078
|
}
|
|
74129
74079
|
getDefaultShapeType() {
|
|
74130
74080
|
return 'circle';
|
|
@@ -75383,7 +75333,7 @@ class MapSeries extends GeoSeries {
|
|
|
75383
75333
|
this._mapViewData = null;
|
|
75384
75334
|
}
|
|
75385
75335
|
handleZoom(e) {
|
|
75386
|
-
var _a
|
|
75336
|
+
var _a;
|
|
75387
75337
|
const { scale, scaleCenter } = e;
|
|
75388
75338
|
if (scale === 1) {
|
|
75389
75339
|
return;
|
|
@@ -75397,26 +75347,13 @@ class MapSeries extends GeoSeries {
|
|
|
75397
75347
|
}
|
|
75398
75348
|
pathGroup.scale(scale, scale, scaleCenter);
|
|
75399
75349
|
}
|
|
75400
|
-
const
|
|
75401
|
-
if (
|
|
75402
|
-
|
|
75403
|
-
}
|
|
75404
|
-
const vgrammarLabel = (_b = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getComponent) === null || _b === void 0 ? void 0 : _b.call(labelComponent);
|
|
75405
|
-
if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.evaluate) {
|
|
75406
|
-
vgrammarLabel.evaluate(null, null);
|
|
75407
|
-
}
|
|
75408
|
-
const labelGroup = (_c = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getProduct) === null || _c === void 0 ? void 0 : _c.call(labelComponent);
|
|
75409
|
-
if (labelGroup && scale && scaleCenter) {
|
|
75410
|
-
if (!((_d = labelGroup.attribute) === null || _d === void 0 ? void 0 : _d.postMatrix)) {
|
|
75411
|
-
labelGroup.setAttributes({
|
|
75412
|
-
postMatrix: new Matrix()
|
|
75413
|
-
});
|
|
75414
|
-
}
|
|
75415
|
-
labelGroup.scale(scale, scale, scaleCenter);
|
|
75350
|
+
const vgrammarLabel = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
|
|
75351
|
+
if (vgrammarLabel) {
|
|
75352
|
+
vgrammarLabel.renderInner();
|
|
75416
75353
|
}
|
|
75417
75354
|
}
|
|
75418
75355
|
handlePan(e) {
|
|
75419
|
-
var _a
|
|
75356
|
+
var _a;
|
|
75420
75357
|
const { delta } = e;
|
|
75421
75358
|
if (delta[0] === 0 && delta[1] === 0) {
|
|
75422
75359
|
return;
|
|
@@ -75430,22 +75367,9 @@ class MapSeries extends GeoSeries {
|
|
|
75430
75367
|
}
|
|
75431
75368
|
pathGroup.translate(delta[0], delta[1]);
|
|
75432
75369
|
}
|
|
75433
|
-
const
|
|
75434
|
-
if (
|
|
75435
|
-
|
|
75436
|
-
}
|
|
75437
|
-
const vgrammarLabel = (_b = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getComponent) === null || _b === void 0 ? void 0 : _b.call(labelComponent);
|
|
75438
|
-
if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.evaluate) {
|
|
75439
|
-
vgrammarLabel.evaluate(null, null);
|
|
75440
|
-
}
|
|
75441
|
-
const labelGroup = (_c = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getProduct) === null || _c === void 0 ? void 0 : _c.call(labelComponent);
|
|
75442
|
-
if (labelGroup && delta) {
|
|
75443
|
-
if (!((_d = labelGroup.attribute) === null || _d === void 0 ? void 0 : _d.postMatrix)) {
|
|
75444
|
-
labelGroup.setAttributes({
|
|
75445
|
-
postMatrix: new Matrix()
|
|
75446
|
-
});
|
|
75447
|
-
}
|
|
75448
|
-
labelGroup.translate(delta[0], delta[1]);
|
|
75370
|
+
const vgrammarLabel = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
|
|
75371
|
+
if (vgrammarLabel) {
|
|
75372
|
+
vgrammarLabel.renderInner();
|
|
75449
75373
|
}
|
|
75450
75374
|
}
|
|
75451
75375
|
getDatumCenter(datum) {
|