@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.js
CHANGED
|
@@ -16071,7 +16071,6 @@
|
|
|
16071
16071
|
const tempConstantXYKey = ["x", "y"],
|
|
16072
16072
|
tempConstantScaleXYKey = ["scaleX", "scaleY"],
|
|
16073
16073
|
tempConstantAngleKey = ["angle"],
|
|
16074
|
-
builtinTextureTypes = new Set(["circle", "diamond", "rect", "vertical-line", "horizontal-line", "bias-lr", "bias-rl", "grid", "wave"]),
|
|
16075
16074
|
point = new Point();
|
|
16076
16075
|
const NOWORK_ANIMATE_ATTR = {
|
|
16077
16076
|
strokeSeg: 1,
|
|
@@ -16128,7 +16127,7 @@
|
|
|
16128
16127
|
}
|
|
16129
16128
|
constructor(params = {}) {
|
|
16130
16129
|
var _a;
|
|
16131
|
-
super(), this._AABBBounds = new AABBBounds(), this._updateTag = UpdateTag.INIT, this.attribute = params, this.valid = this.isValid(), this.updateAABBBoundsStamp = 0, params.background
|
|
16130
|
+
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);
|
|
16132
16131
|
}
|
|
16133
16132
|
getGraphicService() {
|
|
16134
16133
|
var _a, _b;
|
|
@@ -16317,7 +16316,7 @@
|
|
|
16317
16316
|
});
|
|
16318
16317
|
}
|
|
16319
16318
|
setAttributes(params, forceUpdateTag = !1, context) {
|
|
16320
|
-
params && ((params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background
|
|
16319
|
+
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));
|
|
16321
16320
|
}
|
|
16322
16321
|
_setAttributes(params, forceUpdateTag = !1, context) {
|
|
16323
16322
|
const keys = Object.keys(params);
|
|
@@ -16332,7 +16331,7 @@
|
|
|
16332
16331
|
const params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate({
|
|
16333
16332
|
[key]: value
|
|
16334
16333
|
}, this.attribute, key, context);
|
|
16335
|
-
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) : "
|
|
16334
|
+
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);
|
|
16336
16335
|
}
|
|
16337
16336
|
needUpdateTags(keys, k = GRAPHIC_UPDATE_TAG_KEY) {
|
|
16338
16337
|
for (let i = 0; i < k.length; i++) {
|
|
@@ -16351,7 +16350,7 @@
|
|
|
16351
16350
|
const context = {
|
|
16352
16351
|
type: AttributeUpdateType.INIT
|
|
16353
16352
|
};
|
|
16354
|
-
params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params, this.attribute = params, params.background
|
|
16353
|
+
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);
|
|
16355
16354
|
}
|
|
16356
16355
|
translate(x, y) {
|
|
16357
16356
|
var _a, _b;
|
|
@@ -16742,9 +16741,6 @@
|
|
|
16742
16741
|
function backgroundNotImage(image) {
|
|
16743
16742
|
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));
|
|
16744
16743
|
}
|
|
16745
|
-
function isExternalTexture(texture) {
|
|
16746
|
-
return !!texture && ("string" == typeof texture ? !builtinTextureTypes.has(texture) && (texture.startsWith("<svg") || isValidUrl$1(texture) || texture.includes("/") || isBase64$1(texture)) : isObject$2(texture));
|
|
16747
|
-
}
|
|
16748
16744
|
Graphic.userSymbolMap = {}, Graphic.mixin(EventTarget);
|
|
16749
16745
|
|
|
16750
16746
|
var GroupUpdateAABBBoundsMode;
|
|
@@ -20396,7 +20392,6 @@
|
|
|
20396
20392
|
}
|
|
20397
20393
|
const defaultBaseClipRenderAfterContribution = new DefaultBaseClipRenderAfterContribution();
|
|
20398
20394
|
|
|
20399
|
-
const builtinProceduralTextureTypes = new Set(["circle", "diamond", "rect", "vertical-line", "horizontal-line", "bias-lr", "bias-rl", "grid"]);
|
|
20400
20395
|
function formatRatio(ratio) {
|
|
20401
20396
|
return ratio <= .5 ? 4 * ratio - 1 : -4 * ratio + 3;
|
|
20402
20397
|
}
|
|
@@ -20510,43 +20505,38 @@
|
|
|
20510
20505
|
texture && this.drawTexture(texture, graphic, context, x, y, graphicAttribute, textureColor, textureSize, texturePadding);
|
|
20511
20506
|
}
|
|
20512
20507
|
drawTexture(texture, graphic, context, x, y, graphicAttribute, textureColor, textureSize, texturePadding) {
|
|
20513
|
-
var _a
|
|
20508
|
+
var _a;
|
|
20514
20509
|
const {
|
|
20515
20510
|
textureRatio = graphicAttribute.textureRatio,
|
|
20516
20511
|
textureOptions = null
|
|
20517
20512
|
} = graphic.attribute;
|
|
20518
|
-
let pattern =
|
|
20519
|
-
|
|
20520
|
-
|
|
20521
|
-
|
|
20522
|
-
|
|
20523
|
-
|
|
20524
|
-
|
|
20525
|
-
|
|
20526
|
-
|
|
20527
|
-
|
|
20528
|
-
|
|
20529
|
-
|
|
20530
|
-
|
|
20531
|
-
|
|
20532
|
-
|
|
20533
|
-
|
|
20534
|
-
|
|
20535
|
-
|
|
20536
|
-
|
|
20537
|
-
|
|
20538
|
-
|
|
20539
|
-
|
|
20540
|
-
|
|
20541
|
-
|
|
20542
|
-
|
|
20543
|
-
break;
|
|
20544
|
-
case "grid":
|
|
20545
|
-
pattern = this.createGridPattern(textureSize, texturePadding, textureColor, context);
|
|
20546
|
-
}
|
|
20547
|
-
pattern || (pattern = this.createResourcePattern(texture, graphic, context, texturePadding, textureRadius)), pattern && null !== patternKey && this.textureMap.set(patternKey, pattern);
|
|
20513
|
+
let pattern = this.textureMap.get(texture);
|
|
20514
|
+
if (!pattern) switch (texture) {
|
|
20515
|
+
case "circle":
|
|
20516
|
+
pattern = this.createCirclePattern(textureSize, texturePadding, textureColor, context);
|
|
20517
|
+
break;
|
|
20518
|
+
case "diamond":
|
|
20519
|
+
pattern = this.createDiamondPattern(textureSize, texturePadding, textureColor, context);
|
|
20520
|
+
break;
|
|
20521
|
+
case "rect":
|
|
20522
|
+
pattern = this.createRectPattern(textureSize, texturePadding, textureColor, context);
|
|
20523
|
+
break;
|
|
20524
|
+
case "vertical-line":
|
|
20525
|
+
pattern = this.createVerticalLinePattern(textureSize, texturePadding, textureColor, context);
|
|
20526
|
+
break;
|
|
20527
|
+
case "horizontal-line":
|
|
20528
|
+
pattern = this.createHorizontalLinePattern(textureSize, texturePadding, textureColor, context);
|
|
20529
|
+
break;
|
|
20530
|
+
case "bias-lr":
|
|
20531
|
+
pattern = this.createBiasLRLinePattern(textureSize, texturePadding, textureColor, context);
|
|
20532
|
+
break;
|
|
20533
|
+
case "bias-rl":
|
|
20534
|
+
pattern = this.createBiasRLLinePattern(textureSize, texturePadding, textureColor, context);
|
|
20535
|
+
break;
|
|
20536
|
+
case "grid":
|
|
20537
|
+
pattern = this.createGridPattern(textureSize, texturePadding, textureColor, context);
|
|
20548
20538
|
}
|
|
20549
|
-
if (
|
|
20539
|
+
if (textureOptions && textureOptions.dynamicTexture) {
|
|
20550
20540
|
const {
|
|
20551
20541
|
gridConfig = {},
|
|
20552
20542
|
useNewCanvas: useNewCanvas
|
|
@@ -20591,24 +20581,10 @@
|
|
|
20591
20581
|
for (let i = 0; i < gridRows; i++) for (let j = 0; j < gridColumns; j++) {
|
|
20592
20582
|
const _x = x + cellSize / 2 + j * cellSize,
|
|
20593
20583
|
_y = y + cellSize / 2 + i * cellSize;
|
|
20594
|
-
null === (
|
|
20584
|
+
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());
|
|
20595
20585
|
}
|
|
20596
20586
|
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();
|
|
20597
|
-
} else if (pattern) {
|
|
20598
|
-
if (pattern.setTransform) {
|
|
20599
|
-
const alignToGraphic = !!(null == textureOptions ? void 0 : textureOptions.alignToGraphic),
|
|
20600
|
-
alignOffsetX = null !== (_c = null == textureOptions ? void 0 : textureOptions.alignOffsetX) && void 0 !== _c ? _c : 0,
|
|
20601
|
-
alignOffsetY = null !== (_d = null == textureOptions ? void 0 : textureOptions.alignOffsetY) && void 0 !== _d ? _d : 0;
|
|
20602
|
-
let translateX = 0,
|
|
20603
|
-
translateY = 0;
|
|
20604
|
-
if (alignToGraphic) {
|
|
20605
|
-
const m = context.currentMatrix;
|
|
20606
|
-
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;
|
|
20607
|
-
} else (alignOffsetX || alignOffsetY) && (translateX = alignOffsetX, translateY = alignOffsetY);
|
|
20608
|
-
pattern.setTransform(new DOMMatrix([1 / context.dpr, 0, 0, 1 / context.dpr, translateX, translateY]));
|
|
20609
|
-
}
|
|
20610
|
-
context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.fillStyle = pattern, context.fill(), context.highPerformanceRestore();
|
|
20611
|
-
} else if ("wave" === texture) {
|
|
20587
|
+
} else if (pattern) context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.fillStyle = pattern, context.fill(), context.highPerformanceRestore();else if ("wave" === texture) {
|
|
20612
20588
|
context.save(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.clip();
|
|
20613
20589
|
const b = graphic.AABBBounds;
|
|
20614
20590
|
drawWave(context, textureRatio, b.width(), b.height(), Object.assign(Object.assign({}, textureOptions || {}), {
|
|
@@ -20616,45 +20592,6 @@
|
|
|
20616
20592
|
}), x + b.x1 - x, y + b.y1 - y), context.restore();
|
|
20617
20593
|
}
|
|
20618
20594
|
}
|
|
20619
|
-
getPatternCacheKey(texture, textureSize, texturePadding, textureColor, dpr, textureRadius) {
|
|
20620
|
-
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}`;
|
|
20621
|
-
}
|
|
20622
|
-
createResourcePattern(texture, graphic, context, texturePadding, textureRadius) {
|
|
20623
|
-
var _a;
|
|
20624
|
-
const resource = null === (_a = graphic.resources) || void 0 === _a ? void 0 : _a.get(texture),
|
|
20625
|
-
data = "success" === (null == resource ? void 0 : resource.state) ? resource.data : "object" == typeof texture ? texture : null;
|
|
20626
|
-
if (!data) return null;
|
|
20627
|
-
if (texturePadding > 0 || textureRadius > 0) {
|
|
20628
|
-
const w = data.naturalWidth || data.width,
|
|
20629
|
-
h = data.naturalHeight || data.height;
|
|
20630
|
-
if (w > 0 && h > 0) {
|
|
20631
|
-
const tileW = w + 2 * texturePadding,
|
|
20632
|
-
tileH = h + 2 * texturePadding,
|
|
20633
|
-
canvas = canvasAllocate.allocate({
|
|
20634
|
-
width: tileW,
|
|
20635
|
-
height: tileH,
|
|
20636
|
-
dpr: context.dpr
|
|
20637
|
-
}),
|
|
20638
|
-
ctx = canvas.getContext("2d");
|
|
20639
|
-
if (ctx) {
|
|
20640
|
-
if (ctx.inuse = !0, ctx.clearMatrix(), ctx.setTransformForCurrent(!0), ctx.clearRect(0, 0, tileW, tileH), textureRadius > 0) {
|
|
20641
|
-
const r = Math.max(0, Math.min(textureRadius, Math.min(w, h) / 2)),
|
|
20642
|
-
x0 = texturePadding,
|
|
20643
|
-
y0 = texturePadding,
|
|
20644
|
-
x1 = x0 + w,
|
|
20645
|
-
y1 = y0 + h;
|
|
20646
|
-
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();
|
|
20647
|
-
}
|
|
20648
|
-
ctx.drawImage(data, texturePadding, texturePadding, w, h);
|
|
20649
|
-
const pattern = context.createPattern(canvas.nativeCanvas, "repeat");
|
|
20650
|
-
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;
|
|
20651
|
-
}
|
|
20652
|
-
canvasAllocate.free(canvas);
|
|
20653
|
-
}
|
|
20654
|
-
}
|
|
20655
|
-
const pattern = context.createPattern(data, "repeat");
|
|
20656
|
-
return (null == pattern ? void 0 : pattern.setTransform) && pattern.setTransform(new DOMMatrix([1 / context.dpr, 0, 0, 1 / context.dpr, 0, 0])), pattern;
|
|
20657
|
-
}
|
|
20658
20595
|
}
|
|
20659
20596
|
const defaultBaseTextureRenderContribution = new DefaultBaseTextureRenderContribution();
|
|
20660
20597
|
|
|
@@ -61853,10 +61790,13 @@
|
|
|
61853
61790
|
(_a = this._chart) === null || _a === void 0 ? void 0 : _a.setLayout(layout);
|
|
61854
61791
|
}
|
|
61855
61792
|
reLayout() {
|
|
61856
|
-
|
|
61857
|
-
|
|
61858
|
-
|
|
61859
|
-
|
|
61793
|
+
if (!this._chart || !this._compiler || this._isReleased) {
|
|
61794
|
+
return;
|
|
61795
|
+
}
|
|
61796
|
+
this._chart.resetLayoutItemTag();
|
|
61797
|
+
this._chart.setLayoutTag(true, null, false);
|
|
61798
|
+
this._compiler.render();
|
|
61799
|
+
this._chart.onEvaluateEnd();
|
|
61860
61800
|
}
|
|
61861
61801
|
getCompiler() {
|
|
61862
61802
|
return this._compiler;
|
|
@@ -62245,7 +62185,7 @@
|
|
|
62245
62185
|
});
|
|
62246
62186
|
};
|
|
62247
62187
|
|
|
62248
|
-
const version = "2.0.
|
|
62188
|
+
const version = "2.0.22";
|
|
62249
62189
|
|
|
62250
62190
|
const addVChartProperty = (data, op) => {
|
|
62251
62191
|
const context = op.beforeCall();
|
|
@@ -74092,45 +74032,55 @@
|
|
|
74092
74032
|
}, exports.STATE_VALUE_ENUM.STATE_NORMAL, exports.AttributeLevel.Series);
|
|
74093
74033
|
}
|
|
74094
74034
|
}
|
|
74095
|
-
|
|
74096
|
-
var _a
|
|
74097
|
-
this.
|
|
74098
|
-
|
|
74099
|
-
|
|
74100
|
-
|
|
74101
|
-
|
|
74102
|
-
|
|
74103
|
-
|
|
74035
|
+
_updateSymbolGraphicPosition() {
|
|
74036
|
+
var _a;
|
|
74037
|
+
const graphics = (_a = this._symbolMark) === null || _a === void 0 ? void 0 : _a.getGraphics();
|
|
74038
|
+
if (!graphics || !graphics.length) {
|
|
74039
|
+
return;
|
|
74040
|
+
}
|
|
74041
|
+
graphics.forEach((graphicItem) => {
|
|
74042
|
+
var _a, _b;
|
|
74043
|
+
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];
|
|
74044
|
+
const newPosition = this.dataToPosition(datum);
|
|
74045
|
+
if (newPosition && graphicItem) {
|
|
74046
|
+
graphicItem.setAttributes({
|
|
74047
|
+
x: newPosition.x,
|
|
74048
|
+
y: newPosition.y
|
|
74049
|
+
});
|
|
74104
74050
|
}
|
|
74105
|
-
graphics.forEach((graphicItem, i) => {
|
|
74106
|
-
var _a, _b;
|
|
74107
|
-
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];
|
|
74108
|
-
const newPosition = this.dataToPosition(datum);
|
|
74109
|
-
if (newPosition && graphicItem) {
|
|
74110
|
-
graphicItem.translateTo(newPosition.x, newPosition.y);
|
|
74111
|
-
}
|
|
74112
|
-
});
|
|
74113
74051
|
});
|
|
74114
|
-
|
|
74115
|
-
|
|
74116
|
-
|
|
74052
|
+
}
|
|
74053
|
+
_ensureLabelGraphicPostMatrix() {
|
|
74054
|
+
var _a, _b;
|
|
74055
|
+
const labelGraphic = (_b = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent()) === null || _b === void 0 ? void 0 : _b.getComponent();
|
|
74056
|
+
if (labelGraphic && !labelGraphic.attribute.postMatrix) {
|
|
74057
|
+
labelGraphic.setAttributes({
|
|
74058
|
+
postMatrix: new Matrix()
|
|
74059
|
+
});
|
|
74117
74060
|
}
|
|
74118
|
-
|
|
74119
|
-
|
|
74120
|
-
|
|
74061
|
+
return labelGraphic;
|
|
74062
|
+
}
|
|
74063
|
+
handleZoom(e) {
|
|
74064
|
+
const { scale, scaleCenter } = e;
|
|
74065
|
+
if (scale === 1) {
|
|
74066
|
+
return;
|
|
74121
74067
|
}
|
|
74122
|
-
|
|
74123
|
-
|
|
74124
|
-
|
|
74125
|
-
|
|
74126
|
-
postMatrix: new Matrix()
|
|
74127
|
-
});
|
|
74128
|
-
}
|
|
74129
|
-
labelGroup.scale(e.scale, e.scale, e.scaleCenter);
|
|
74068
|
+
this._updateSymbolGraphicPosition();
|
|
74069
|
+
const labelGraphic = this._ensureLabelGraphicPostMatrix();
|
|
74070
|
+
if (labelGraphic) {
|
|
74071
|
+
labelGraphic.scale(scale, scale, scaleCenter);
|
|
74130
74072
|
}
|
|
74131
74073
|
}
|
|
74132
74074
|
handlePan(e) {
|
|
74133
|
-
|
|
74075
|
+
const { delta } = e;
|
|
74076
|
+
if ((delta === null || delta === void 0 ? void 0 : delta[0]) === 0 && (delta === null || delta === void 0 ? void 0 : delta[1]) === 0) {
|
|
74077
|
+
return;
|
|
74078
|
+
}
|
|
74079
|
+
this._updateSymbolGraphicPosition();
|
|
74080
|
+
const labelGraphic = this._ensureLabelGraphicPostMatrix();
|
|
74081
|
+
if (labelGraphic) {
|
|
74082
|
+
labelGraphic.translate(delta[0], delta[1]);
|
|
74083
|
+
}
|
|
74134
74084
|
}
|
|
74135
74085
|
getDefaultShapeType() {
|
|
74136
74086
|
return 'circle';
|
|
@@ -75389,7 +75339,7 @@
|
|
|
75389
75339
|
this._mapViewData = null;
|
|
75390
75340
|
}
|
|
75391
75341
|
handleZoom(e) {
|
|
75392
|
-
var _a
|
|
75342
|
+
var _a;
|
|
75393
75343
|
const { scale, scaleCenter } = e;
|
|
75394
75344
|
if (scale === 1) {
|
|
75395
75345
|
return;
|
|
@@ -75403,26 +75353,13 @@
|
|
|
75403
75353
|
}
|
|
75404
75354
|
pathGroup.scale(scale, scale, scaleCenter);
|
|
75405
75355
|
}
|
|
75406
|
-
const
|
|
75407
|
-
if (
|
|
75408
|
-
|
|
75409
|
-
}
|
|
75410
|
-
const vgrammarLabel = (_b = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getComponent) === null || _b === void 0 ? void 0 : _b.call(labelComponent);
|
|
75411
|
-
if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.evaluate) {
|
|
75412
|
-
vgrammarLabel.evaluate(null, null);
|
|
75413
|
-
}
|
|
75414
|
-
const labelGroup = (_c = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getProduct) === null || _c === void 0 ? void 0 : _c.call(labelComponent);
|
|
75415
|
-
if (labelGroup && scale && scaleCenter) {
|
|
75416
|
-
if (!((_d = labelGroup.attribute) === null || _d === void 0 ? void 0 : _d.postMatrix)) {
|
|
75417
|
-
labelGroup.setAttributes({
|
|
75418
|
-
postMatrix: new Matrix()
|
|
75419
|
-
});
|
|
75420
|
-
}
|
|
75421
|
-
labelGroup.scale(scale, scale, scaleCenter);
|
|
75356
|
+
const vgrammarLabel = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
|
|
75357
|
+
if (vgrammarLabel) {
|
|
75358
|
+
vgrammarLabel.renderInner();
|
|
75422
75359
|
}
|
|
75423
75360
|
}
|
|
75424
75361
|
handlePan(e) {
|
|
75425
|
-
var _a
|
|
75362
|
+
var _a;
|
|
75426
75363
|
const { delta } = e;
|
|
75427
75364
|
if (delta[0] === 0 && delta[1] === 0) {
|
|
75428
75365
|
return;
|
|
@@ -75436,22 +75373,9 @@
|
|
|
75436
75373
|
}
|
|
75437
75374
|
pathGroup.translate(delta[0], delta[1]);
|
|
75438
75375
|
}
|
|
75439
|
-
const
|
|
75440
|
-
if (
|
|
75441
|
-
|
|
75442
|
-
}
|
|
75443
|
-
const vgrammarLabel = (_b = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getComponent) === null || _b === void 0 ? void 0 : _b.call(labelComponent);
|
|
75444
|
-
if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.evaluate) {
|
|
75445
|
-
vgrammarLabel.evaluate(null, null);
|
|
75446
|
-
}
|
|
75447
|
-
const labelGroup = (_c = labelComponent === null || labelComponent === void 0 ? void 0 : labelComponent.getProduct) === null || _c === void 0 ? void 0 : _c.call(labelComponent);
|
|
75448
|
-
if (labelGroup && delta) {
|
|
75449
|
-
if (!((_d = labelGroup.attribute) === null || _d === void 0 ? void 0 : _d.postMatrix)) {
|
|
75450
|
-
labelGroup.setAttributes({
|
|
75451
|
-
postMatrix: new Matrix()
|
|
75452
|
-
});
|
|
75453
|
-
}
|
|
75454
|
-
labelGroup.translate(delta[0], delta[1]);
|
|
75376
|
+
const vgrammarLabel = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
|
|
75377
|
+
if (vgrammarLabel) {
|
|
75378
|
+
vgrammarLabel.renderInner();
|
|
75455
75379
|
}
|
|
75456
75380
|
}
|
|
75457
75381
|
getDatumCenter(datum) {
|