@visactor/vchart 2.1.0 → 2.1.2-alpha.0
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 +483 -327
- package/build/index.js +483 -327
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/component/player/player.js +10 -5
- package/cjs/component/player/player.js.map +1 -1
- package/cjs/constant/event.js +2 -1
- package/cjs/constant/polar.js +1 -2
- package/cjs/constant/scatter.js +1 -1
- package/cjs/constant/scroll-bar.js +1 -1
- package/cjs/constant/sunburst.js +1 -1
- package/cjs/constant/waterfall.js +1 -1
- package/cjs/constant/word-cloud.js +1 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +2 -2
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/instance-manager.js +1 -1
- package/cjs/core/interface.js +1 -1
- package/cjs/core/util.js +1 -1
- package/cjs/core/vchart.js +7 -4
- package/cjs/core/vchart.js.map +1 -1
- package/esm/component/player/player.js +10 -5
- package/esm/component/player/player.js.map +1 -1
- package/esm/constant/event.js +2 -1
- package/esm/constant/polar.js +1 -2
- package/esm/constant/scatter.js +1 -1
- package/esm/constant/scroll-bar.js +1 -1
- package/esm/constant/sunburst.js +1 -1
- package/esm/constant/waterfall.js +1 -1
- package/esm/constant/word-cloud.js +1 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +2 -2
- package/esm/core/index.js.map +1 -1
- package/esm/core/instance-manager.js +1 -1
- package/esm/core/interface.js +1 -1
- package/esm/core/util.js +1 -1
- package/esm/core/vchart.js +7 -4
- package/esm/core/vchart.js.map +1 -1
- package/package.json +10 -10
package/build/index.js
CHANGED
|
@@ -15189,9 +15189,10 @@
|
|
|
15189
15189
|
} else assignFallbackAttr(this.getStateTransitionDefaultAttribute(key, staticTargetAttrs));
|
|
15190
15190
|
}), extraAttrs;
|
|
15191
15191
|
}
|
|
15192
|
-
syncObjectToSnapshot(target, snapshot) {
|
|
15192
|
+
syncObjectToSnapshot(target, snapshot, excludedKeys) {
|
|
15193
15193
|
const delta = new Map();
|
|
15194
15194
|
return new Set([...Object.keys(target), ...Object.keys(snapshot)]).forEach(key => {
|
|
15195
|
+
if (!0 === (null == excludedKeys ? void 0 : excludedKeys[key])) return;
|
|
15195
15196
|
const hasNext = Object.prototype.hasOwnProperty.call(snapshot, key),
|
|
15196
15197
|
previousValue = target[key];
|
|
15197
15198
|
if (!hasNext) return void (Object.prototype.hasOwnProperty.call(target, key) && (delta.set(key, {
|
|
@@ -15205,17 +15206,17 @@
|
|
|
15205
15206
|
}), target[key] = cloneAttributeValue(nextValue));
|
|
15206
15207
|
}), delta;
|
|
15207
15208
|
}
|
|
15208
|
-
_syncAttribute() {
|
|
15209
|
+
_syncAttribute(excludedKeys) {
|
|
15209
15210
|
this.attribute === this.baseAttributes && this.resolvedStatePatch && this.detachAttributeFromBaseAttributes();
|
|
15210
15211
|
const snapshot = this.buildStaticAttributeSnapshot(),
|
|
15211
|
-
delta = this.syncObjectToSnapshot(this.attribute, snapshot);
|
|
15212
|
-
return this.valid = this.isValid(), this.attributeMayContainTransientAttrs =
|
|
15212
|
+
delta = this.syncObjectToSnapshot(this.attribute, snapshot, excludedKeys);
|
|
15213
|
+
return this.valid = this.isValid(), this.attributeMayContainTransientAttrs = !!excludedKeys, delta;
|
|
15213
15214
|
}
|
|
15214
|
-
_syncFinalAttributeFromStaticTruth() {
|
|
15215
|
+
_syncFinalAttributeFromStaticTruth(excludedKeys) {
|
|
15215
15216
|
const target = this.finalAttribute;
|
|
15216
15217
|
if (!target) return;
|
|
15217
15218
|
const snapshot = this.buildStaticAttributeSnapshot();
|
|
15218
|
-
this.syncObjectToSnapshot(target, snapshot);
|
|
15219
|
+
this.syncObjectToSnapshot(target, snapshot, excludedKeys);
|
|
15219
15220
|
}
|
|
15220
15221
|
mergeAttributeDeltaCategory(category, key, prev, next) {
|
|
15221
15222
|
var _a;
|
|
@@ -15272,6 +15273,25 @@
|
|
|
15272
15273
|
this.getBaseAttributesStorage()[key] = params[key];
|
|
15273
15274
|
}
|
|
15274
15275
|
}
|
|
15276
|
+
_commitAnimationStaticAttributes(params, context) {
|
|
15277
|
+
if (!params) return;
|
|
15278
|
+
const source = params,
|
|
15279
|
+
baseAttributes = this.getBaseAttributesStorage(),
|
|
15280
|
+
target = this.attribute,
|
|
15281
|
+
delta = new Map();
|
|
15282
|
+
let hasKeys = !1;
|
|
15283
|
+
for (const key in source) {
|
|
15284
|
+
if (!Object.prototype.hasOwnProperty.call(source, key)) continue;
|
|
15285
|
+
hasKeys = !0;
|
|
15286
|
+
const previousValue = target[key],
|
|
15287
|
+
nextValue = source[key];
|
|
15288
|
+
baseAttributes[key] = nextValue, target[key] = nextValue, areAttributeValuesEqual(previousValue, nextValue) || delta.set(key, {
|
|
15289
|
+
prev: previousValue,
|
|
15290
|
+
next: nextValue
|
|
15291
|
+
});
|
|
15292
|
+
}
|
|
15293
|
+
hasKeys && (this.valid = this.isValid(), this.attributeMayContainTransientAttrs = !0, this.submitUpdateByDelta(delta), this.onAttributeUpdate(context));
|
|
15294
|
+
}
|
|
15275
15295
|
applyAnimationTransientAttributes(params, forceUpdateTag = !1, context) {
|
|
15276
15296
|
const source = params;
|
|
15277
15297
|
let target,
|
|
@@ -15294,9 +15314,9 @@
|
|
|
15294
15314
|
}
|
|
15295
15315
|
delta.size && (this.attributeMayContainTransientAttrs = !0), this.valid = this.isValid(), this.submitUpdateByDelta(delta, forceUpdateTag), this.onAttributeUpdate(context);
|
|
15296
15316
|
}
|
|
15297
|
-
_restoreAttributeFromStaticTruth(context) {
|
|
15298
|
-
this._syncFinalAttributeFromStaticTruth();
|
|
15299
|
-
const delta = this._syncAttribute();
|
|
15317
|
+
_restoreAttributeFromStaticTruth(context, excludedKeys) {
|
|
15318
|
+
this._syncFinalAttributeFromStaticTruth(excludedKeys);
|
|
15319
|
+
const delta = this._syncAttribute(excludedKeys);
|
|
15300
15320
|
this.submitUpdateByDelta(delta), this.onAttributeUpdate(context);
|
|
15301
15321
|
}
|
|
15302
15322
|
collectStatePatchDeltaKeys(previousPatch, nextPatch) {
|
|
@@ -22047,14 +22067,18 @@
|
|
|
22047
22067
|
}
|
|
22048
22068
|
class ContributionStore {
|
|
22049
22069
|
static getStore(id) {
|
|
22050
|
-
|
|
22070
|
+
var _a;
|
|
22071
|
+
return null === (_a = this.store.get(id)) || void 0 === _a ? void 0 : _a.values().next().value;
|
|
22051
22072
|
}
|
|
22052
22073
|
static setStore(id, cache) {
|
|
22053
|
-
this.store.
|
|
22074
|
+
let caches = this.store.get(id);
|
|
22075
|
+
caches || (caches = new Set(), this.store.set(id, caches)), caches.add(cache);
|
|
22054
22076
|
}
|
|
22055
22077
|
static refreshAllContributions() {
|
|
22056
|
-
this.store.forEach(
|
|
22057
|
-
|
|
22078
|
+
this.store.forEach(caches => {
|
|
22079
|
+
caches.forEach(cache => {
|
|
22080
|
+
cache.refresh();
|
|
22081
|
+
});
|
|
22058
22082
|
});
|
|
22059
22083
|
}
|
|
22060
22084
|
}
|
|
@@ -23355,6 +23379,9 @@
|
|
|
23355
23379
|
}
|
|
23356
23380
|
const defaultGroupBackgroundRenderContribution = new DefaultGroupBackgroundRenderContribution();
|
|
23357
23381
|
|
|
23382
|
+
function hasDisabledStrokeSide(stroke) {
|
|
23383
|
+
return Array.isArray(stroke) && stroke.some(s => !1 === s || null === s);
|
|
23384
|
+
}
|
|
23358
23385
|
class DefaultRectRenderContribution {
|
|
23359
23386
|
constructor() {
|
|
23360
23387
|
this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
|
|
@@ -23410,7 +23437,7 @@
|
|
|
23410
23437
|
const {
|
|
23411
23438
|
stroke = groupAttribute.stroke
|
|
23412
23439
|
} = group.attribute;
|
|
23413
|
-
|
|
23440
|
+
hasDisabledStrokeSide(stroke) && (doFillOrStroke.doStroke = !1);
|
|
23414
23441
|
}
|
|
23415
23442
|
}
|
|
23416
23443
|
class SplitRectAfterRenderContribution {
|
|
@@ -23431,7 +23458,7 @@
|
|
|
23431
23458
|
width: width,
|
|
23432
23459
|
height: height
|
|
23433
23460
|
} = rect.attribute;
|
|
23434
|
-
if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0,
|
|
23461
|
+
if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0, hasDisabledStrokeSide(stroke)) {
|
|
23435
23462
|
if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), !(0 === cornerRadius || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num))) {
|
|
23436
23463
|
let lastStroke,
|
|
23437
23464
|
lastStrokeI = 0;
|
|
@@ -24461,6 +24488,199 @@
|
|
|
24461
24488
|
}
|
|
24462
24489
|
}
|
|
24463
24490
|
|
|
24491
|
+
function drawArcPath(arc, context, cx, cy, z, outerRadius, innerRadius) {
|
|
24492
|
+
const {
|
|
24493
|
+
startAngle: startAngle,
|
|
24494
|
+
endAngle: endAngle
|
|
24495
|
+
} = arc.getParsedAngle(),
|
|
24496
|
+
deltaAngle = abs$1(endAngle - startAngle),
|
|
24497
|
+
clockwise = endAngle > startAngle;
|
|
24498
|
+
let collapsedToLine = !1;
|
|
24499
|
+
if (outerRadius < innerRadius) {
|
|
24500
|
+
const temp = outerRadius;
|
|
24501
|
+
outerRadius = innerRadius, innerRadius = temp;
|
|
24502
|
+
}
|
|
24503
|
+
if (outerRadius <= epsilon$1) context.moveTo(cx, cy, z);else if (deltaAngle >= pi2 - epsilon$1) context.moveTo(cx + outerRadius * cos$1(startAngle), cy + outerRadius * sin$1(startAngle), z), context.arc(cx, cy, outerRadius, startAngle, endAngle, !clockwise, z), innerRadius > epsilon$1 && (context.moveTo(cx + innerRadius * cos$1(endAngle), cy + innerRadius * sin$1(endAngle), z), context.arc(cx, cy, innerRadius, endAngle, startAngle, clockwise, z));else {
|
|
24504
|
+
const {
|
|
24505
|
+
outerDeltaAngle: outerDeltaAngle,
|
|
24506
|
+
innerDeltaAngle: innerDeltaAngle,
|
|
24507
|
+
outerStartAngle: outerStartAngle,
|
|
24508
|
+
outerEndAngle: outerEndAngle,
|
|
24509
|
+
innerEndAngle: innerEndAngle,
|
|
24510
|
+
innerStartAngle: innerStartAngle
|
|
24511
|
+
} = arc.getParsePadAngle(startAngle, endAngle),
|
|
24512
|
+
xors = outerRadius * cos$1(outerStartAngle),
|
|
24513
|
+
yors = outerRadius * sin$1(outerStartAngle),
|
|
24514
|
+
xire = innerRadius * cos$1(innerEndAngle),
|
|
24515
|
+
yire = innerRadius * sin$1(innerEndAngle);
|
|
24516
|
+
outerDeltaAngle < .001 ? collapsedToLine = !0 : (context.moveTo(cx + xors, cy + yors, z), context.arc(cx, cy, outerRadius, outerStartAngle, outerEndAngle, !clockwise, z)), !(innerRadius > epsilon$1) || innerDeltaAngle < .001 ? (context.lineTo(cx + xire, cy + yire, z), collapsedToLine = !0) : (context.lineTo(cx + xire, cy + yire, z), context.arc(cx, cy, innerRadius, innerEndAngle, innerStartAngle, clockwise, z));
|
|
24517
|
+
}
|
|
24518
|
+
return context.closePath(), collapsedToLine;
|
|
24519
|
+
}
|
|
24520
|
+
function drawInnerOuterArcPath(arc, context, cx, cy, z1, z2, radius, getParsePadAngle) {
|
|
24521
|
+
const {
|
|
24522
|
+
startAngle: startAngle,
|
|
24523
|
+
endAngle: endAngle
|
|
24524
|
+
} = arc.getParsedAngle(),
|
|
24525
|
+
deltaAngle = abs$1(endAngle - startAngle),
|
|
24526
|
+
clockwise = endAngle > startAngle;
|
|
24527
|
+
let collapsedToLine = !1;
|
|
24528
|
+
if (radius <= epsilon$1) context.moveTo(cx, cy, z1);else if (deltaAngle >= pi2 - epsilon$1) context.moveTo(cx + radius * cos$1(startAngle), cy + radius * sin$1(startAngle), z1), context.arc(cx, cy, radius, startAngle, endAngle, !clockwise, z1), context.lineTo(cx + radius * cos$1(endAngle), cy + radius * sin$1(endAngle), z2), context.arc(cx, cy, radius, endAngle, startAngle, clockwise, z2);else {
|
|
24529
|
+
const {
|
|
24530
|
+
innerouterDeltaAngle: innerouterDeltaAngle,
|
|
24531
|
+
innerouterStartAngle: innerouterStartAngle,
|
|
24532
|
+
innerouterEndAngle: innerouterEndAngle
|
|
24533
|
+
} = getParsePadAngle(startAngle, endAngle),
|
|
24534
|
+
xors = radius * cos$1(innerouterStartAngle),
|
|
24535
|
+
yors = radius * sin$1(innerouterStartAngle),
|
|
24536
|
+
xore = radius * cos$1(innerouterEndAngle),
|
|
24537
|
+
yore = radius * sin$1(innerouterEndAngle);
|
|
24538
|
+
innerouterDeltaAngle < .001 ? collapsedToLine = !0 : (context.moveTo(cx + xors, cy + yors, z1), context.arc(cx, cy, radius, innerouterStartAngle, innerouterEndAngle, !clockwise, z1), context.lineTo(cx + xore, cy + yore, z2), context.arc(cx, cy, radius, innerouterEndAngle, innerouterStartAngle, clockwise, z2));
|
|
24539
|
+
}
|
|
24540
|
+
return context.closePath(), collapsedToLine;
|
|
24541
|
+
}
|
|
24542
|
+
class DefaultCanvasArc3DRender extends BaseRender {
|
|
24543
|
+
constructor() {
|
|
24544
|
+
super(...arguments), this.numberType = ARC3D_NUMBER_TYPE;
|
|
24545
|
+
}
|
|
24546
|
+
drawShape(arc, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
24547
|
+
var _a;
|
|
24548
|
+
const arcAttribute = getTheme$1(arc, null == params ? void 0 : params.theme).arc,
|
|
24549
|
+
{
|
|
24550
|
+
fill = arcAttribute.fill
|
|
24551
|
+
} = arc.attribute,
|
|
24552
|
+
data = this.valid(arc, arcAttribute, fillCb, strokeCb);
|
|
24553
|
+
if (!data) return;
|
|
24554
|
+
const {
|
|
24555
|
+
fVisible: fVisible,
|
|
24556
|
+
sVisible: sVisible,
|
|
24557
|
+
doFill: doFill,
|
|
24558
|
+
doStroke: doStroke
|
|
24559
|
+
} = data,
|
|
24560
|
+
z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
|
|
24561
|
+
{
|
|
24562
|
+
outerPadding = arcAttribute.outerPadding,
|
|
24563
|
+
innerPadding = arcAttribute.innerPadding,
|
|
24564
|
+
height = 10
|
|
24565
|
+
} = arc.attribute;
|
|
24566
|
+
let {
|
|
24567
|
+
outerRadius = arcAttribute.outerRadius,
|
|
24568
|
+
innerRadius = arcAttribute.innerRadius
|
|
24569
|
+
} = arc.attribute;
|
|
24570
|
+
outerRadius += outerPadding, innerRadius -= innerPadding;
|
|
24571
|
+
const rgbArray = ColorStore.Get(fill, ColorType.Color255),
|
|
24572
|
+
{
|
|
24573
|
+
light: light
|
|
24574
|
+
} = drawContext.stage || {},
|
|
24575
|
+
face = drawContext.hack_pieFace,
|
|
24576
|
+
z_face = {
|
|
24577
|
+
top: z,
|
|
24578
|
+
bottom: z + height
|
|
24579
|
+
},
|
|
24580
|
+
n_face = {
|
|
24581
|
+
top: [0, 1, 0],
|
|
24582
|
+
bottom: [0, -1, 0],
|
|
24583
|
+
outside: [1, 0, -1],
|
|
24584
|
+
inside: [1, 0, -1]
|
|
24585
|
+
};
|
|
24586
|
+
"bottom" === face || "top" === face ? (context.beginPath(), drawArcPath(arc, context, x, y, z_face[face], outerRadius, innerRadius), context.setShadowBlendStyle && context.setShadowBlendStyle(arc, arc.attribute, arcAttribute), doFill && (fillCb ? fillCb(context, arc.attribute, arcAttribute) : fVisible && (context.setCommonStyle(arc, arc.attribute, x, y, arcAttribute), context.fillStyle = light ? light.computeColor(n_face[face], rgbArray) : fill, context.fill())), doStroke && (strokeCb ? strokeCb(context, arc.attribute, arcAttribute) : sVisible && (context.setStrokeStyle(arc, arc.attribute, x, y, arcAttribute), context.stroke()))) : "outside" !== face && "inside" !== face || ("inside" === face && (context.save(), context.beginPath(), context.arc(x, y, innerRadius, 0, pi2, !0, z_face.top), context.clip()), context.beginPath(), drawInnerOuterArcPath(arc, context, x, y, z_face.top, z_face.bottom, "outside" === face ? outerRadius : innerRadius, (startAngle, endAngle) => {
|
|
24587
|
+
const {
|
|
24588
|
+
outerDeltaAngle: outerDeltaAngle,
|
|
24589
|
+
innerDeltaAngle: innerDeltaAngle,
|
|
24590
|
+
outerStartAngle: outerStartAngle,
|
|
24591
|
+
outerEndAngle: outerEndAngle,
|
|
24592
|
+
innerEndAngle: innerEndAngle,
|
|
24593
|
+
innerStartAngle: innerStartAngle
|
|
24594
|
+
} = arc.getParsePadAngle(startAngle, endAngle);
|
|
24595
|
+
return "outside" === face ? {
|
|
24596
|
+
innerouterDeltaAngle: outerDeltaAngle,
|
|
24597
|
+
innerouterEndAngle: outerEndAngle,
|
|
24598
|
+
innerouterStartAngle: outerStartAngle
|
|
24599
|
+
} : {
|
|
24600
|
+
innerouterDeltaAngle: innerDeltaAngle,
|
|
24601
|
+
innerouterEndAngle: innerEndAngle,
|
|
24602
|
+
innerouterStartAngle: innerStartAngle
|
|
24603
|
+
};
|
|
24604
|
+
}), context.setShadowBlendStyle && context.setShadowBlendStyle(arc, arc.attribute, arcAttribute), doFill && (fillCb ? fillCb(context, arc.attribute, arcAttribute) : fVisible && (context.setCommonStyle(arc, arc.attribute, x, y, arcAttribute), context.fillStyle = light ? light.computeColor(n_face[face], rgbArray) : fill, context.fill())), doStroke && (strokeCb ? strokeCb(context, arc.attribute, arcAttribute) : sVisible && (context.setStrokeStyle(arc, arc.attribute, x, y, arcAttribute), context.stroke())), "inside" === face && context.restore());
|
|
24605
|
+
}
|
|
24606
|
+
draw(arc, renderService, drawContext, params) {
|
|
24607
|
+
const arcAttribute = getTheme$1(arc, null == params ? void 0 : params.theme).arc;
|
|
24608
|
+
this._draw(arc, arcAttribute, !1, drawContext, params);
|
|
24609
|
+
}
|
|
24610
|
+
}
|
|
24611
|
+
|
|
24612
|
+
class Base3dRender extends BaseRender {
|
|
24613
|
+
stroke(x, y, z, face3d, context) {
|
|
24614
|
+
const vertices = face3d.vertices;
|
|
24615
|
+
face3d.edges.forEach(edge => {
|
|
24616
|
+
const p1 = vertices[edge[0]],
|
|
24617
|
+
v1 = {
|
|
24618
|
+
x: x + p1[0],
|
|
24619
|
+
y: y + p1[1],
|
|
24620
|
+
z: z + p1[2]
|
|
24621
|
+
},
|
|
24622
|
+
p2 = vertices[edge[1]],
|
|
24623
|
+
v2 = {
|
|
24624
|
+
x: x + p2[0],
|
|
24625
|
+
y: y + p2[1],
|
|
24626
|
+
z: z + p2[2]
|
|
24627
|
+
};
|
|
24628
|
+
context.beginPath(), context.moveTo(v1.x, v1.y, v1.z), context.lineTo(v2.x, v2.y, v2.z), context.stroke();
|
|
24629
|
+
});
|
|
24630
|
+
}
|
|
24631
|
+
fill(x, y, z, face3d, faces, fillColor, context, light, graphic3d, graphic3dAttribute, fillCb) {
|
|
24632
|
+
const rgbArray = ColorStore.Get(fillColor, ColorType.Color255),
|
|
24633
|
+
vertices = face3d.vertices,
|
|
24634
|
+
viewdVerticesZ = vertices.map(v => context.view(v[0], v[1], v[2])[2]),
|
|
24635
|
+
sortFace = [];
|
|
24636
|
+
face3d.polygons.forEach((p, i) => {
|
|
24637
|
+
if (faces && !faces[i]) return;
|
|
24638
|
+
sortFace.push({
|
|
24639
|
+
faceIdx: i,
|
|
24640
|
+
polygon: p
|
|
24641
|
+
});
|
|
24642
|
+
const {
|
|
24643
|
+
polygon: polygon
|
|
24644
|
+
} = p,
|
|
24645
|
+
z1 = viewdVerticesZ[polygon[0]],
|
|
24646
|
+
z2 = viewdVerticesZ[polygon[1]],
|
|
24647
|
+
z3 = viewdVerticesZ[polygon[2]],
|
|
24648
|
+
z4 = viewdVerticesZ[polygon[3]];
|
|
24649
|
+
p.ave_z = z1 + z2 + z3 + z4;
|
|
24650
|
+
}), sortFace.sort((a, b) => b.polygon.ave_z - a.polygon.ave_z), sortFace.forEach(item => {
|
|
24651
|
+
const {
|
|
24652
|
+
polygon: polygon,
|
|
24653
|
+
normal: normal
|
|
24654
|
+
} = item.polygon,
|
|
24655
|
+
p1 = vertices[polygon[0]],
|
|
24656
|
+
p2 = vertices[polygon[1]],
|
|
24657
|
+
p3 = vertices[polygon[2]],
|
|
24658
|
+
p4 = vertices[polygon[3]],
|
|
24659
|
+
v1 = {
|
|
24660
|
+
x: x + p1[0],
|
|
24661
|
+
y: y + p1[1],
|
|
24662
|
+
z: z + p1[2]
|
|
24663
|
+
},
|
|
24664
|
+
v2 = {
|
|
24665
|
+
x: x + p2[0],
|
|
24666
|
+
y: y + p2[1],
|
|
24667
|
+
z: z + p2[2]
|
|
24668
|
+
},
|
|
24669
|
+
v3 = {
|
|
24670
|
+
x: x + p3[0],
|
|
24671
|
+
y: y + p3[1],
|
|
24672
|
+
z: z + p3[2]
|
|
24673
|
+
},
|
|
24674
|
+
v4 = {
|
|
24675
|
+
x: x + p4[0],
|
|
24676
|
+
y: y + p4[1],
|
|
24677
|
+
z: z + p4[2]
|
|
24678
|
+
};
|
|
24679
|
+
context.beginPath(), context.moveTo(v1.x, v1.y, v1.z), context.lineTo(v2.x, v2.y, v2.z), context.lineTo(v3.x, v3.y, v3.z), context.lineTo(v4.x, v4.y, v4.z), context.closePath(), fillCb ? fillCb(context, graphic3d && graphic3d.attribute, graphic3dAttribute) : (context.fillStyle = light ? light.computeColor(normal, rgbArray) : fillColor, context.fill());
|
|
24680
|
+
});
|
|
24681
|
+
}
|
|
24682
|
+
}
|
|
24683
|
+
|
|
24464
24684
|
class DefaultCanvasCircleRender extends BaseRender {
|
|
24465
24685
|
constructor(graphicRenderContributions) {
|
|
24466
24686
|
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = CIRCLE_NUMBER_TYPE, this.builtinContributions = [defaultCircleRenderContribution, defaultCircleBackgroundRenderContribution, defaultCircleTextureRenderContribution], this.init(graphicRenderContributions);
|
|
@@ -25147,6 +25367,57 @@
|
|
|
25147
25367
|
}
|
|
25148
25368
|
}
|
|
25149
25369
|
|
|
25370
|
+
class DefaultCanvasRect3dRender extends Base3dRender {
|
|
25371
|
+
constructor() {
|
|
25372
|
+
super(...arguments), this.type = "rect3d", this.numberType = RECT3D_NUMBER_TYPE;
|
|
25373
|
+
}
|
|
25374
|
+
drawShape(rect, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
25375
|
+
var _a, _b;
|
|
25376
|
+
const rectAttribute = getTheme$1(rect, null == params ? void 0 : params.theme).rect,
|
|
25377
|
+
{
|
|
25378
|
+
fill = rectAttribute.fill,
|
|
25379
|
+
stroke = rectAttribute.stroke,
|
|
25380
|
+
x1: x1,
|
|
25381
|
+
y1: y1,
|
|
25382
|
+
x: originX,
|
|
25383
|
+
y: originY,
|
|
25384
|
+
opacity = rectAttribute.opacity,
|
|
25385
|
+
fillOpacity = rectAttribute.fillOpacity,
|
|
25386
|
+
lineWidth = rectAttribute.lineWidth,
|
|
25387
|
+
strokeOpacity = rectAttribute.strokeOpacity,
|
|
25388
|
+
visible = rectAttribute.visible,
|
|
25389
|
+
drawStrokeWhenZeroWH = null !== (_a = rectAttribute.drawStrokeWhenZeroWH) && void 0 !== _a && _a
|
|
25390
|
+
} = rect.attribute;
|
|
25391
|
+
let {
|
|
25392
|
+
width: width,
|
|
25393
|
+
height: height
|
|
25394
|
+
} = rect.attribute;
|
|
25395
|
+
width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0;
|
|
25396
|
+
const z = null !== (_b = this.z) && void 0 !== _b ? _b : 0,
|
|
25397
|
+
fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
|
|
25398
|
+
sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height, drawStrokeWhenZeroWH),
|
|
25399
|
+
doFill = runFill(fill),
|
|
25400
|
+
doStroke = runStroke(stroke, lineWidth);
|
|
25401
|
+
if (!rect.valid || !visible) return;
|
|
25402
|
+
if (!doFill && !doStroke) return;
|
|
25403
|
+
if (!(fVisible || sVisible || fillCb || strokeCb)) return;
|
|
25404
|
+
const {
|
|
25405
|
+
light: light
|
|
25406
|
+
} = drawContext.stage || {},
|
|
25407
|
+
face3d = rect.findFace();
|
|
25408
|
+
if (!1 !== fill) {
|
|
25409
|
+
context.setCommonStyle(rect, rect.attribute, x, y, rectAttribute);
|
|
25410
|
+
let fc = fill;
|
|
25411
|
+
"string" != typeof fc && (fc = "black"), this.fill(x, y, z, face3d, null, fc, context, light, null, null, fillCb);
|
|
25412
|
+
}
|
|
25413
|
+
!1 !== stroke && (context.setStrokeStyle(rect, rect.attribute, x, y, rectAttribute), this.stroke(x, y, z, face3d, context));
|
|
25414
|
+
}
|
|
25415
|
+
draw(rect, renderService, drawContext) {
|
|
25416
|
+
const rectAttribute = getTheme$1(rect).rect;
|
|
25417
|
+
this._draw(rect, rectAttribute, !1, drawContext);
|
|
25418
|
+
}
|
|
25419
|
+
}
|
|
25420
|
+
|
|
25150
25421
|
class DefaultCanvasSymbolRender extends BaseRender {
|
|
25151
25422
|
constructor(graphicRenderContributions) {
|
|
25152
25423
|
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = SYMBOL_NUMBER_TYPE, this.builtinContributions = [defaultSymbolRenderContribution, defaultSymbolBackgroundRenderContribution, defaultSymbolTextureRenderContribution, defaultSymbolClipRangeStrokeRenderContribution], this.init(graphicRenderContributions);
|
|
@@ -25509,6 +25780,37 @@
|
|
|
25509
25780
|
}
|
|
25510
25781
|
}
|
|
25511
25782
|
|
|
25783
|
+
class DefaultCanvasPyramid3dRender extends Base3dRender {
|
|
25784
|
+
constructor() {
|
|
25785
|
+
super(...arguments), this.type = "pyramid3d", this.numberType = PYRAMID3D_NUMBER_TYPE;
|
|
25786
|
+
}
|
|
25787
|
+
drawShape(pyramid3d, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
25788
|
+
var _a;
|
|
25789
|
+
const pyramidAttribute = getTheme$1(pyramid3d, null == params ? void 0 : params.theme).polygon,
|
|
25790
|
+
{
|
|
25791
|
+
fill = pyramidAttribute.fill,
|
|
25792
|
+
stroke = pyramidAttribute.stroke,
|
|
25793
|
+
face = [!0, !0, !0, !0, !0, !0]
|
|
25794
|
+
} = pyramid3d.attribute,
|
|
25795
|
+
z = null !== (_a = this.z) && void 0 !== _a ? _a : 0;
|
|
25796
|
+
if (!this.valid(pyramid3d, pyramidAttribute, fillCb, strokeCb)) return;
|
|
25797
|
+
const {
|
|
25798
|
+
light: light
|
|
25799
|
+
} = drawContext.stage || {},
|
|
25800
|
+
face3d = pyramid3d.findFace();
|
|
25801
|
+
if (!1 !== fill) {
|
|
25802
|
+
context.setCommonStyle(pyramid3d, pyramid3d.attribute, x, y, pyramidAttribute);
|
|
25803
|
+
let fc = fill;
|
|
25804
|
+
"string" != typeof fc && (fc = "black"), this.fill(x, y, z, face3d, face, fc, context, light, pyramid3d, pyramidAttribute, fillCb);
|
|
25805
|
+
}
|
|
25806
|
+
!1 !== stroke && (context.setStrokeStyle(pyramid3d, pyramid3d.attribute, x, y, pyramidAttribute), this.stroke(x, y, z, face3d, context));
|
|
25807
|
+
}
|
|
25808
|
+
draw(pyramid3d, renderService, drawContext) {
|
|
25809
|
+
const pyramid3dAttribute = getTheme$1(pyramid3d).polygon;
|
|
25810
|
+
this._draw(pyramid3d, pyramid3dAttribute, !1, drawContext);
|
|
25811
|
+
}
|
|
25812
|
+
}
|
|
25813
|
+
|
|
25512
25814
|
const repeatStr = ["", "repeat-x", "repeat-y", "repeat"];
|
|
25513
25815
|
function resolveImageRepeatMode(repeatX, repeatY) {
|
|
25514
25816
|
let repeat = 0;
|
|
@@ -26213,8 +26515,13 @@
|
|
|
26213
26515
|
const runtimeInstallerContext = createLegacyBindingContext();
|
|
26214
26516
|
let runtimeGlobal,
|
|
26215
26517
|
runtimeInstallerPreloaded = !1;
|
|
26216
|
-
const
|
|
26217
|
-
|
|
26518
|
+
const RUNTIME_RENDERER_NAMESPACE = "vrender:runtime-renderer",
|
|
26519
|
+
RUNTIME_PICKER_NAMESPACE = "vrender:runtime-picker",
|
|
26520
|
+
runtimeEntryKeys = new WeakMap(),
|
|
26521
|
+
runtimeDrawContributions = new WeakMap(),
|
|
26522
|
+
loadedRuntimeContributionModules = new WeakMap(),
|
|
26523
|
+
DEFAULT_RUNTIME_CONTRIBUTION_TARGETS = ["graphic-renderer"],
|
|
26524
|
+
noopUnbindRuntimeContributionService = () => {};
|
|
26218
26525
|
function ensureRuntimeInstallerPreloaded() {
|
|
26219
26526
|
runtimeInstallerPreloaded || (runtimeInstallerPreloaded = !0, bindCoreModules({
|
|
26220
26527
|
bind: runtimeInstallerContext.bind
|
|
@@ -26275,11 +26582,11 @@
|
|
|
26275
26582
|
const bindingContext = getRuntimeInstallerBindingContext();
|
|
26276
26583
|
refreshRuntimeInstallerContributions();
|
|
26277
26584
|
const renderers = bindingContext.getAll(GraphicRender),
|
|
26278
|
-
registeredKeys = getTrackedEntryKeys$1(app.registry.renderer,
|
|
26279
|
-
clearTrackedEntryKeys$1(app.registry.renderer,
|
|
26585
|
+
registeredKeys = getTrackedEntryKeys$1(app.registry.renderer, RUNTIME_RENDERER_NAMESPACE);
|
|
26586
|
+
clearTrackedEntryKeys$1(app.registry.renderer, RUNTIME_RENDERER_NAMESPACE, null === (_a = app.registry.renderer.unregister) || void 0 === _a ? void 0 : _a.bind(app.registry.renderer)), registerRuntimeEntries((key, renderer) => {
|
|
26280
26587
|
var _a;
|
|
26281
26588
|
null === (_a = null == renderer ? void 0 : renderer.reInit) || void 0 === _a || _a.call(renderer), app.registry.renderer.register(key, renderer), registeredKeys.add(key);
|
|
26282
|
-
}, renderers,
|
|
26589
|
+
}, renderers, RUNTIME_RENDERER_NAMESPACE);
|
|
26283
26590
|
}
|
|
26284
26591
|
function installRuntimeDrawContributionsToApp(app) {
|
|
26285
26592
|
var _a;
|
|
@@ -26301,10 +26608,45 @@
|
|
|
26301
26608
|
const bindingContext = getRuntimeInstallerBindingContext();
|
|
26302
26609
|
refreshRuntimeInstallerContributions();
|
|
26303
26610
|
const pickers = bindingContext.getAll(serviceIdentifier),
|
|
26304
|
-
registeredKeys = getTrackedEntryKeys$1(app.registry.picker,
|
|
26305
|
-
clearTrackedEntryKeys$1(app.registry.picker,
|
|
26611
|
+
registeredKeys = getTrackedEntryKeys$1(app.registry.picker, RUNTIME_PICKER_NAMESPACE);
|
|
26612
|
+
clearTrackedEntryKeys$1(app.registry.picker, RUNTIME_PICKER_NAMESPACE, null === (_a = app.registry.picker.unregister) || void 0 === _a ? void 0 : _a.bind(app.registry.picker)), registerRuntimeEntries((key, picker) => {
|
|
26306
26613
|
app.registry.picker.register(key, picker), registeredKeys.add(key);
|
|
26307
|
-
}, pickers,
|
|
26614
|
+
}, pickers, RUNTIME_PICKER_NAMESPACE);
|
|
26615
|
+
}
|
|
26616
|
+
function getRuntimeContributionModuleIdentity(module) {
|
|
26617
|
+
return module;
|
|
26618
|
+
}
|
|
26619
|
+
function hasLoadedRuntimeContributionModule(context, module) {
|
|
26620
|
+
var _a, _b;
|
|
26621
|
+
return null !== (_b = null === (_a = loadedRuntimeContributionModules.get(context)) || void 0 === _a ? void 0 : _a.has(getRuntimeContributionModuleIdentity(module))) && void 0 !== _b && _b;
|
|
26622
|
+
}
|
|
26623
|
+
function markRuntimeContributionModuleLoaded(context, module) {
|
|
26624
|
+
let modules = loadedRuntimeContributionModules.get(context);
|
|
26625
|
+
modules || (modules = new WeakSet(), loadedRuntimeContributionModules.set(context, modules)), modules.add(getRuntimeContributionModuleIdentity(module));
|
|
26626
|
+
}
|
|
26627
|
+
function loadRuntimeContributionModuleToContext(context, module) {
|
|
26628
|
+
hasLoadedRuntimeContributionModule(context, module) || ("function" == typeof module ? module(context) : module.registry(context.bind, noopUnbindRuntimeContributionService, context.isBound, context.rebind), markRuntimeContributionModuleLoaded(context, module));
|
|
26629
|
+
}
|
|
26630
|
+
function isRuntimePickerTarget(target) {
|
|
26631
|
+
return "object" == typeof target && null !== target && "picker" in target;
|
|
26632
|
+
}
|
|
26633
|
+
function installRuntimeContributionTargetsToApp(app, targets) {
|
|
26634
|
+
const resolvedTargets = null != targets ? targets : DEFAULT_RUNTIME_CONTRIBUTION_TARGETS;
|
|
26635
|
+
let installGraphicRenderers = !1,
|
|
26636
|
+
installDrawContributions = !1;
|
|
26637
|
+
const pickerTargets = new Set();
|
|
26638
|
+
resolvedTargets.forEach(target => {
|
|
26639
|
+
"graphic-renderer" === target ? installGraphicRenderers = !0 : "draw-contribution" === target ? installDrawContributions = !0 : isRuntimePickerTarget(target) && pickerTargets.add(target.picker);
|
|
26640
|
+
}), installDrawContributions && installRuntimeDrawContributionsToApp(app), installGraphicRenderers && installRuntimeGraphicRenderersToApp(app), pickerTargets.forEach(serviceIdentifier => {
|
|
26641
|
+
installRuntimePickersToApp(app, serviceIdentifier);
|
|
26642
|
+
});
|
|
26643
|
+
}
|
|
26644
|
+
function installRuntimeContributionModule(module, {
|
|
26645
|
+
app: app,
|
|
26646
|
+
legacy = !0,
|
|
26647
|
+
targets: targets
|
|
26648
|
+
} = {}) {
|
|
26649
|
+
loadRuntimeContributionModuleToContext(getRuntimeInstallerBindingContext(), module), legacy && (preLoadAllModule(), loadRuntimeContributionModuleToContext(getLegacyBindingContext(), module)), refreshRuntimeInstallerContributions(), app && installRuntimeContributionTargetsToApp(app, targets);
|
|
26308
26650
|
}
|
|
26309
26651
|
|
|
26310
26652
|
function simplifyRadialDist(points, sqTolerance) {
|
|
@@ -27078,129 +27420,6 @@
|
|
|
27078
27420
|
}
|
|
27079
27421
|
const imageModule = bindImageRenderModule;
|
|
27080
27422
|
|
|
27081
|
-
class Base3dRender extends BaseRender {
|
|
27082
|
-
stroke(x, y, z, face3d, context) {
|
|
27083
|
-
const vertices = face3d.vertices;
|
|
27084
|
-
face3d.edges.forEach(edge => {
|
|
27085
|
-
const p1 = vertices[edge[0]],
|
|
27086
|
-
v1 = {
|
|
27087
|
-
x: x + p1[0],
|
|
27088
|
-
y: y + p1[1],
|
|
27089
|
-
z: z + p1[2]
|
|
27090
|
-
},
|
|
27091
|
-
p2 = vertices[edge[1]],
|
|
27092
|
-
v2 = {
|
|
27093
|
-
x: x + p2[0],
|
|
27094
|
-
y: y + p2[1],
|
|
27095
|
-
z: z + p2[2]
|
|
27096
|
-
};
|
|
27097
|
-
context.beginPath(), context.moveTo(v1.x, v1.y, v1.z), context.lineTo(v2.x, v2.y, v2.z), context.stroke();
|
|
27098
|
-
});
|
|
27099
|
-
}
|
|
27100
|
-
fill(x, y, z, face3d, faces, fillColor, context, light, graphic3d, graphic3dAttribute, fillCb) {
|
|
27101
|
-
const rgbArray = ColorStore.Get(fillColor, ColorType.Color255),
|
|
27102
|
-
vertices = face3d.vertices,
|
|
27103
|
-
viewdVerticesZ = vertices.map(v => context.view(v[0], v[1], v[2])[2]),
|
|
27104
|
-
sortFace = [];
|
|
27105
|
-
face3d.polygons.forEach((p, i) => {
|
|
27106
|
-
if (faces && !faces[i]) return;
|
|
27107
|
-
sortFace.push({
|
|
27108
|
-
faceIdx: i,
|
|
27109
|
-
polygon: p
|
|
27110
|
-
});
|
|
27111
|
-
const {
|
|
27112
|
-
polygon: polygon
|
|
27113
|
-
} = p,
|
|
27114
|
-
z1 = viewdVerticesZ[polygon[0]],
|
|
27115
|
-
z2 = viewdVerticesZ[polygon[1]],
|
|
27116
|
-
z3 = viewdVerticesZ[polygon[2]],
|
|
27117
|
-
z4 = viewdVerticesZ[polygon[3]];
|
|
27118
|
-
p.ave_z = z1 + z2 + z3 + z4;
|
|
27119
|
-
}), sortFace.sort((a, b) => b.polygon.ave_z - a.polygon.ave_z), sortFace.forEach(item => {
|
|
27120
|
-
const {
|
|
27121
|
-
polygon: polygon,
|
|
27122
|
-
normal: normal
|
|
27123
|
-
} = item.polygon,
|
|
27124
|
-
p1 = vertices[polygon[0]],
|
|
27125
|
-
p2 = vertices[polygon[1]],
|
|
27126
|
-
p3 = vertices[polygon[2]],
|
|
27127
|
-
p4 = vertices[polygon[3]],
|
|
27128
|
-
v1 = {
|
|
27129
|
-
x: x + p1[0],
|
|
27130
|
-
y: y + p1[1],
|
|
27131
|
-
z: z + p1[2]
|
|
27132
|
-
},
|
|
27133
|
-
v2 = {
|
|
27134
|
-
x: x + p2[0],
|
|
27135
|
-
y: y + p2[1],
|
|
27136
|
-
z: z + p2[2]
|
|
27137
|
-
},
|
|
27138
|
-
v3 = {
|
|
27139
|
-
x: x + p3[0],
|
|
27140
|
-
y: y + p3[1],
|
|
27141
|
-
z: z + p3[2]
|
|
27142
|
-
},
|
|
27143
|
-
v4 = {
|
|
27144
|
-
x: x + p4[0],
|
|
27145
|
-
y: y + p4[1],
|
|
27146
|
-
z: z + p4[2]
|
|
27147
|
-
};
|
|
27148
|
-
context.beginPath(), context.moveTo(v1.x, v1.y, v1.z), context.lineTo(v2.x, v2.y, v2.z), context.lineTo(v3.x, v3.y, v3.z), context.lineTo(v4.x, v4.y, v4.z), context.closePath(), fillCb ? fillCb(context, graphic3d && graphic3d.attribute, graphic3dAttribute) : (context.fillStyle = light ? light.computeColor(normal, rgbArray) : fillColor, context.fill());
|
|
27149
|
-
});
|
|
27150
|
-
}
|
|
27151
|
-
}
|
|
27152
|
-
|
|
27153
|
-
class DefaultCanvasRect3dRender extends Base3dRender {
|
|
27154
|
-
constructor() {
|
|
27155
|
-
super(...arguments), this.type = "rect3d", this.numberType = RECT3D_NUMBER_TYPE;
|
|
27156
|
-
}
|
|
27157
|
-
drawShape(rect, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
27158
|
-
var _a, _b;
|
|
27159
|
-
const rectAttribute = getTheme$1(rect, null == params ? void 0 : params.theme).rect,
|
|
27160
|
-
{
|
|
27161
|
-
fill = rectAttribute.fill,
|
|
27162
|
-
stroke = rectAttribute.stroke,
|
|
27163
|
-
x1: x1,
|
|
27164
|
-
y1: y1,
|
|
27165
|
-
x: originX,
|
|
27166
|
-
y: originY,
|
|
27167
|
-
opacity = rectAttribute.opacity,
|
|
27168
|
-
fillOpacity = rectAttribute.fillOpacity,
|
|
27169
|
-
lineWidth = rectAttribute.lineWidth,
|
|
27170
|
-
strokeOpacity = rectAttribute.strokeOpacity,
|
|
27171
|
-
visible = rectAttribute.visible,
|
|
27172
|
-
drawStrokeWhenZeroWH = null !== (_a = rectAttribute.drawStrokeWhenZeroWH) && void 0 !== _a && _a
|
|
27173
|
-
} = rect.attribute;
|
|
27174
|
-
let {
|
|
27175
|
-
width: width,
|
|
27176
|
-
height: height
|
|
27177
|
-
} = rect.attribute;
|
|
27178
|
-
width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0;
|
|
27179
|
-
const z = null !== (_b = this.z) && void 0 !== _b ? _b : 0,
|
|
27180
|
-
fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
|
|
27181
|
-
sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height, drawStrokeWhenZeroWH),
|
|
27182
|
-
doFill = runFill(fill),
|
|
27183
|
-
doStroke = runStroke(stroke, lineWidth);
|
|
27184
|
-
if (!rect.valid || !visible) return;
|
|
27185
|
-
if (!doFill && !doStroke) return;
|
|
27186
|
-
if (!(fVisible || sVisible || fillCb || strokeCb)) return;
|
|
27187
|
-
const {
|
|
27188
|
-
light: light
|
|
27189
|
-
} = drawContext.stage || {},
|
|
27190
|
-
face3d = rect.findFace();
|
|
27191
|
-
if (!1 !== fill) {
|
|
27192
|
-
context.setCommonStyle(rect, rect.attribute, x, y, rectAttribute);
|
|
27193
|
-
let fc = fill;
|
|
27194
|
-
"string" != typeof fc && (fc = "black"), this.fill(x, y, z, face3d, null, fc, context, light, null, null, fillCb);
|
|
27195
|
-
}
|
|
27196
|
-
!1 !== stroke && (context.setStrokeStyle(rect, rect.attribute, x, y, rectAttribute), this.stroke(x, y, z, face3d, context));
|
|
27197
|
-
}
|
|
27198
|
-
draw(rect, renderService, drawContext) {
|
|
27199
|
-
const rectAttribute = getTheme$1(rect).rect;
|
|
27200
|
-
this._draw(rect, rectAttribute, !1, drawContext);
|
|
27201
|
-
}
|
|
27202
|
-
}
|
|
27203
|
-
|
|
27204
27423
|
const loadedRect3dModuleContexts = new WeakSet();
|
|
27205
27424
|
function bindRect3dRenderModule({
|
|
27206
27425
|
bind: bind
|
|
@@ -27209,127 +27428,6 @@
|
|
|
27209
27428
|
}
|
|
27210
27429
|
const rect3dModule = bindRect3dRenderModule;
|
|
27211
27430
|
|
|
27212
|
-
function drawArcPath(arc, context, cx, cy, z, outerRadius, innerRadius) {
|
|
27213
|
-
const {
|
|
27214
|
-
startAngle: startAngle,
|
|
27215
|
-
endAngle: endAngle
|
|
27216
|
-
} = arc.getParsedAngle(),
|
|
27217
|
-
deltaAngle = abs$1(endAngle - startAngle),
|
|
27218
|
-
clockwise = endAngle > startAngle;
|
|
27219
|
-
let collapsedToLine = !1;
|
|
27220
|
-
if (outerRadius < innerRadius) {
|
|
27221
|
-
const temp = outerRadius;
|
|
27222
|
-
outerRadius = innerRadius, innerRadius = temp;
|
|
27223
|
-
}
|
|
27224
|
-
if (outerRadius <= epsilon$1) context.moveTo(cx, cy, z);else if (deltaAngle >= pi2 - epsilon$1) context.moveTo(cx + outerRadius * cos$1(startAngle), cy + outerRadius * sin$1(startAngle), z), context.arc(cx, cy, outerRadius, startAngle, endAngle, !clockwise, z), innerRadius > epsilon$1 && (context.moveTo(cx + innerRadius * cos$1(endAngle), cy + innerRadius * sin$1(endAngle), z), context.arc(cx, cy, innerRadius, endAngle, startAngle, clockwise, z));else {
|
|
27225
|
-
const {
|
|
27226
|
-
outerDeltaAngle: outerDeltaAngle,
|
|
27227
|
-
innerDeltaAngle: innerDeltaAngle,
|
|
27228
|
-
outerStartAngle: outerStartAngle,
|
|
27229
|
-
outerEndAngle: outerEndAngle,
|
|
27230
|
-
innerEndAngle: innerEndAngle,
|
|
27231
|
-
innerStartAngle: innerStartAngle
|
|
27232
|
-
} = arc.getParsePadAngle(startAngle, endAngle),
|
|
27233
|
-
xors = outerRadius * cos$1(outerStartAngle),
|
|
27234
|
-
yors = outerRadius * sin$1(outerStartAngle),
|
|
27235
|
-
xire = innerRadius * cos$1(innerEndAngle),
|
|
27236
|
-
yire = innerRadius * sin$1(innerEndAngle);
|
|
27237
|
-
outerDeltaAngle < .001 ? collapsedToLine = !0 : (context.moveTo(cx + xors, cy + yors, z), context.arc(cx, cy, outerRadius, outerStartAngle, outerEndAngle, !clockwise, z)), !(innerRadius > epsilon$1) || innerDeltaAngle < .001 ? (context.lineTo(cx + xire, cy + yire, z), collapsedToLine = !0) : (context.lineTo(cx + xire, cy + yire, z), context.arc(cx, cy, innerRadius, innerEndAngle, innerStartAngle, clockwise, z));
|
|
27238
|
-
}
|
|
27239
|
-
return context.closePath(), collapsedToLine;
|
|
27240
|
-
}
|
|
27241
|
-
function drawInnerOuterArcPath(arc, context, cx, cy, z1, z2, radius, getParsePadAngle) {
|
|
27242
|
-
const {
|
|
27243
|
-
startAngle: startAngle,
|
|
27244
|
-
endAngle: endAngle
|
|
27245
|
-
} = arc.getParsedAngle(),
|
|
27246
|
-
deltaAngle = abs$1(endAngle - startAngle),
|
|
27247
|
-
clockwise = endAngle > startAngle;
|
|
27248
|
-
let collapsedToLine = !1;
|
|
27249
|
-
if (radius <= epsilon$1) context.moveTo(cx, cy, z1);else if (deltaAngle >= pi2 - epsilon$1) context.moveTo(cx + radius * cos$1(startAngle), cy + radius * sin$1(startAngle), z1), context.arc(cx, cy, radius, startAngle, endAngle, !clockwise, z1), context.lineTo(cx + radius * cos$1(endAngle), cy + radius * sin$1(endAngle), z2), context.arc(cx, cy, radius, endAngle, startAngle, clockwise, z2);else {
|
|
27250
|
-
const {
|
|
27251
|
-
innerouterDeltaAngle: innerouterDeltaAngle,
|
|
27252
|
-
innerouterStartAngle: innerouterStartAngle,
|
|
27253
|
-
innerouterEndAngle: innerouterEndAngle
|
|
27254
|
-
} = getParsePadAngle(startAngle, endAngle),
|
|
27255
|
-
xors = radius * cos$1(innerouterStartAngle),
|
|
27256
|
-
yors = radius * sin$1(innerouterStartAngle),
|
|
27257
|
-
xore = radius * cos$1(innerouterEndAngle),
|
|
27258
|
-
yore = radius * sin$1(innerouterEndAngle);
|
|
27259
|
-
innerouterDeltaAngle < .001 ? collapsedToLine = !0 : (context.moveTo(cx + xors, cy + yors, z1), context.arc(cx, cy, radius, innerouterStartAngle, innerouterEndAngle, !clockwise, z1), context.lineTo(cx + xore, cy + yore, z2), context.arc(cx, cy, radius, innerouterEndAngle, innerouterStartAngle, clockwise, z2));
|
|
27260
|
-
}
|
|
27261
|
-
return context.closePath(), collapsedToLine;
|
|
27262
|
-
}
|
|
27263
|
-
class DefaultCanvasArc3DRender extends BaseRender {
|
|
27264
|
-
constructor() {
|
|
27265
|
-
super(...arguments), this.numberType = ARC3D_NUMBER_TYPE;
|
|
27266
|
-
}
|
|
27267
|
-
drawShape(arc, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
27268
|
-
var _a;
|
|
27269
|
-
const arcAttribute = getTheme$1(arc, null == params ? void 0 : params.theme).arc,
|
|
27270
|
-
{
|
|
27271
|
-
fill = arcAttribute.fill
|
|
27272
|
-
} = arc.attribute,
|
|
27273
|
-
data = this.valid(arc, arcAttribute, fillCb, strokeCb);
|
|
27274
|
-
if (!data) return;
|
|
27275
|
-
const {
|
|
27276
|
-
fVisible: fVisible,
|
|
27277
|
-
sVisible: sVisible,
|
|
27278
|
-
doFill: doFill,
|
|
27279
|
-
doStroke: doStroke
|
|
27280
|
-
} = data,
|
|
27281
|
-
z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
|
|
27282
|
-
{
|
|
27283
|
-
outerPadding = arcAttribute.outerPadding,
|
|
27284
|
-
innerPadding = arcAttribute.innerPadding,
|
|
27285
|
-
height = 10
|
|
27286
|
-
} = arc.attribute;
|
|
27287
|
-
let {
|
|
27288
|
-
outerRadius = arcAttribute.outerRadius,
|
|
27289
|
-
innerRadius = arcAttribute.innerRadius
|
|
27290
|
-
} = arc.attribute;
|
|
27291
|
-
outerRadius += outerPadding, innerRadius -= innerPadding;
|
|
27292
|
-
const rgbArray = ColorStore.Get(fill, ColorType.Color255),
|
|
27293
|
-
{
|
|
27294
|
-
light: light
|
|
27295
|
-
} = drawContext.stage || {},
|
|
27296
|
-
face = drawContext.hack_pieFace,
|
|
27297
|
-
z_face = {
|
|
27298
|
-
top: z,
|
|
27299
|
-
bottom: z + height
|
|
27300
|
-
},
|
|
27301
|
-
n_face = {
|
|
27302
|
-
top: [0, 1, 0],
|
|
27303
|
-
bottom: [0, -1, 0],
|
|
27304
|
-
outside: [1, 0, -1],
|
|
27305
|
-
inside: [1, 0, -1]
|
|
27306
|
-
};
|
|
27307
|
-
"bottom" === face || "top" === face ? (context.beginPath(), drawArcPath(arc, context, x, y, z_face[face], outerRadius, innerRadius), context.setShadowBlendStyle && context.setShadowBlendStyle(arc, arc.attribute, arcAttribute), doFill && (fillCb ? fillCb(context, arc.attribute, arcAttribute) : fVisible && (context.setCommonStyle(arc, arc.attribute, x, y, arcAttribute), context.fillStyle = light ? light.computeColor(n_face[face], rgbArray) : fill, context.fill())), doStroke && (strokeCb ? strokeCb(context, arc.attribute, arcAttribute) : sVisible && (context.setStrokeStyle(arc, arc.attribute, x, y, arcAttribute), context.stroke()))) : "outside" !== face && "inside" !== face || ("inside" === face && (context.save(), context.beginPath(), context.arc(x, y, innerRadius, 0, pi2, !0, z_face.top), context.clip()), context.beginPath(), drawInnerOuterArcPath(arc, context, x, y, z_face.top, z_face.bottom, "outside" === face ? outerRadius : innerRadius, (startAngle, endAngle) => {
|
|
27308
|
-
const {
|
|
27309
|
-
outerDeltaAngle: outerDeltaAngle,
|
|
27310
|
-
innerDeltaAngle: innerDeltaAngle,
|
|
27311
|
-
outerStartAngle: outerStartAngle,
|
|
27312
|
-
outerEndAngle: outerEndAngle,
|
|
27313
|
-
innerEndAngle: innerEndAngle,
|
|
27314
|
-
innerStartAngle: innerStartAngle
|
|
27315
|
-
} = arc.getParsePadAngle(startAngle, endAngle);
|
|
27316
|
-
return "outside" === face ? {
|
|
27317
|
-
innerouterDeltaAngle: outerDeltaAngle,
|
|
27318
|
-
innerouterEndAngle: outerEndAngle,
|
|
27319
|
-
innerouterStartAngle: outerStartAngle
|
|
27320
|
-
} : {
|
|
27321
|
-
innerouterDeltaAngle: innerDeltaAngle,
|
|
27322
|
-
innerouterEndAngle: innerEndAngle,
|
|
27323
|
-
innerouterStartAngle: innerStartAngle
|
|
27324
|
-
};
|
|
27325
|
-
}), context.setShadowBlendStyle && context.setShadowBlendStyle(arc, arc.attribute, arcAttribute), doFill && (fillCb ? fillCb(context, arc.attribute, arcAttribute) : fVisible && (context.setCommonStyle(arc, arc.attribute, x, y, arcAttribute), context.fillStyle = light ? light.computeColor(n_face[face], rgbArray) : fill, context.fill())), doStroke && (strokeCb ? strokeCb(context, arc.attribute, arcAttribute) : sVisible && (context.setStrokeStyle(arc, arc.attribute, x, y, arcAttribute), context.stroke())), "inside" === face && context.restore());
|
|
27326
|
-
}
|
|
27327
|
-
draw(arc, renderService, drawContext, params) {
|
|
27328
|
-
const arcAttribute = getTheme$1(arc, null == params ? void 0 : params.theme).arc;
|
|
27329
|
-
this._draw(arc, arcAttribute, !1, drawContext, params);
|
|
27330
|
-
}
|
|
27331
|
-
}
|
|
27332
|
-
|
|
27333
27431
|
const loadedArc3dModuleContexts = new WeakSet();
|
|
27334
27432
|
function bindArc3dRenderModule({
|
|
27335
27433
|
bind: bind
|
|
@@ -27338,37 +27436,6 @@
|
|
|
27338
27436
|
}
|
|
27339
27437
|
const arc3dModule = bindArc3dRenderModule;
|
|
27340
27438
|
|
|
27341
|
-
class DefaultCanvasPyramid3dRender extends Base3dRender {
|
|
27342
|
-
constructor() {
|
|
27343
|
-
super(...arguments), this.type = "pyramid3d", this.numberType = PYRAMID3D_NUMBER_TYPE;
|
|
27344
|
-
}
|
|
27345
|
-
drawShape(pyramid3d, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
27346
|
-
var _a;
|
|
27347
|
-
const pyramidAttribute = getTheme$1(pyramid3d, null == params ? void 0 : params.theme).polygon,
|
|
27348
|
-
{
|
|
27349
|
-
fill = pyramidAttribute.fill,
|
|
27350
|
-
stroke = pyramidAttribute.stroke,
|
|
27351
|
-
face = [!0, !0, !0, !0, !0, !0]
|
|
27352
|
-
} = pyramid3d.attribute,
|
|
27353
|
-
z = null !== (_a = this.z) && void 0 !== _a ? _a : 0;
|
|
27354
|
-
if (!this.valid(pyramid3d, pyramidAttribute, fillCb, strokeCb)) return;
|
|
27355
|
-
const {
|
|
27356
|
-
light: light
|
|
27357
|
-
} = drawContext.stage || {},
|
|
27358
|
-
face3d = pyramid3d.findFace();
|
|
27359
|
-
if (!1 !== fill) {
|
|
27360
|
-
context.setCommonStyle(pyramid3d, pyramid3d.attribute, x, y, pyramidAttribute);
|
|
27361
|
-
let fc = fill;
|
|
27362
|
-
"string" != typeof fc && (fc = "black"), this.fill(x, y, z, face3d, face, fc, context, light, pyramid3d, pyramidAttribute, fillCb);
|
|
27363
|
-
}
|
|
27364
|
-
!1 !== stroke && (context.setStrokeStyle(pyramid3d, pyramid3d.attribute, x, y, pyramidAttribute), this.stroke(x, y, z, face3d, context));
|
|
27365
|
-
}
|
|
27366
|
-
draw(pyramid3d, renderService, drawContext) {
|
|
27367
|
-
const pyramid3dAttribute = getTheme$1(pyramid3d).polygon;
|
|
27368
|
-
this._draw(pyramid3d, pyramid3dAttribute, !1, drawContext);
|
|
27369
|
-
}
|
|
27370
|
-
}
|
|
27371
|
-
|
|
27372
27439
|
const loadedPyramid3dModuleContexts = new WeakSet();
|
|
27373
27440
|
function bindPyramid3dRenderModule({
|
|
27374
27441
|
bind: bind
|
|
@@ -34898,6 +34965,30 @@
|
|
|
34898
34965
|
return 2;
|
|
34899
34966
|
}
|
|
34900
34967
|
|
|
34968
|
+
function buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs) {
|
|
34969
|
+
var _a;
|
|
34970
|
+
const commitTarget = target,
|
|
34971
|
+
contextFinalAttrs = null === (_a = commitTarget.context) || void 0 === _a ? void 0 : _a.finalAttrs,
|
|
34972
|
+
finalAttribute = commitTarget.getFinalAttribute();
|
|
34973
|
+
let commitAttrs = null;
|
|
34974
|
+
for (let i = 0; i < keys.length; i++) {
|
|
34975
|
+
const key = keys[i];
|
|
34976
|
+
animate && !animate.validAttr(key) || (contextFinalAttrs && Object.prototype.hasOwnProperty.call(contextFinalAttrs, key) ? (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = contextFinalAttrs[key]) : finalAttribute && Object.prototype.hasOwnProperty.call(finalAttribute, key) ? (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = finalAttribute[key]) : fallbackAttrs && Object.prototype.hasOwnProperty.call(fallbackAttrs, key) && (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = fallbackAttrs[key]));
|
|
34977
|
+
}
|
|
34978
|
+
return commitAttrs;
|
|
34979
|
+
}
|
|
34980
|
+
function commitAnimationStaticAttrs(target, keys, animate, fallbackAttrs) {
|
|
34981
|
+
const commitAttrs = buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs);
|
|
34982
|
+
if (!commitAttrs) return !1;
|
|
34983
|
+
target.setFinalAttributes(commitAttrs);
|
|
34984
|
+
const commitStaticAttributes = target._commitAnimationStaticAttributes;
|
|
34985
|
+
return "function" == typeof commitStaticAttributes ? commitStaticAttributes.call(target, commitAttrs, {
|
|
34986
|
+
type: AttributeUpdateType.ANIMATE_END
|
|
34987
|
+
}) : target.setAttributes(commitAttrs, !1, {
|
|
34988
|
+
type: AttributeUpdateType.ANIMATE_END
|
|
34989
|
+
}), !0;
|
|
34990
|
+
}
|
|
34991
|
+
|
|
34901
34992
|
class AnimateExecutor {
|
|
34902
34993
|
static registerBuiltInAnimate(name, animate) {
|
|
34903
34994
|
AnimateExecutor.builtInAnimateMap[name] = animate;
|
|
@@ -35077,7 +35168,7 @@
|
|
|
35077
35168
|
props = params.to,
|
|
35078
35169
|
from = params.from;
|
|
35079
35170
|
const commitAttrOutChannel = this.shouldCommitAttrOutChannel(type);
|
|
35080
|
-
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel, this.getAttrOutChannelExcludedKeys(graphic))), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel, this.getAttrOutChannelExcludedKeys(graphic))), from = parsedFromProps.from), parsedFromProps.attrOutChannel && graphic.setAttributes(parsedFromProps.attrOutChannel), this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic);
|
|
35171
|
+
props || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel, this.getAttrOutChannelExcludedKeys(graphic))), props = parsedFromProps.props), from || (parsedFromProps || (parsedFromProps = this.createPropsFromChannel(channel, graphic, commitAttrOutChannel, this.getAttrOutChannelExcludedKeys(graphic))), from = parsedFromProps.from), parsedFromProps.attrOutChannel && graphic.setAttributes(parsedFromProps.attrOutChannel), this._handleRunAnimate(animate, custom, customType, from, props, duration, easing, customParameters, controlOptions, options, type, graphic), this.commitAnimatedUpdateDiffAttrsOnEnd(animate, graphic, type, props);
|
|
35081
35172
|
let totalDelay = 0;
|
|
35082
35173
|
oneByOneDelay && (totalDelay = oneByOneDelay * (count - index - 1));
|
|
35083
35174
|
const delayAfterValue = isFunction$1(delayAfter) ? delayAfter(null === (_h = null === (_g = graphic.context) || void 0 === _g ? void 0 : _g.data) || void 0 === _h ? void 0 : _h[0], graphic, {}) : delayAfter;
|
|
@@ -35159,6 +35250,25 @@
|
|
|
35159
35250
|
shouldCommitAttrOutChannel(type) {
|
|
35160
35251
|
return "update" !== type;
|
|
35161
35252
|
}
|
|
35253
|
+
commitAnimatedUpdateDiffAttrsOnEnd(animate, graphic, type, props) {
|
|
35254
|
+
if ("update" === type || !props || !this.isUpdateDiffContext(graphic)) return;
|
|
35255
|
+
const keys = this.collectAnimatedUpdateDiffAttrKeys(graphic, props);
|
|
35256
|
+
(null == keys ? void 0 : keys.length) && animate.onEnd(() => {
|
|
35257
|
+
commitAnimationStaticAttrs(graphic, keys, animate, props);
|
|
35258
|
+
});
|
|
35259
|
+
}
|
|
35260
|
+
isUpdateDiffContext(graphic) {
|
|
35261
|
+
const context = graphic.context;
|
|
35262
|
+
return "update" === (null == context ? void 0 : context.diffState) || "update" === (null == context ? void 0 : context.animationState);
|
|
35263
|
+
}
|
|
35264
|
+
collectAnimatedUpdateDiffAttrKeys(graphic, props) {
|
|
35265
|
+
var _a;
|
|
35266
|
+
const diffAttrs = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.diffAttrs;
|
|
35267
|
+
if (!diffAttrs) return null;
|
|
35268
|
+
let keys = null;
|
|
35269
|
+
for (const key in props) Object.prototype.hasOwnProperty.call(props, key) && Object.prototype.hasOwnProperty.call(diffAttrs, key) && void 0 !== diffAttrs[key] && (null != keys || (keys = []), keys.push(key));
|
|
35270
|
+
return keys;
|
|
35271
|
+
}
|
|
35162
35272
|
createCustomAnimation(animate, CustomAnimateConstructor, from, props, duration, easing, customParams) {
|
|
35163
35273
|
const customAnimate = new CustomAnimateConstructor(from, props, duration, easing, customParams);
|
|
35164
35274
|
animate.play(customAnimate);
|
|
@@ -36124,6 +36234,24 @@
|
|
|
36124
36234
|
for (const key in record) Object.prototype.hasOwnProperty.call(record, key) && !includesKey(keys, key) && (nextRecord[key] = record[key]);
|
|
36125
36235
|
return nextRecord;
|
|
36126
36236
|
}
|
|
36237
|
+
function collectActiveSiblingAttrKeys(target, currentAnimate) {
|
|
36238
|
+
var _a;
|
|
36239
|
+
const getTrackedAnimates = null == target ? void 0 : target.getTrackedAnimates;
|
|
36240
|
+
if ("function" == typeof getTrackedAnimates) {
|
|
36241
|
+
const trackedAnimates = getTrackedAnimates.call(target);
|
|
36242
|
+
if (trackedAnimates && trackedAnimates.size <= 1) return;
|
|
36243
|
+
}
|
|
36244
|
+
const forEachTrackedAnimate = null == target ? void 0 : target.forEachTrackedAnimate;
|
|
36245
|
+
if ("function" != typeof forEachTrackedAnimate) return;
|
|
36246
|
+
let keys;
|
|
36247
|
+
const currentEndProps = null === (_a = currentAnimate.getEndProps) || void 0 === _a ? void 0 : _a.call(currentAnimate);
|
|
36248
|
+
return forEachTrackedAnimate.call(target, animate => {
|
|
36249
|
+
var _a;
|
|
36250
|
+
if (animate === currentAnimate || animate.status === AnimateStatus.END) return;
|
|
36251
|
+
const endProps = null === (_a = animate.getEndProps) || void 0 === _a ? void 0 : _a.call(animate);
|
|
36252
|
+
if (endProps) for (const key in endProps) !Object.prototype.hasOwnProperty.call(endProps, key) || currentEndProps && Object.prototype.hasOwnProperty.call(currentEndProps, key) || ((null != keys ? keys : keys = Object.create(null))[key] = !0);
|
|
36253
|
+
}), keys;
|
|
36254
|
+
}
|
|
36127
36255
|
class Animate {
|
|
36128
36256
|
constructor(id = Generator.GenAutoIncrementId(), timeline = defaultTimeline, slience) {
|
|
36129
36257
|
this.id = id, this.status = AnimateStatus.INITIAL, this._timeline = timeline, timeline.addAnimate(this), this.slience = slience, this._startTime = 0, this._duration = 0, this._totalDuration = 0, this._loopCount = 0, this._currentLoop = 0, this._bounce = !1, this._firstStep = null, this._lastStep = null, this._startProps = {}, this._endProps = {}, this._preventAttrs = new Set(), this.currentTime = 0, this.interpolateUpdateFunction = null, this.priority = 0;
|
|
@@ -36147,7 +36275,7 @@
|
|
|
36147
36275
|
this.target = target;
|
|
36148
36276
|
const trackerTarget = this.target;
|
|
36149
36277
|
return trackerTarget.detachAttributeFromBaseAttributes(), trackerTarget.trackAnimate(this), this.onRemove(() => {
|
|
36150
|
-
this.stop(), this.__skipRestoreStaticAttributeOnRemove || trackerTarget.restoreStaticAttribute(), trackerTarget.untrackAnimate(this.id);
|
|
36278
|
+
this.stop(), this.__skipRestoreStaticAttributeOnRemove || trackerTarget.restoreStaticAttribute(collectActiveSiblingAttrKeys(trackerTarget, this)), trackerTarget.untrackAnimate(this.id);
|
|
36151
36279
|
}), this.target.onAnimateBind && !this.slience && this.target.onAnimateBind(this), this.target.animationAttribute || (this.target.animationAttribute = {}), this;
|
|
36152
36280
|
}
|
|
36153
36281
|
to(props, duration = 300, easing = "linear") {
|
|
@@ -36284,7 +36412,8 @@
|
|
|
36284
36412
|
if (nextTime < this._startTime) return void (this.currentTime = nextTime);
|
|
36285
36413
|
if (nextTime >= this._startTime + this._totalDuration) {
|
|
36286
36414
|
null === (_a = this._lastStep) || void 0 === _a || _a.onUpdate(!0, 1, {}), null === (_b = this._lastStep) || void 0 === _b || _b.onEnd(), this.onEnd(), this.status = AnimateStatus.END;
|
|
36287
|
-
|
|
36415
|
+
const trackerTarget = this.target;
|
|
36416
|
+
return trackerTarget.restoreStaticAttribute(collectActiveSiblingAttrKeys(trackerTarget, this)), void (this.__skipRestoreStaticAttributeOnRemove = !0);
|
|
36288
36417
|
}
|
|
36289
36418
|
this.status = AnimateStatus.RUNNING, this.currentTime <= this._startTime && this.onStart(), this.currentTime = nextTime;
|
|
36290
36419
|
let cycleTime = nextTime - this._startTime,
|
|
@@ -36498,10 +36627,10 @@
|
|
|
36498
36627
|
type: AttributeUpdateType.ANIMATE_BIND
|
|
36499
36628
|
});
|
|
36500
36629
|
}
|
|
36501
|
-
restoreStaticAttribute() {
|
|
36630
|
+
restoreStaticAttribute(excludedKeys) {
|
|
36502
36631
|
this._restoreAttributeFromStaticTruth({
|
|
36503
36632
|
type: AttributeUpdateType.ANIMATE_END
|
|
36504
|
-
});
|
|
36633
|
+
}, excludedKeys);
|
|
36505
36634
|
}
|
|
36506
36635
|
executeAnimation(config) {
|
|
36507
36636
|
return this.initAnimateExecutor(), this._animateExecutor.execute(config), this;
|
|
@@ -36653,12 +36782,36 @@
|
|
|
36653
36782
|
return (null == record ? void 0 : record.app.released) && (releaseSharedAppRecord(registryEnv, key, record), record = void 0), record || (record = createSharedAppRecord(registryEnv, key, options, createApp), envRegistry.set(key, record)), record.refCount += 1, createSharedAppHandle(registryEnv, handleEnv, key, record);
|
|
36654
36783
|
}
|
|
36655
36784
|
|
|
36785
|
+
undefined && undefined.__rest || function (s, e) {
|
|
36786
|
+
var t = {};
|
|
36787
|
+
for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
|
|
36788
|
+
if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
|
|
36789
|
+
var i = 0;
|
|
36790
|
+
for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
|
|
36791
|
+
}
|
|
36792
|
+
return t;
|
|
36793
|
+
};
|
|
36794
|
+
const installCoreRuntimeContributionModule = installRuntimeContributionModule,
|
|
36795
|
+
pendingRuntimeContributionModules = [];
|
|
36796
|
+
function installPendingRuntimeContributionModulesToApp(app) {
|
|
36797
|
+
pendingRuntimeContributionModules.forEach(({
|
|
36798
|
+
module: module,
|
|
36799
|
+
options: options
|
|
36800
|
+
}) => {
|
|
36801
|
+
installCoreRuntimeContributionModule(module, Object.assign(Object.assign({}, options), {
|
|
36802
|
+
app: app
|
|
36803
|
+
}));
|
|
36804
|
+
});
|
|
36805
|
+
}
|
|
36806
|
+
|
|
36656
36807
|
function createSharedBrowserApp(options) {
|
|
36657
36808
|
const {
|
|
36658
36809
|
envParams: envParams
|
|
36659
36810
|
} = options,
|
|
36660
36811
|
entryOptions = Object.assign({}, options);
|
|
36661
|
-
|
|
36812
|
+
delete entryOptions.env, delete entryOptions.envParams, delete entryOptions.key;
|
|
36813
|
+
const app = bootstrapVRenderSharedBrowserApp(createBrowserApp(entryOptions), envParams);
|
|
36814
|
+
return installPendingRuntimeContributionModulesToApp(app), app;
|
|
36662
36815
|
}
|
|
36663
36816
|
function acquireSharedBrowserVRenderApp(options = {}) {
|
|
36664
36817
|
return acquireSharedApp("browser-shared", options, createSharedBrowserApp, "browser");
|
|
@@ -46424,25 +46577,6 @@
|
|
|
46424
46577
|
}
|
|
46425
46578
|
}
|
|
46426
46579
|
|
|
46427
|
-
function buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs) {
|
|
46428
|
-
var _a;
|
|
46429
|
-
const commitTarget = target,
|
|
46430
|
-
contextFinalAttrs = null === (_a = commitTarget.context) || void 0 === _a ? void 0 : _a.finalAttrs,
|
|
46431
|
-
finalAttribute = commitTarget.getFinalAttribute();
|
|
46432
|
-
let commitAttrs = null;
|
|
46433
|
-
for (let i = 0; i < keys.length; i++) {
|
|
46434
|
-
const key = keys[i];
|
|
46435
|
-
animate && !animate.validAttr(key) || (contextFinalAttrs && Object.prototype.hasOwnProperty.call(contextFinalAttrs, key) ? (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = contextFinalAttrs[key]) : finalAttribute && Object.prototype.hasOwnProperty.call(finalAttribute, key) ? (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = finalAttribute[key]) : fallbackAttrs && Object.prototype.hasOwnProperty.call(fallbackAttrs, key) && (null != commitAttrs || (commitAttrs = {}), commitAttrs[key] = fallbackAttrs[key]));
|
|
46436
|
-
}
|
|
46437
|
-
return commitAttrs;
|
|
46438
|
-
}
|
|
46439
|
-
function commitAnimationStaticAttrs(target, keys, animate, fallbackAttrs) {
|
|
46440
|
-
const commitAttrs = buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs);
|
|
46441
|
-
return !!commitAttrs && (target.setFinalAttributes(commitAttrs), target.setAttributes(commitAttrs, !1, {
|
|
46442
|
-
type: AttributeUpdateType.ANIMATE_END
|
|
46443
|
-
}), !0);
|
|
46444
|
-
}
|
|
46445
|
-
|
|
46446
46580
|
class TagPointsUpdate extends ACustomAnimate {
|
|
46447
46581
|
constructor(from, to, duration, easing, params) {
|
|
46448
46582
|
var _a, _b;
|
|
@@ -47430,6 +47564,9 @@
|
|
|
47430
47564
|
};
|
|
47431
47565
|
this._updateSpec = (spec, forceMerge = false, userUpdateOptions) => {
|
|
47432
47566
|
var _a;
|
|
47567
|
+
if (this._isReleased) {
|
|
47568
|
+
return undefined;
|
|
47569
|
+
}
|
|
47433
47570
|
this._reSetRenderState();
|
|
47434
47571
|
const lastSpec = this._spec;
|
|
47435
47572
|
const result = {
|
|
@@ -47930,6 +48067,9 @@
|
|
|
47930
48067
|
});
|
|
47931
48068
|
}
|
|
47932
48069
|
updateDataSync(id, data, parserOptions, userUpdateOptions) {
|
|
48070
|
+
if (this._isReleased) {
|
|
48071
|
+
return this;
|
|
48072
|
+
}
|
|
47933
48073
|
this._reSetRenderState();
|
|
47934
48074
|
if (isNil$1(this._dataSet)) {
|
|
47935
48075
|
return this;
|
|
@@ -47948,6 +48088,9 @@
|
|
|
47948
48088
|
return this;
|
|
47949
48089
|
}
|
|
47950
48090
|
updateFullDataSync(data, reRender = true, userUpdateOptions) {
|
|
48091
|
+
if (this._isReleased) {
|
|
48092
|
+
return this;
|
|
48093
|
+
}
|
|
47951
48094
|
this._reSetRenderState();
|
|
47952
48095
|
if (this._chart) {
|
|
47953
48096
|
this._chart.updateFullData(data);
|
|
@@ -48706,6 +48849,9 @@
|
|
|
48706
48849
|
}
|
|
48707
48850
|
_reSetRenderState() {
|
|
48708
48851
|
var _a, _b;
|
|
48852
|
+
if (this._isReleased || !this._compiler) {
|
|
48853
|
+
return;
|
|
48854
|
+
}
|
|
48709
48855
|
this._renderState = RenderStateEnum.render;
|
|
48710
48856
|
(_b = (_a = this.getStage()) === null || _a === void 0 ? void 0 : _a.eventSystem) === null || _b === void 0 ? void 0 : _b.resumeTriggerEvent();
|
|
48711
48857
|
}
|
|
@@ -49054,7 +49200,7 @@
|
|
|
49054
49200
|
});
|
|
49055
49201
|
};
|
|
49056
49202
|
|
|
49057
|
-
const version = "2.1.
|
|
49203
|
+
const version = "2.1.1";
|
|
49058
49204
|
|
|
49059
49205
|
const addVChartProperty = (data, op) => {
|
|
49060
49206
|
const context = op.beforeCall();
|
|
@@ -106857,7 +107003,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
106857
107003
|
};
|
|
106858
107004
|
this.autoPlayCallback = () => {
|
|
106859
107005
|
var _a;
|
|
106860
|
-
if ((_a = this._spec) === null || _a === void 0 ? void 0 : _a.auto) {
|
|
107006
|
+
if (((_a = this._spec) === null || _a === void 0 ? void 0 : _a.auto) && this._playerComponent) {
|
|
106861
107007
|
this._playerComponent.pause();
|
|
106862
107008
|
this._playerComponent.play();
|
|
106863
107009
|
}
|
|
@@ -107055,7 +107201,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
107055
107201
|
return rect.height - this._height;
|
|
107056
107202
|
}
|
|
107057
107203
|
changePlayerIndex(index) {
|
|
107058
|
-
|
|
107204
|
+
var _a, _b;
|
|
107205
|
+
const spec = (_a = this._specs) === null || _a === void 0 ? void 0 : _a[index];
|
|
107206
|
+
if (!spec || !((_b = this._option) === null || _b === void 0 ? void 0 : _b.globalInstance)) {
|
|
107207
|
+
return;
|
|
107208
|
+
}
|
|
107059
107209
|
this._option.globalInstance.updateFullData(spec.data);
|
|
107060
107210
|
this.event.emit(exports.ChartEvent.playerChange, {
|
|
107061
107211
|
model: this,
|
|
@@ -107067,7 +107217,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
107067
107217
|
});
|
|
107068
107218
|
}
|
|
107069
107219
|
release() {
|
|
107070
|
-
|
|
107220
|
+
var _a, _b, _c, _d;
|
|
107221
|
+
(_b = (_a = this._playerComponent) === null || _a === void 0 ? void 0 : _a.pause) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
107222
|
+
(_d = (_c = this._option) === null || _c === void 0 ? void 0 : _c.globalInstance) === null || _d === void 0 ? void 0 : _d.off(exports.ChartEvent.rendered, this.autoPlayCallback);
|
|
107223
|
+
super.release();
|
|
107224
|
+
this._playerComponent = null;
|
|
107225
|
+
this._cacheAttrs = null;
|
|
107226
|
+
this._specs = [];
|
|
107071
107227
|
}
|
|
107072
107228
|
}
|
|
107073
107229
|
Player.builtInTheme = {
|