@visactor/react-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/index.js +538 -394
- package/build/index.min.js +3 -3
- package/cjs/charts/AreaChart.js +1 -1
- package/cjs/charts/Bar3dChart.js +1 -1
- package/cjs/charts/BarChart.js +1 -1
- package/cjs/charts/BaseChart.js +1 -1
- package/cjs/charts/BoxPlotChart.js +1 -1
- package/cjs/charts/CirclePackingChart.js +1 -1
- package/cjs/charts/CircularProgressChart.js +1 -1
- package/cjs/charts/CommonChart.js +1 -1
- package/cjs/charts/CorrelationChart.js +1 -1
- package/cjs/charts/Funnel3dChart.js +1 -1
- package/cjs/charts/FunnelChart.js +1 -1
- package/cjs/charts/GaugeChart.js +1 -1
- package/cjs/charts/HeatmapChart.js +1 -1
- package/cjs/charts/Histogram3dChart.js +1 -1
- package/cjs/charts/HistogramChart.js +1 -2
- package/cjs/charts/LineChart.js +1 -1
- package/cjs/charts/LinearProgressChart.js +1 -1
- package/cjs/charts/LiquidChart.js +1 -1
- package/cjs/charts/MapChart.js +1 -1
- package/cjs/charts/MosaicChart.js +1 -1
- package/cjs/charts/PictogramChart.js +1 -1
- package/cjs/charts/Pie3dChart.js +1 -1
- package/cjs/charts/PieChart.js +1 -1
- package/cjs/charts/RadarChart.js +1 -1
- package/cjs/charts/RangeAreaChart.js +1 -1
- package/cjs/charts/RangeColumn3dChart.js +1 -1
- package/cjs/charts/RangeColumnChart.js +1 -1
- package/cjs/charts/RoseChart.js +1 -1
- package/cjs/charts/SankeyChart.js +1 -1
- package/cjs/charts/ScatterChart.js +1 -1
- package/cjs/charts/SequenceChart.js +1 -2
- package/cjs/charts/SunburstChart.js +1 -1
- package/cjs/charts/TreemapChart.js +1 -1
- package/cjs/charts/VennChart.js +1 -1
- package/cjs/charts/WaterfallChart.js +1 -1
- package/cjs/charts/WordCloud3dChart.js +1 -1
- package/cjs/charts/WordCloudChart.js +1 -1
- package/cjs/components/MarkArea.js +1 -2
- package/cjs/components/Region.js +2 -1
- package/cjs/context/chart.js +1 -1
- package/cjs/context/stage.js +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/series/Area.js +1 -1
- package/cjs/series/Bar.js +1 -1
- package/cjs/series/Bar3d.js +1 -1
- package/cjs/series/BaseSeries.js +1 -1
- package/cjs/series/BoxPlot.js +1 -1
- package/cjs/series/CirclePacking.js +1 -1
- package/cjs/series/CircularProgress.js +1 -1
- package/cjs/series/Correlation.js +1 -1
- package/cjs/series/Dot.js +1 -1
- package/cjs/series/Funnel.js +1 -1
- package/cjs/series/Funnel3d.js +1 -1
- package/cjs/series/Gauge.js +2 -1
- package/cjs/series/GaugePointer.js +1 -1
- package/cjs/series/Heatmap.js +1 -1
- package/cjs/series/Line.js +1 -1
- package/cjs/series/LinearProgress.js +1 -1
- package/cjs/series/Link.js +1 -1
- package/cjs/series/Liquid.js +1 -1
- package/cjs/series/Map.js +1 -1
- package/cjs/series/Mosaic.js +1 -1
- package/cjs/series/Pictogram.js +1 -1
- package/cjs/series/Pie.js +1 -1
- package/cjs/series/Pie3d.js +1 -1
- package/cjs/series/Radar.js +1 -1
- package/cjs/series/RangeArea.js +1 -1
- package/cjs/series/RangeColumn.js +1 -1
- package/cjs/series/RangeColumn3d.js +1 -1
- package/cjs/series/Rose.js +2 -1
- package/cjs/series/Sankey.js +1 -1
- package/cjs/series/Scatter.js +1 -1
- package/cjs/series/Series.js +1 -1
- package/cjs/series/Sunburst.js +1 -1
- package/cjs/series/Treemap.js +1 -1
- package/cjs/series/Venn.js +1 -1
- package/cjs/series/Waterfall.js +1 -1
- package/esm/charts/AreaChart.js +1 -1
- package/esm/charts/Bar3dChart.js +1 -1
- package/esm/charts/BarChart.js +1 -1
- package/esm/charts/BaseChart.js +1 -1
- package/esm/charts/BoxPlotChart.js +1 -1
- package/esm/charts/CirclePackingChart.js +1 -1
- package/esm/charts/CircularProgressChart.js +1 -1
- package/esm/charts/CommonChart.js +1 -1
- package/esm/charts/CorrelationChart.js +1 -1
- package/esm/charts/Funnel3dChart.js +1 -1
- package/esm/charts/FunnelChart.js +1 -1
- package/esm/charts/GaugeChart.js +1 -1
- package/esm/charts/HeatmapChart.js +1 -1
- package/esm/charts/Histogram3dChart.js +1 -1
- package/esm/charts/HistogramChart.js +1 -2
- package/esm/charts/LineChart.js +1 -1
- package/esm/charts/LinearProgressChart.js +1 -1
- package/esm/charts/LiquidChart.js +1 -1
- package/esm/charts/MapChart.js +1 -1
- package/esm/charts/MosaicChart.js +1 -1
- package/esm/charts/PictogramChart.js +1 -1
- package/esm/charts/Pie3dChart.js +1 -1
- package/esm/charts/PieChart.js +1 -1
- package/esm/charts/RadarChart.js +1 -1
- package/esm/charts/RangeAreaChart.js +1 -1
- package/esm/charts/RangeColumn3dChart.js +1 -1
- package/esm/charts/RangeColumnChart.js +1 -1
- package/esm/charts/RoseChart.js +1 -1
- package/esm/charts/SankeyChart.js +1 -1
- package/esm/charts/ScatterChart.js +1 -1
- package/esm/charts/SequenceChart.js +1 -2
- package/esm/charts/SunburstChart.js +1 -1
- package/esm/charts/TreemapChart.js +1 -1
- package/esm/charts/VennChart.js +1 -1
- package/esm/charts/WaterfallChart.js +1 -1
- package/esm/charts/WordCloud3dChart.js +1 -1
- package/esm/charts/WordCloudChart.js +1 -1
- package/esm/components/MarkArea.js +1 -2
- package/esm/components/Region.js +2 -1
- package/esm/context/chart.js +1 -1
- package/esm/context/stage.js +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/index.js.map +1 -1
- package/esm/series/Area.js +1 -1
- package/esm/series/Bar.js +1 -1
- package/esm/series/Bar3d.js +1 -1
- package/esm/series/BaseSeries.js +1 -1
- package/esm/series/BoxPlot.js +1 -1
- package/esm/series/CirclePacking.js +1 -1
- package/esm/series/CircularProgress.js +1 -1
- package/esm/series/Correlation.js +1 -1
- package/esm/series/Dot.js +1 -1
- package/esm/series/Funnel.js +1 -1
- package/esm/series/Funnel3d.js +1 -1
- package/esm/series/Gauge.js +2 -1
- package/esm/series/GaugePointer.js +1 -1
- package/esm/series/Heatmap.js +1 -1
- package/esm/series/Line.js +1 -1
- package/esm/series/LinearProgress.js +1 -1
- package/esm/series/Link.js +1 -1
- package/esm/series/Liquid.js +1 -1
- package/esm/series/Map.js +1 -1
- package/esm/series/Mosaic.js +1 -1
- package/esm/series/Pictogram.js +1 -1
- package/esm/series/Pie.js +1 -1
- package/esm/series/Pie3d.js +1 -1
- package/esm/series/Radar.js +1 -1
- package/esm/series/RangeArea.js +1 -1
- package/esm/series/RangeColumn.js +1 -1
- package/esm/series/RangeColumn3d.js +1 -1
- package/esm/series/Rose.js +2 -1
- package/esm/series/Sankey.js +1 -1
- package/esm/series/Scatter.js +1 -1
- package/esm/series/Series.js +1 -1
- package/esm/series/Sunburst.js +1 -1
- package/esm/series/Treemap.js +1 -1
- package/esm/series/Venn.js +1 -1
- package/esm/series/Waterfall.js +1 -1
- package/package.json +6 -6
package/build/index.js
CHANGED
|
@@ -13828,9 +13828,10 @@
|
|
|
13828
13828
|
} else assignFallbackAttr(this.getStateTransitionDefaultAttribute(key, staticTargetAttrs));
|
|
13829
13829
|
}), extraAttrs;
|
|
13830
13830
|
}
|
|
13831
|
-
syncObjectToSnapshot(target, snapshot) {
|
|
13831
|
+
syncObjectToSnapshot(target, snapshot, excludedKeys) {
|
|
13832
13832
|
const delta = new Map();
|
|
13833
13833
|
return new Set([...Object.keys(target), ...Object.keys(snapshot)]).forEach(key => {
|
|
13834
|
+
if (!0 === (null == excludedKeys ? void 0 : excludedKeys[key])) return;
|
|
13834
13835
|
const hasNext = Object.prototype.hasOwnProperty.call(snapshot, key),
|
|
13835
13836
|
previousValue = target[key];
|
|
13836
13837
|
if (!hasNext) return void (Object.prototype.hasOwnProperty.call(target, key) && (delta.set(key, {
|
|
@@ -13844,17 +13845,17 @@
|
|
|
13844
13845
|
}), target[key] = cloneAttributeValue(nextValue));
|
|
13845
13846
|
}), delta;
|
|
13846
13847
|
}
|
|
13847
|
-
_syncAttribute() {
|
|
13848
|
+
_syncAttribute(excludedKeys) {
|
|
13848
13849
|
this.attribute === this.baseAttributes && this.resolvedStatePatch && this.detachAttributeFromBaseAttributes();
|
|
13849
13850
|
const snapshot = this.buildStaticAttributeSnapshot(),
|
|
13850
|
-
delta = this.syncObjectToSnapshot(this.attribute, snapshot);
|
|
13851
|
-
return this.valid = this.isValid(), this.attributeMayContainTransientAttrs =
|
|
13851
|
+
delta = this.syncObjectToSnapshot(this.attribute, snapshot, excludedKeys);
|
|
13852
|
+
return this.valid = this.isValid(), this.attributeMayContainTransientAttrs = !!excludedKeys, delta;
|
|
13852
13853
|
}
|
|
13853
|
-
_syncFinalAttributeFromStaticTruth() {
|
|
13854
|
+
_syncFinalAttributeFromStaticTruth(excludedKeys) {
|
|
13854
13855
|
const target = this.finalAttribute;
|
|
13855
13856
|
if (!target) return;
|
|
13856
13857
|
const snapshot = this.buildStaticAttributeSnapshot();
|
|
13857
|
-
this.syncObjectToSnapshot(target, snapshot);
|
|
13858
|
+
this.syncObjectToSnapshot(target, snapshot, excludedKeys);
|
|
13858
13859
|
}
|
|
13859
13860
|
mergeAttributeDeltaCategory(category, key, prev, next) {
|
|
13860
13861
|
var _a;
|
|
@@ -13911,6 +13912,25 @@
|
|
|
13911
13912
|
this.getBaseAttributesStorage()[key] = params[key];
|
|
13912
13913
|
}
|
|
13913
13914
|
}
|
|
13915
|
+
_commitAnimationStaticAttributes(params, context) {
|
|
13916
|
+
if (!params) return;
|
|
13917
|
+
const source = params,
|
|
13918
|
+
baseAttributes = this.getBaseAttributesStorage(),
|
|
13919
|
+
target = this.attribute,
|
|
13920
|
+
delta = new Map();
|
|
13921
|
+
let hasKeys = !1;
|
|
13922
|
+
for (const key in source) {
|
|
13923
|
+
if (!Object.prototype.hasOwnProperty.call(source, key)) continue;
|
|
13924
|
+
hasKeys = !0;
|
|
13925
|
+
const previousValue = target[key],
|
|
13926
|
+
nextValue = source[key];
|
|
13927
|
+
baseAttributes[key] = nextValue, target[key] = nextValue, areAttributeValuesEqual(previousValue, nextValue) || delta.set(key, {
|
|
13928
|
+
prev: previousValue,
|
|
13929
|
+
next: nextValue
|
|
13930
|
+
});
|
|
13931
|
+
}
|
|
13932
|
+
hasKeys && (this.valid = this.isValid(), this.attributeMayContainTransientAttrs = !0, this.submitUpdateByDelta(delta), this.onAttributeUpdate(context));
|
|
13933
|
+
}
|
|
13914
13934
|
applyAnimationTransientAttributes(params, forceUpdateTag = !1, context) {
|
|
13915
13935
|
const source = params;
|
|
13916
13936
|
let target,
|
|
@@ -13933,9 +13953,9 @@
|
|
|
13933
13953
|
}
|
|
13934
13954
|
delta.size && (this.attributeMayContainTransientAttrs = !0), this.valid = this.isValid(), this.submitUpdateByDelta(delta, forceUpdateTag), this.onAttributeUpdate(context);
|
|
13935
13955
|
}
|
|
13936
|
-
_restoreAttributeFromStaticTruth(context) {
|
|
13937
|
-
this._syncFinalAttributeFromStaticTruth();
|
|
13938
|
-
const delta = this._syncAttribute();
|
|
13956
|
+
_restoreAttributeFromStaticTruth(context, excludedKeys) {
|
|
13957
|
+
this._syncFinalAttributeFromStaticTruth(excludedKeys);
|
|
13958
|
+
const delta = this._syncAttribute(excludedKeys);
|
|
13939
13959
|
this.submitUpdateByDelta(delta), this.onAttributeUpdate(context);
|
|
13940
13960
|
}
|
|
13941
13961
|
collectStatePatchDeltaKeys(previousPatch, nextPatch) {
|
|
@@ -20746,14 +20766,18 @@
|
|
|
20746
20766
|
}
|
|
20747
20767
|
class ContributionStore {
|
|
20748
20768
|
static getStore(id) {
|
|
20749
|
-
|
|
20769
|
+
var _a;
|
|
20770
|
+
return null === (_a = this.store.get(id)) || void 0 === _a ? void 0 : _a.values().next().value;
|
|
20750
20771
|
}
|
|
20751
20772
|
static setStore(id, cache) {
|
|
20752
|
-
this.store.
|
|
20773
|
+
let caches = this.store.get(id);
|
|
20774
|
+
caches || (caches = new Set(), this.store.set(id, caches)), caches.add(cache);
|
|
20753
20775
|
}
|
|
20754
20776
|
static refreshAllContributions() {
|
|
20755
|
-
this.store.forEach(
|
|
20756
|
-
|
|
20777
|
+
this.store.forEach(caches => {
|
|
20778
|
+
caches.forEach(cache => {
|
|
20779
|
+
cache.refresh();
|
|
20780
|
+
});
|
|
20757
20781
|
});
|
|
20758
20782
|
}
|
|
20759
20783
|
}
|
|
@@ -22054,6 +22078,9 @@
|
|
|
22054
22078
|
}
|
|
22055
22079
|
const defaultGroupBackgroundRenderContribution = new DefaultGroupBackgroundRenderContribution();
|
|
22056
22080
|
|
|
22081
|
+
function hasDisabledStrokeSide(stroke) {
|
|
22082
|
+
return Array.isArray(stroke) && stroke.some(s => !1 === s || null === s);
|
|
22083
|
+
}
|
|
22057
22084
|
class DefaultRectRenderContribution {
|
|
22058
22085
|
constructor() {
|
|
22059
22086
|
this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
|
|
@@ -22109,7 +22136,7 @@
|
|
|
22109
22136
|
const {
|
|
22110
22137
|
stroke = groupAttribute.stroke
|
|
22111
22138
|
} = group.attribute;
|
|
22112
|
-
|
|
22139
|
+
hasDisabledStrokeSide(stroke) && (doFillOrStroke.doStroke = !1);
|
|
22113
22140
|
}
|
|
22114
22141
|
}
|
|
22115
22142
|
class SplitRectAfterRenderContribution {
|
|
@@ -22130,7 +22157,7 @@
|
|
|
22130
22157
|
width: width,
|
|
22131
22158
|
height: height
|
|
22132
22159
|
} = rect.attribute;
|
|
22133
|
-
if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0,
|
|
22160
|
+
if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0, hasDisabledStrokeSide(stroke)) {
|
|
22134
22161
|
if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), !(0 === cornerRadius || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num))) {
|
|
22135
22162
|
let lastStroke,
|
|
22136
22163
|
lastStrokeI = 0;
|
|
@@ -23165,6 +23192,199 @@
|
|
|
23165
23192
|
}
|
|
23166
23193
|
}
|
|
23167
23194
|
|
|
23195
|
+
function drawArcPath(arc, context, cx, cy, z, outerRadius, innerRadius) {
|
|
23196
|
+
const {
|
|
23197
|
+
startAngle: startAngle,
|
|
23198
|
+
endAngle: endAngle
|
|
23199
|
+
} = arc.getParsedAngle(),
|
|
23200
|
+
deltaAngle = abs$1(endAngle - startAngle),
|
|
23201
|
+
clockwise = endAngle > startAngle;
|
|
23202
|
+
let collapsedToLine = !1;
|
|
23203
|
+
if (outerRadius < innerRadius) {
|
|
23204
|
+
const temp = outerRadius;
|
|
23205
|
+
outerRadius = innerRadius, innerRadius = temp;
|
|
23206
|
+
}
|
|
23207
|
+
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 {
|
|
23208
|
+
const {
|
|
23209
|
+
outerDeltaAngle: outerDeltaAngle,
|
|
23210
|
+
innerDeltaAngle: innerDeltaAngle,
|
|
23211
|
+
outerStartAngle: outerStartAngle,
|
|
23212
|
+
outerEndAngle: outerEndAngle,
|
|
23213
|
+
innerEndAngle: innerEndAngle,
|
|
23214
|
+
innerStartAngle: innerStartAngle
|
|
23215
|
+
} = arc.getParsePadAngle(startAngle, endAngle),
|
|
23216
|
+
xors = outerRadius * cos$1(outerStartAngle),
|
|
23217
|
+
yors = outerRadius * sin$1(outerStartAngle),
|
|
23218
|
+
xire = innerRadius * cos$1(innerEndAngle),
|
|
23219
|
+
yire = innerRadius * sin$1(innerEndAngle);
|
|
23220
|
+
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));
|
|
23221
|
+
}
|
|
23222
|
+
return context.closePath(), collapsedToLine;
|
|
23223
|
+
}
|
|
23224
|
+
function drawInnerOuterArcPath(arc, context, cx, cy, z1, z2, radius, getParsePadAngle) {
|
|
23225
|
+
const {
|
|
23226
|
+
startAngle: startAngle,
|
|
23227
|
+
endAngle: endAngle
|
|
23228
|
+
} = arc.getParsedAngle(),
|
|
23229
|
+
deltaAngle = abs$1(endAngle - startAngle),
|
|
23230
|
+
clockwise = endAngle > startAngle;
|
|
23231
|
+
let collapsedToLine = !1;
|
|
23232
|
+
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 {
|
|
23233
|
+
const {
|
|
23234
|
+
innerouterDeltaAngle: innerouterDeltaAngle,
|
|
23235
|
+
innerouterStartAngle: innerouterStartAngle,
|
|
23236
|
+
innerouterEndAngle: innerouterEndAngle
|
|
23237
|
+
} = getParsePadAngle(startAngle, endAngle),
|
|
23238
|
+
xors = radius * cos$1(innerouterStartAngle),
|
|
23239
|
+
yors = radius * sin$1(innerouterStartAngle),
|
|
23240
|
+
xore = radius * cos$1(innerouterEndAngle),
|
|
23241
|
+
yore = radius * sin$1(innerouterEndAngle);
|
|
23242
|
+
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));
|
|
23243
|
+
}
|
|
23244
|
+
return context.closePath(), collapsedToLine;
|
|
23245
|
+
}
|
|
23246
|
+
class DefaultCanvasArc3DRender extends BaseRender {
|
|
23247
|
+
constructor() {
|
|
23248
|
+
super(...arguments), this.numberType = ARC3D_NUMBER_TYPE;
|
|
23249
|
+
}
|
|
23250
|
+
drawShape(arc, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
23251
|
+
var _a;
|
|
23252
|
+
const arcAttribute = getTheme$1(arc, null == params ? void 0 : params.theme).arc,
|
|
23253
|
+
{
|
|
23254
|
+
fill = arcAttribute.fill
|
|
23255
|
+
} = arc.attribute,
|
|
23256
|
+
data = this.valid(arc, arcAttribute, fillCb, strokeCb);
|
|
23257
|
+
if (!data) return;
|
|
23258
|
+
const {
|
|
23259
|
+
fVisible: fVisible,
|
|
23260
|
+
sVisible: sVisible,
|
|
23261
|
+
doFill: doFill,
|
|
23262
|
+
doStroke: doStroke
|
|
23263
|
+
} = data,
|
|
23264
|
+
z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
|
|
23265
|
+
{
|
|
23266
|
+
outerPadding = arcAttribute.outerPadding,
|
|
23267
|
+
innerPadding = arcAttribute.innerPadding,
|
|
23268
|
+
height = 10
|
|
23269
|
+
} = arc.attribute;
|
|
23270
|
+
let {
|
|
23271
|
+
outerRadius = arcAttribute.outerRadius,
|
|
23272
|
+
innerRadius = arcAttribute.innerRadius
|
|
23273
|
+
} = arc.attribute;
|
|
23274
|
+
outerRadius += outerPadding, innerRadius -= innerPadding;
|
|
23275
|
+
const rgbArray = ColorStore.Get(fill, ColorType.Color255),
|
|
23276
|
+
{
|
|
23277
|
+
light: light
|
|
23278
|
+
} = drawContext.stage || {},
|
|
23279
|
+
face = drawContext.hack_pieFace,
|
|
23280
|
+
z_face = {
|
|
23281
|
+
top: z,
|
|
23282
|
+
bottom: z + height
|
|
23283
|
+
},
|
|
23284
|
+
n_face = {
|
|
23285
|
+
top: [0, 1, 0],
|
|
23286
|
+
bottom: [0, -1, 0],
|
|
23287
|
+
outside: [1, 0, -1],
|
|
23288
|
+
inside: [1, 0, -1]
|
|
23289
|
+
};
|
|
23290
|
+
"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) => {
|
|
23291
|
+
const {
|
|
23292
|
+
outerDeltaAngle: outerDeltaAngle,
|
|
23293
|
+
innerDeltaAngle: innerDeltaAngle,
|
|
23294
|
+
outerStartAngle: outerStartAngle,
|
|
23295
|
+
outerEndAngle: outerEndAngle,
|
|
23296
|
+
innerEndAngle: innerEndAngle,
|
|
23297
|
+
innerStartAngle: innerStartAngle
|
|
23298
|
+
} = arc.getParsePadAngle(startAngle, endAngle);
|
|
23299
|
+
return "outside" === face ? {
|
|
23300
|
+
innerouterDeltaAngle: outerDeltaAngle,
|
|
23301
|
+
innerouterEndAngle: outerEndAngle,
|
|
23302
|
+
innerouterStartAngle: outerStartAngle
|
|
23303
|
+
} : {
|
|
23304
|
+
innerouterDeltaAngle: innerDeltaAngle,
|
|
23305
|
+
innerouterEndAngle: innerEndAngle,
|
|
23306
|
+
innerouterStartAngle: innerStartAngle
|
|
23307
|
+
};
|
|
23308
|
+
}), 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());
|
|
23309
|
+
}
|
|
23310
|
+
draw(arc, renderService, drawContext, params) {
|
|
23311
|
+
const arcAttribute = getTheme$1(arc, null == params ? void 0 : params.theme).arc;
|
|
23312
|
+
this._draw(arc, arcAttribute, !1, drawContext, params);
|
|
23313
|
+
}
|
|
23314
|
+
}
|
|
23315
|
+
|
|
23316
|
+
class Base3dRender extends BaseRender {
|
|
23317
|
+
stroke(x, y, z, face3d, context) {
|
|
23318
|
+
const vertices = face3d.vertices;
|
|
23319
|
+
face3d.edges.forEach(edge => {
|
|
23320
|
+
const p1 = vertices[edge[0]],
|
|
23321
|
+
v1 = {
|
|
23322
|
+
x: x + p1[0],
|
|
23323
|
+
y: y + p1[1],
|
|
23324
|
+
z: z + p1[2]
|
|
23325
|
+
},
|
|
23326
|
+
p2 = vertices[edge[1]],
|
|
23327
|
+
v2 = {
|
|
23328
|
+
x: x + p2[0],
|
|
23329
|
+
y: y + p2[1],
|
|
23330
|
+
z: z + p2[2]
|
|
23331
|
+
};
|
|
23332
|
+
context.beginPath(), context.moveTo(v1.x, v1.y, v1.z), context.lineTo(v2.x, v2.y, v2.z), context.stroke();
|
|
23333
|
+
});
|
|
23334
|
+
}
|
|
23335
|
+
fill(x, y, z, face3d, faces, fillColor, context, light, graphic3d, graphic3dAttribute, fillCb) {
|
|
23336
|
+
const rgbArray = ColorStore.Get(fillColor, ColorType.Color255),
|
|
23337
|
+
vertices = face3d.vertices,
|
|
23338
|
+
viewdVerticesZ = vertices.map(v => context.view(v[0], v[1], v[2])[2]),
|
|
23339
|
+
sortFace = [];
|
|
23340
|
+
face3d.polygons.forEach((p, i) => {
|
|
23341
|
+
if (faces && !faces[i]) return;
|
|
23342
|
+
sortFace.push({
|
|
23343
|
+
faceIdx: i,
|
|
23344
|
+
polygon: p
|
|
23345
|
+
});
|
|
23346
|
+
const {
|
|
23347
|
+
polygon: polygon
|
|
23348
|
+
} = p,
|
|
23349
|
+
z1 = viewdVerticesZ[polygon[0]],
|
|
23350
|
+
z2 = viewdVerticesZ[polygon[1]],
|
|
23351
|
+
z3 = viewdVerticesZ[polygon[2]],
|
|
23352
|
+
z4 = viewdVerticesZ[polygon[3]];
|
|
23353
|
+
p.ave_z = z1 + z2 + z3 + z4;
|
|
23354
|
+
}), sortFace.sort((a, b) => b.polygon.ave_z - a.polygon.ave_z), sortFace.forEach(item => {
|
|
23355
|
+
const {
|
|
23356
|
+
polygon: polygon,
|
|
23357
|
+
normal: normal
|
|
23358
|
+
} = item.polygon,
|
|
23359
|
+
p1 = vertices[polygon[0]],
|
|
23360
|
+
p2 = vertices[polygon[1]],
|
|
23361
|
+
p3 = vertices[polygon[2]],
|
|
23362
|
+
p4 = vertices[polygon[3]],
|
|
23363
|
+
v1 = {
|
|
23364
|
+
x: x + p1[0],
|
|
23365
|
+
y: y + p1[1],
|
|
23366
|
+
z: z + p1[2]
|
|
23367
|
+
},
|
|
23368
|
+
v2 = {
|
|
23369
|
+
x: x + p2[0],
|
|
23370
|
+
y: y + p2[1],
|
|
23371
|
+
z: z + p2[2]
|
|
23372
|
+
},
|
|
23373
|
+
v3 = {
|
|
23374
|
+
x: x + p3[0],
|
|
23375
|
+
y: y + p3[1],
|
|
23376
|
+
z: z + p3[2]
|
|
23377
|
+
},
|
|
23378
|
+
v4 = {
|
|
23379
|
+
x: x + p4[0],
|
|
23380
|
+
y: y + p4[1],
|
|
23381
|
+
z: z + p4[2]
|
|
23382
|
+
};
|
|
23383
|
+
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());
|
|
23384
|
+
});
|
|
23385
|
+
}
|
|
23386
|
+
}
|
|
23387
|
+
|
|
23168
23388
|
class DefaultCanvasCircleRender extends BaseRender {
|
|
23169
23389
|
constructor(graphicRenderContributions) {
|
|
23170
23390
|
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = CIRCLE_NUMBER_TYPE, this.builtinContributions = [defaultCircleRenderContribution, defaultCircleBackgroundRenderContribution, defaultCircleTextureRenderContribution], this.init(graphicRenderContributions);
|
|
@@ -23851,6 +24071,57 @@
|
|
|
23851
24071
|
}
|
|
23852
24072
|
}
|
|
23853
24073
|
|
|
24074
|
+
class DefaultCanvasRect3dRender extends Base3dRender {
|
|
24075
|
+
constructor() {
|
|
24076
|
+
super(...arguments), this.type = "rect3d", this.numberType = RECT3D_NUMBER_TYPE;
|
|
24077
|
+
}
|
|
24078
|
+
drawShape(rect, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
24079
|
+
var _a, _b;
|
|
24080
|
+
const rectAttribute = getTheme$1(rect, null == params ? void 0 : params.theme).rect,
|
|
24081
|
+
{
|
|
24082
|
+
fill = rectAttribute.fill,
|
|
24083
|
+
stroke = rectAttribute.stroke,
|
|
24084
|
+
x1: x1,
|
|
24085
|
+
y1: y1,
|
|
24086
|
+
x: originX,
|
|
24087
|
+
y: originY,
|
|
24088
|
+
opacity = rectAttribute.opacity,
|
|
24089
|
+
fillOpacity = rectAttribute.fillOpacity,
|
|
24090
|
+
lineWidth = rectAttribute.lineWidth,
|
|
24091
|
+
strokeOpacity = rectAttribute.strokeOpacity,
|
|
24092
|
+
visible = rectAttribute.visible,
|
|
24093
|
+
drawStrokeWhenZeroWH = null !== (_a = rectAttribute.drawStrokeWhenZeroWH) && void 0 !== _a && _a
|
|
24094
|
+
} = rect.attribute;
|
|
24095
|
+
let {
|
|
24096
|
+
width: width,
|
|
24097
|
+
height: height
|
|
24098
|
+
} = rect.attribute;
|
|
24099
|
+
width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0;
|
|
24100
|
+
const z = null !== (_b = this.z) && void 0 !== _b ? _b : 0,
|
|
24101
|
+
fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
|
|
24102
|
+
sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height, drawStrokeWhenZeroWH),
|
|
24103
|
+
doFill = runFill(fill),
|
|
24104
|
+
doStroke = runStroke(stroke, lineWidth);
|
|
24105
|
+
if (!rect.valid || !visible) return;
|
|
24106
|
+
if (!doFill && !doStroke) return;
|
|
24107
|
+
if (!(fVisible || sVisible || fillCb || strokeCb)) return;
|
|
24108
|
+
const {
|
|
24109
|
+
light: light
|
|
24110
|
+
} = drawContext.stage || {},
|
|
24111
|
+
face3d = rect.findFace();
|
|
24112
|
+
if (!1 !== fill) {
|
|
24113
|
+
context.setCommonStyle(rect, rect.attribute, x, y, rectAttribute);
|
|
24114
|
+
let fc = fill;
|
|
24115
|
+
"string" != typeof fc && (fc = "black"), this.fill(x, y, z, face3d, null, fc, context, light, null, null, fillCb);
|
|
24116
|
+
}
|
|
24117
|
+
!1 !== stroke && (context.setStrokeStyle(rect, rect.attribute, x, y, rectAttribute), this.stroke(x, y, z, face3d, context));
|
|
24118
|
+
}
|
|
24119
|
+
draw(rect, renderService, drawContext) {
|
|
24120
|
+
const rectAttribute = getTheme$1(rect).rect;
|
|
24121
|
+
this._draw(rect, rectAttribute, !1, drawContext);
|
|
24122
|
+
}
|
|
24123
|
+
}
|
|
24124
|
+
|
|
23854
24125
|
class DefaultCanvasSymbolRender extends BaseRender {
|
|
23855
24126
|
constructor(graphicRenderContributions) {
|
|
23856
24127
|
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = SYMBOL_NUMBER_TYPE, this.builtinContributions = [defaultSymbolRenderContribution, defaultSymbolBackgroundRenderContribution, defaultSymbolTextureRenderContribution, defaultSymbolClipRangeStrokeRenderContribution], this.init(graphicRenderContributions);
|
|
@@ -24215,6 +24486,37 @@
|
|
|
24215
24486
|
}
|
|
24216
24487
|
}
|
|
24217
24488
|
|
|
24489
|
+
class DefaultCanvasPyramid3dRender extends Base3dRender {
|
|
24490
|
+
constructor() {
|
|
24491
|
+
super(...arguments), this.type = "pyramid3d", this.numberType = PYRAMID3D_NUMBER_TYPE;
|
|
24492
|
+
}
|
|
24493
|
+
drawShape(pyramid3d, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
24494
|
+
var _a;
|
|
24495
|
+
const pyramidAttribute = getTheme$1(pyramid3d, null == params ? void 0 : params.theme).polygon,
|
|
24496
|
+
{
|
|
24497
|
+
fill = pyramidAttribute.fill,
|
|
24498
|
+
stroke = pyramidAttribute.stroke,
|
|
24499
|
+
face = [!0, !0, !0, !0, !0, !0]
|
|
24500
|
+
} = pyramid3d.attribute,
|
|
24501
|
+
z = null !== (_a = this.z) && void 0 !== _a ? _a : 0;
|
|
24502
|
+
if (!this.valid(pyramid3d, pyramidAttribute, fillCb, strokeCb)) return;
|
|
24503
|
+
const {
|
|
24504
|
+
light: light
|
|
24505
|
+
} = drawContext.stage || {},
|
|
24506
|
+
face3d = pyramid3d.findFace();
|
|
24507
|
+
if (!1 !== fill) {
|
|
24508
|
+
context.setCommonStyle(pyramid3d, pyramid3d.attribute, x, y, pyramidAttribute);
|
|
24509
|
+
let fc = fill;
|
|
24510
|
+
"string" != typeof fc && (fc = "black"), this.fill(x, y, z, face3d, face, fc, context, light, pyramid3d, pyramidAttribute, fillCb);
|
|
24511
|
+
}
|
|
24512
|
+
!1 !== stroke && (context.setStrokeStyle(pyramid3d, pyramid3d.attribute, x, y, pyramidAttribute), this.stroke(x, y, z, face3d, context));
|
|
24513
|
+
}
|
|
24514
|
+
draw(pyramid3d, renderService, drawContext) {
|
|
24515
|
+
const pyramid3dAttribute = getTheme$1(pyramid3d).polygon;
|
|
24516
|
+
this._draw(pyramid3d, pyramid3dAttribute, !1, drawContext);
|
|
24517
|
+
}
|
|
24518
|
+
}
|
|
24519
|
+
|
|
24218
24520
|
const repeatStr = ["", "repeat-x", "repeat-y", "repeat"];
|
|
24219
24521
|
function resolveImageRepeatMode(repeatX, repeatY) {
|
|
24220
24522
|
let repeat = 0;
|
|
@@ -24929,8 +25231,13 @@
|
|
|
24929
25231
|
const runtimeInstallerContext = createLegacyBindingContext();
|
|
24930
25232
|
let runtimeGlobal,
|
|
24931
25233
|
runtimeInstallerPreloaded = !1;
|
|
24932
|
-
const
|
|
24933
|
-
|
|
25234
|
+
const RUNTIME_RENDERER_NAMESPACE = "vrender:runtime-renderer",
|
|
25235
|
+
RUNTIME_PICKER_NAMESPACE = "vrender:runtime-picker",
|
|
25236
|
+
runtimeEntryKeys = new WeakMap(),
|
|
25237
|
+
runtimeDrawContributions = new WeakMap(),
|
|
25238
|
+
loadedRuntimeContributionModules = new WeakMap(),
|
|
25239
|
+
DEFAULT_RUNTIME_CONTRIBUTION_TARGETS = ["graphic-renderer"],
|
|
25240
|
+
noopUnbindRuntimeContributionService = () => {};
|
|
24934
25241
|
function ensureRuntimeInstallerPreloaded() {
|
|
24935
25242
|
runtimeInstallerPreloaded || (runtimeInstallerPreloaded = !0, bindCoreModules({
|
|
24936
25243
|
bind: runtimeInstallerContext.bind
|
|
@@ -24991,11 +25298,11 @@
|
|
|
24991
25298
|
const bindingContext = getRuntimeInstallerBindingContext();
|
|
24992
25299
|
refreshRuntimeInstallerContributions();
|
|
24993
25300
|
const renderers = bindingContext.getAll(GraphicRender),
|
|
24994
|
-
registeredKeys = getTrackedEntryKeys$1(app.registry.renderer,
|
|
24995
|
-
clearTrackedEntryKeys$1(app.registry.renderer,
|
|
25301
|
+
registeredKeys = getTrackedEntryKeys$1(app.registry.renderer, RUNTIME_RENDERER_NAMESPACE);
|
|
25302
|
+
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) => {
|
|
24996
25303
|
var _a;
|
|
24997
25304
|
null === (_a = null == renderer ? void 0 : renderer.reInit) || void 0 === _a || _a.call(renderer), app.registry.renderer.register(key, renderer), registeredKeys.add(key);
|
|
24998
|
-
}, renderers,
|
|
25305
|
+
}, renderers, RUNTIME_RENDERER_NAMESPACE);
|
|
24999
25306
|
}
|
|
25000
25307
|
function installRuntimeDrawContributionsToApp(app) {
|
|
25001
25308
|
var _a;
|
|
@@ -25017,10 +25324,45 @@
|
|
|
25017
25324
|
const bindingContext = getRuntimeInstallerBindingContext();
|
|
25018
25325
|
refreshRuntimeInstallerContributions();
|
|
25019
25326
|
const pickers = bindingContext.getAll(serviceIdentifier),
|
|
25020
|
-
registeredKeys = getTrackedEntryKeys$1(app.registry.picker,
|
|
25021
|
-
clearTrackedEntryKeys$1(app.registry.picker,
|
|
25327
|
+
registeredKeys = getTrackedEntryKeys$1(app.registry.picker, RUNTIME_PICKER_NAMESPACE);
|
|
25328
|
+
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) => {
|
|
25022
25329
|
app.registry.picker.register(key, picker), registeredKeys.add(key);
|
|
25023
|
-
}, pickers,
|
|
25330
|
+
}, pickers, RUNTIME_PICKER_NAMESPACE);
|
|
25331
|
+
}
|
|
25332
|
+
function getRuntimeContributionModuleIdentity(module) {
|
|
25333
|
+
return module;
|
|
25334
|
+
}
|
|
25335
|
+
function hasLoadedRuntimeContributionModule(context, module) {
|
|
25336
|
+
var _a, _b;
|
|
25337
|
+
return null !== (_b = null === (_a = loadedRuntimeContributionModules.get(context)) || void 0 === _a ? void 0 : _a.has(getRuntimeContributionModuleIdentity(module))) && void 0 !== _b && _b;
|
|
25338
|
+
}
|
|
25339
|
+
function markRuntimeContributionModuleLoaded(context, module) {
|
|
25340
|
+
let modules = loadedRuntimeContributionModules.get(context);
|
|
25341
|
+
modules || (modules = new WeakSet(), loadedRuntimeContributionModules.set(context, modules)), modules.add(getRuntimeContributionModuleIdentity(module));
|
|
25342
|
+
}
|
|
25343
|
+
function loadRuntimeContributionModuleToContext(context, module) {
|
|
25344
|
+
hasLoadedRuntimeContributionModule(context, module) || ("function" == typeof module ? module(context) : module.registry(context.bind, noopUnbindRuntimeContributionService, context.isBound, context.rebind), markRuntimeContributionModuleLoaded(context, module));
|
|
25345
|
+
}
|
|
25346
|
+
function isRuntimePickerTarget(target) {
|
|
25347
|
+
return "object" == typeof target && null !== target && "picker" in target;
|
|
25348
|
+
}
|
|
25349
|
+
function installRuntimeContributionTargetsToApp(app, targets) {
|
|
25350
|
+
const resolvedTargets = null != targets ? targets : DEFAULT_RUNTIME_CONTRIBUTION_TARGETS;
|
|
25351
|
+
let installGraphicRenderers = !1,
|
|
25352
|
+
installDrawContributions = !1;
|
|
25353
|
+
const pickerTargets = new Set();
|
|
25354
|
+
resolvedTargets.forEach(target => {
|
|
25355
|
+
"graphic-renderer" === target ? installGraphicRenderers = !0 : "draw-contribution" === target ? installDrawContributions = !0 : isRuntimePickerTarget(target) && pickerTargets.add(target.picker);
|
|
25356
|
+
}), installDrawContributions && installRuntimeDrawContributionsToApp(app), installGraphicRenderers && installRuntimeGraphicRenderersToApp(app), pickerTargets.forEach(serviceIdentifier => {
|
|
25357
|
+
installRuntimePickersToApp(app, serviceIdentifier);
|
|
25358
|
+
});
|
|
25359
|
+
}
|
|
25360
|
+
function installRuntimeContributionModule(module, {
|
|
25361
|
+
app: app,
|
|
25362
|
+
legacy = !0,
|
|
25363
|
+
targets: targets
|
|
25364
|
+
} = {}) {
|
|
25365
|
+
loadRuntimeContributionModuleToContext(getRuntimeInstallerBindingContext(), module), legacy && (preLoadAllModule(), loadRuntimeContributionModuleToContext(getLegacyBindingContext(), module)), refreshRuntimeInstallerContributions(), app && installRuntimeContributionTargetsToApp(app, targets);
|
|
25024
25366
|
}
|
|
25025
25367
|
|
|
25026
25368
|
function simplifyRadialDist(points, sqTolerance) {
|
|
@@ -27022,129 +27364,6 @@
|
|
|
27022
27364
|
}
|
|
27023
27365
|
const imageModule = bindImageRenderModule;
|
|
27024
27366
|
|
|
27025
|
-
class Base3dRender extends BaseRender {
|
|
27026
|
-
stroke(x, y, z, face3d, context) {
|
|
27027
|
-
const vertices = face3d.vertices;
|
|
27028
|
-
face3d.edges.forEach(edge => {
|
|
27029
|
-
const p1 = vertices[edge[0]],
|
|
27030
|
-
v1 = {
|
|
27031
|
-
x: x + p1[0],
|
|
27032
|
-
y: y + p1[1],
|
|
27033
|
-
z: z + p1[2]
|
|
27034
|
-
},
|
|
27035
|
-
p2 = vertices[edge[1]],
|
|
27036
|
-
v2 = {
|
|
27037
|
-
x: x + p2[0],
|
|
27038
|
-
y: y + p2[1],
|
|
27039
|
-
z: z + p2[2]
|
|
27040
|
-
};
|
|
27041
|
-
context.beginPath(), context.moveTo(v1.x, v1.y, v1.z), context.lineTo(v2.x, v2.y, v2.z), context.stroke();
|
|
27042
|
-
});
|
|
27043
|
-
}
|
|
27044
|
-
fill(x, y, z, face3d, faces, fillColor, context, light, graphic3d, graphic3dAttribute, fillCb) {
|
|
27045
|
-
const rgbArray = ColorStore.Get(fillColor, ColorType.Color255),
|
|
27046
|
-
vertices = face3d.vertices,
|
|
27047
|
-
viewdVerticesZ = vertices.map(v => context.view(v[0], v[1], v[2])[2]),
|
|
27048
|
-
sortFace = [];
|
|
27049
|
-
face3d.polygons.forEach((p, i) => {
|
|
27050
|
-
if (faces && !faces[i]) return;
|
|
27051
|
-
sortFace.push({
|
|
27052
|
-
faceIdx: i,
|
|
27053
|
-
polygon: p
|
|
27054
|
-
});
|
|
27055
|
-
const {
|
|
27056
|
-
polygon: polygon
|
|
27057
|
-
} = p,
|
|
27058
|
-
z1 = viewdVerticesZ[polygon[0]],
|
|
27059
|
-
z2 = viewdVerticesZ[polygon[1]],
|
|
27060
|
-
z3 = viewdVerticesZ[polygon[2]],
|
|
27061
|
-
z4 = viewdVerticesZ[polygon[3]];
|
|
27062
|
-
p.ave_z = z1 + z2 + z3 + z4;
|
|
27063
|
-
}), sortFace.sort((a, b) => b.polygon.ave_z - a.polygon.ave_z), sortFace.forEach(item => {
|
|
27064
|
-
const {
|
|
27065
|
-
polygon: polygon,
|
|
27066
|
-
normal: normal
|
|
27067
|
-
} = item.polygon,
|
|
27068
|
-
p1 = vertices[polygon[0]],
|
|
27069
|
-
p2 = vertices[polygon[1]],
|
|
27070
|
-
p3 = vertices[polygon[2]],
|
|
27071
|
-
p4 = vertices[polygon[3]],
|
|
27072
|
-
v1 = {
|
|
27073
|
-
x: x + p1[0],
|
|
27074
|
-
y: y + p1[1],
|
|
27075
|
-
z: z + p1[2]
|
|
27076
|
-
},
|
|
27077
|
-
v2 = {
|
|
27078
|
-
x: x + p2[0],
|
|
27079
|
-
y: y + p2[1],
|
|
27080
|
-
z: z + p2[2]
|
|
27081
|
-
},
|
|
27082
|
-
v3 = {
|
|
27083
|
-
x: x + p3[0],
|
|
27084
|
-
y: y + p3[1],
|
|
27085
|
-
z: z + p3[2]
|
|
27086
|
-
},
|
|
27087
|
-
v4 = {
|
|
27088
|
-
x: x + p4[0],
|
|
27089
|
-
y: y + p4[1],
|
|
27090
|
-
z: z + p4[2]
|
|
27091
|
-
};
|
|
27092
|
-
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());
|
|
27093
|
-
});
|
|
27094
|
-
}
|
|
27095
|
-
}
|
|
27096
|
-
|
|
27097
|
-
class DefaultCanvasRect3dRender extends Base3dRender {
|
|
27098
|
-
constructor() {
|
|
27099
|
-
super(...arguments), this.type = "rect3d", this.numberType = RECT3D_NUMBER_TYPE;
|
|
27100
|
-
}
|
|
27101
|
-
drawShape(rect, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
27102
|
-
var _a, _b;
|
|
27103
|
-
const rectAttribute = getTheme$1(rect, null == params ? void 0 : params.theme).rect,
|
|
27104
|
-
{
|
|
27105
|
-
fill = rectAttribute.fill,
|
|
27106
|
-
stroke = rectAttribute.stroke,
|
|
27107
|
-
x1: x1,
|
|
27108
|
-
y1: y1,
|
|
27109
|
-
x: originX,
|
|
27110
|
-
y: originY,
|
|
27111
|
-
opacity = rectAttribute.opacity,
|
|
27112
|
-
fillOpacity = rectAttribute.fillOpacity,
|
|
27113
|
-
lineWidth = rectAttribute.lineWidth,
|
|
27114
|
-
strokeOpacity = rectAttribute.strokeOpacity,
|
|
27115
|
-
visible = rectAttribute.visible,
|
|
27116
|
-
drawStrokeWhenZeroWH = null !== (_a = rectAttribute.drawStrokeWhenZeroWH) && void 0 !== _a && _a
|
|
27117
|
-
} = rect.attribute;
|
|
27118
|
-
let {
|
|
27119
|
-
width: width,
|
|
27120
|
-
height: height
|
|
27121
|
-
} = rect.attribute;
|
|
27122
|
-
width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0;
|
|
27123
|
-
const z = null !== (_b = this.z) && void 0 !== _b ? _b : 0,
|
|
27124
|
-
fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
|
|
27125
|
-
sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height, drawStrokeWhenZeroWH),
|
|
27126
|
-
doFill = runFill(fill),
|
|
27127
|
-
doStroke = runStroke(stroke, lineWidth);
|
|
27128
|
-
if (!rect.valid || !visible) return;
|
|
27129
|
-
if (!doFill && !doStroke) return;
|
|
27130
|
-
if (!(fVisible || sVisible || fillCb || strokeCb)) return;
|
|
27131
|
-
const {
|
|
27132
|
-
light: light
|
|
27133
|
-
} = drawContext.stage || {},
|
|
27134
|
-
face3d = rect.findFace();
|
|
27135
|
-
if (!1 !== fill) {
|
|
27136
|
-
context.setCommonStyle(rect, rect.attribute, x, y, rectAttribute);
|
|
27137
|
-
let fc = fill;
|
|
27138
|
-
"string" != typeof fc && (fc = "black"), this.fill(x, y, z, face3d, null, fc, context, light, null, null, fillCb);
|
|
27139
|
-
}
|
|
27140
|
-
!1 !== stroke && (context.setStrokeStyle(rect, rect.attribute, x, y, rectAttribute), this.stroke(x, y, z, face3d, context));
|
|
27141
|
-
}
|
|
27142
|
-
draw(rect, renderService, drawContext) {
|
|
27143
|
-
const rectAttribute = getTheme$1(rect).rect;
|
|
27144
|
-
this._draw(rect, rectAttribute, !1, drawContext);
|
|
27145
|
-
}
|
|
27146
|
-
}
|
|
27147
|
-
|
|
27148
27367
|
const loadedRect3dModuleContexts = new WeakSet();
|
|
27149
27368
|
function bindRect3dRenderModule({
|
|
27150
27369
|
bind: bind
|
|
@@ -27153,127 +27372,6 @@
|
|
|
27153
27372
|
}
|
|
27154
27373
|
const rect3dModule = bindRect3dRenderModule;
|
|
27155
27374
|
|
|
27156
|
-
function drawArcPath(arc, context, cx, cy, z, outerRadius, innerRadius) {
|
|
27157
|
-
const {
|
|
27158
|
-
startAngle: startAngle,
|
|
27159
|
-
endAngle: endAngle
|
|
27160
|
-
} = arc.getParsedAngle(),
|
|
27161
|
-
deltaAngle = abs$1(endAngle - startAngle),
|
|
27162
|
-
clockwise = endAngle > startAngle;
|
|
27163
|
-
let collapsedToLine = !1;
|
|
27164
|
-
if (outerRadius < innerRadius) {
|
|
27165
|
-
const temp = outerRadius;
|
|
27166
|
-
outerRadius = innerRadius, innerRadius = temp;
|
|
27167
|
-
}
|
|
27168
|
-
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 {
|
|
27169
|
-
const {
|
|
27170
|
-
outerDeltaAngle: outerDeltaAngle,
|
|
27171
|
-
innerDeltaAngle: innerDeltaAngle,
|
|
27172
|
-
outerStartAngle: outerStartAngle,
|
|
27173
|
-
outerEndAngle: outerEndAngle,
|
|
27174
|
-
innerEndAngle: innerEndAngle,
|
|
27175
|
-
innerStartAngle: innerStartAngle
|
|
27176
|
-
} = arc.getParsePadAngle(startAngle, endAngle),
|
|
27177
|
-
xors = outerRadius * cos$1(outerStartAngle),
|
|
27178
|
-
yors = outerRadius * sin$1(outerStartAngle),
|
|
27179
|
-
xire = innerRadius * cos$1(innerEndAngle),
|
|
27180
|
-
yire = innerRadius * sin$1(innerEndAngle);
|
|
27181
|
-
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));
|
|
27182
|
-
}
|
|
27183
|
-
return context.closePath(), collapsedToLine;
|
|
27184
|
-
}
|
|
27185
|
-
function drawInnerOuterArcPath(arc, context, cx, cy, z1, z2, radius, getParsePadAngle) {
|
|
27186
|
-
const {
|
|
27187
|
-
startAngle: startAngle,
|
|
27188
|
-
endAngle: endAngle
|
|
27189
|
-
} = arc.getParsedAngle(),
|
|
27190
|
-
deltaAngle = abs$1(endAngle - startAngle),
|
|
27191
|
-
clockwise = endAngle > startAngle;
|
|
27192
|
-
let collapsedToLine = !1;
|
|
27193
|
-
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 {
|
|
27194
|
-
const {
|
|
27195
|
-
innerouterDeltaAngle: innerouterDeltaAngle,
|
|
27196
|
-
innerouterStartAngle: innerouterStartAngle,
|
|
27197
|
-
innerouterEndAngle: innerouterEndAngle
|
|
27198
|
-
} = getParsePadAngle(startAngle, endAngle),
|
|
27199
|
-
xors = radius * cos$1(innerouterStartAngle),
|
|
27200
|
-
yors = radius * sin$1(innerouterStartAngle),
|
|
27201
|
-
xore = radius * cos$1(innerouterEndAngle),
|
|
27202
|
-
yore = radius * sin$1(innerouterEndAngle);
|
|
27203
|
-
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));
|
|
27204
|
-
}
|
|
27205
|
-
return context.closePath(), collapsedToLine;
|
|
27206
|
-
}
|
|
27207
|
-
class DefaultCanvasArc3DRender extends BaseRender {
|
|
27208
|
-
constructor() {
|
|
27209
|
-
super(...arguments), this.numberType = ARC3D_NUMBER_TYPE;
|
|
27210
|
-
}
|
|
27211
|
-
drawShape(arc, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
27212
|
-
var _a;
|
|
27213
|
-
const arcAttribute = getTheme$1(arc, null == params ? void 0 : params.theme).arc,
|
|
27214
|
-
{
|
|
27215
|
-
fill = arcAttribute.fill
|
|
27216
|
-
} = arc.attribute,
|
|
27217
|
-
data = this.valid(arc, arcAttribute, fillCb, strokeCb);
|
|
27218
|
-
if (!data) return;
|
|
27219
|
-
const {
|
|
27220
|
-
fVisible: fVisible,
|
|
27221
|
-
sVisible: sVisible,
|
|
27222
|
-
doFill: doFill,
|
|
27223
|
-
doStroke: doStroke
|
|
27224
|
-
} = data,
|
|
27225
|
-
z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
|
|
27226
|
-
{
|
|
27227
|
-
outerPadding = arcAttribute.outerPadding,
|
|
27228
|
-
innerPadding = arcAttribute.innerPadding,
|
|
27229
|
-
height = 10
|
|
27230
|
-
} = arc.attribute;
|
|
27231
|
-
let {
|
|
27232
|
-
outerRadius = arcAttribute.outerRadius,
|
|
27233
|
-
innerRadius = arcAttribute.innerRadius
|
|
27234
|
-
} = arc.attribute;
|
|
27235
|
-
outerRadius += outerPadding, innerRadius -= innerPadding;
|
|
27236
|
-
const rgbArray = ColorStore.Get(fill, ColorType.Color255),
|
|
27237
|
-
{
|
|
27238
|
-
light: light
|
|
27239
|
-
} = drawContext.stage || {},
|
|
27240
|
-
face = drawContext.hack_pieFace,
|
|
27241
|
-
z_face = {
|
|
27242
|
-
top: z,
|
|
27243
|
-
bottom: z + height
|
|
27244
|
-
},
|
|
27245
|
-
n_face = {
|
|
27246
|
-
top: [0, 1, 0],
|
|
27247
|
-
bottom: [0, -1, 0],
|
|
27248
|
-
outside: [1, 0, -1],
|
|
27249
|
-
inside: [1, 0, -1]
|
|
27250
|
-
};
|
|
27251
|
-
"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) => {
|
|
27252
|
-
const {
|
|
27253
|
-
outerDeltaAngle: outerDeltaAngle,
|
|
27254
|
-
innerDeltaAngle: innerDeltaAngle,
|
|
27255
|
-
outerStartAngle: outerStartAngle,
|
|
27256
|
-
outerEndAngle: outerEndAngle,
|
|
27257
|
-
innerEndAngle: innerEndAngle,
|
|
27258
|
-
innerStartAngle: innerStartAngle
|
|
27259
|
-
} = arc.getParsePadAngle(startAngle, endAngle);
|
|
27260
|
-
return "outside" === face ? {
|
|
27261
|
-
innerouterDeltaAngle: outerDeltaAngle,
|
|
27262
|
-
innerouterEndAngle: outerEndAngle,
|
|
27263
|
-
innerouterStartAngle: outerStartAngle
|
|
27264
|
-
} : {
|
|
27265
|
-
innerouterDeltaAngle: innerDeltaAngle,
|
|
27266
|
-
innerouterEndAngle: innerEndAngle,
|
|
27267
|
-
innerouterStartAngle: innerStartAngle
|
|
27268
|
-
};
|
|
27269
|
-
}), 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());
|
|
27270
|
-
}
|
|
27271
|
-
draw(arc, renderService, drawContext, params) {
|
|
27272
|
-
const arcAttribute = getTheme$1(arc, null == params ? void 0 : params.theme).arc;
|
|
27273
|
-
this._draw(arc, arcAttribute, !1, drawContext, params);
|
|
27274
|
-
}
|
|
27275
|
-
}
|
|
27276
|
-
|
|
27277
27375
|
const loadedArc3dModuleContexts = new WeakSet();
|
|
27278
27376
|
function bindArc3dRenderModule({
|
|
27279
27377
|
bind: bind
|
|
@@ -27282,37 +27380,6 @@
|
|
|
27282
27380
|
}
|
|
27283
27381
|
const arc3dModule = bindArc3dRenderModule;
|
|
27284
27382
|
|
|
27285
|
-
class DefaultCanvasPyramid3dRender extends Base3dRender {
|
|
27286
|
-
constructor() {
|
|
27287
|
-
super(...arguments), this.type = "pyramid3d", this.numberType = PYRAMID3D_NUMBER_TYPE;
|
|
27288
|
-
}
|
|
27289
|
-
drawShape(pyramid3d, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
27290
|
-
var _a;
|
|
27291
|
-
const pyramidAttribute = getTheme$1(pyramid3d, null == params ? void 0 : params.theme).polygon,
|
|
27292
|
-
{
|
|
27293
|
-
fill = pyramidAttribute.fill,
|
|
27294
|
-
stroke = pyramidAttribute.stroke,
|
|
27295
|
-
face = [!0, !0, !0, !0, !0, !0]
|
|
27296
|
-
} = pyramid3d.attribute,
|
|
27297
|
-
z = null !== (_a = this.z) && void 0 !== _a ? _a : 0;
|
|
27298
|
-
if (!this.valid(pyramid3d, pyramidAttribute, fillCb, strokeCb)) return;
|
|
27299
|
-
const {
|
|
27300
|
-
light: light
|
|
27301
|
-
} = drawContext.stage || {},
|
|
27302
|
-
face3d = pyramid3d.findFace();
|
|
27303
|
-
if (!1 !== fill) {
|
|
27304
|
-
context.setCommonStyle(pyramid3d, pyramid3d.attribute, x, y, pyramidAttribute);
|
|
27305
|
-
let fc = fill;
|
|
27306
|
-
"string" != typeof fc && (fc = "black"), this.fill(x, y, z, face3d, face, fc, context, light, pyramid3d, pyramidAttribute, fillCb);
|
|
27307
|
-
}
|
|
27308
|
-
!1 !== stroke && (context.setStrokeStyle(pyramid3d, pyramid3d.attribute, x, y, pyramidAttribute), this.stroke(x, y, z, face3d, context));
|
|
27309
|
-
}
|
|
27310
|
-
draw(pyramid3d, renderService, drawContext) {
|
|
27311
|
-
const pyramid3dAttribute = getTheme$1(pyramid3d).polygon;
|
|
27312
|
-
this._draw(pyramid3d, pyramid3dAttribute, !1, drawContext);
|
|
27313
|
-
}
|
|
27314
|
-
}
|
|
27315
|
-
|
|
27316
27383
|
const loadedPyramid3dModuleContexts = new WeakSet();
|
|
27317
27384
|
function bindPyramid3dRenderModule({
|
|
27318
27385
|
bind: bind
|
|
@@ -27976,6 +28043,7 @@
|
|
|
27976
28043
|
AreaRenderContribution: AreaRenderContribution,
|
|
27977
28044
|
get AttributeUpdateType () { return AttributeUpdateType; },
|
|
27978
28045
|
AutoEnablePlugins: AutoEnablePlugins,
|
|
28046
|
+
Base3dRender: Base3dRender,
|
|
27979
28047
|
BaseCanvas: BaseCanvas,
|
|
27980
28048
|
BaseEnvContribution: BaseEnvContribution,
|
|
27981
28049
|
BaseRender: BaseRender,
|
|
@@ -28024,6 +28092,7 @@
|
|
|
28024
28092
|
DefaultBaseInteractiveRenderContribution: DefaultBaseInteractiveRenderContribution,
|
|
28025
28093
|
DefaultBaseTextureRenderContribution: DefaultBaseTextureRenderContribution,
|
|
28026
28094
|
DefaultCanvasAllocate: DefaultCanvasAllocate,
|
|
28095
|
+
DefaultCanvasArc3DRender: DefaultCanvasArc3DRender,
|
|
28027
28096
|
DefaultCanvasArcRender: DefaultCanvasArcRender,
|
|
28028
28097
|
DefaultCanvasAreaRender: DefaultCanvasAreaRender,
|
|
28029
28098
|
DefaultCanvasCircleRender: DefaultCanvasCircleRender,
|
|
@@ -28032,6 +28101,8 @@
|
|
|
28032
28101
|
DefaultCanvasLineRender: DefaultCanvasLineRender,
|
|
28033
28102
|
DefaultCanvasPathRender: DefaultCanvasPathRender,
|
|
28034
28103
|
DefaultCanvasPolygonRender: DefaultCanvasPolygonRender,
|
|
28104
|
+
DefaultCanvasPyramid3dRender: DefaultCanvasPyramid3dRender,
|
|
28105
|
+
DefaultCanvasRect3dRender: DefaultCanvasRect3dRender,
|
|
28035
28106
|
DefaultCanvasRectRender: DefaultCanvasRectRender,
|
|
28036
28107
|
DefaultCanvasSymbolRender: DefaultCanvasSymbolRender,
|
|
28037
28108
|
DefaultCanvasTextRender: DefaultCanvasTextRender,
|
|
@@ -28405,6 +28476,7 @@
|
|
|
28405
28476
|
identityMat4: identityMat4,
|
|
28406
28477
|
imageModule: imageModule,
|
|
28407
28478
|
incrementalAddTo: incrementalAddTo,
|
|
28479
|
+
installRuntimeContributionModule: installRuntimeContributionModule,
|
|
28408
28480
|
installRuntimeDrawContributionsToApp: installRuntimeDrawContributionsToApp,
|
|
28409
28481
|
installRuntimeGraphicRenderersToApp: installRuntimeGraphicRenderersToApp,
|
|
28410
28482
|
installRuntimePickersToApp: installRuntimePickersToApp,
|
|
@@ -37390,6 +37462,30 @@
|
|
|
37390
37462
|
return 2;
|
|
37391
37463
|
}
|
|
37392
37464
|
|
|
37465
|
+
function buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs) {
|
|
37466
|
+
var _a;
|
|
37467
|
+
const commitTarget = target,
|
|
37468
|
+
contextFinalAttrs = null === (_a = commitTarget.context) || void 0 === _a ? void 0 : _a.finalAttrs,
|
|
37469
|
+
finalAttribute = commitTarget.getFinalAttribute();
|
|
37470
|
+
let commitAttrs = null;
|
|
37471
|
+
for (let i = 0; i < keys.length; i++) {
|
|
37472
|
+
const key = keys[i];
|
|
37473
|
+
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]));
|
|
37474
|
+
}
|
|
37475
|
+
return commitAttrs;
|
|
37476
|
+
}
|
|
37477
|
+
function commitAnimationStaticAttrs(target, keys, animate, fallbackAttrs) {
|
|
37478
|
+
const commitAttrs = buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs);
|
|
37479
|
+
if (!commitAttrs) return !1;
|
|
37480
|
+
target.setFinalAttributes(commitAttrs);
|
|
37481
|
+
const commitStaticAttributes = target._commitAnimationStaticAttributes;
|
|
37482
|
+
return "function" == typeof commitStaticAttributes ? commitStaticAttributes.call(target, commitAttrs, {
|
|
37483
|
+
type: AttributeUpdateType.ANIMATE_END
|
|
37484
|
+
}) : target.setAttributes(commitAttrs, !1, {
|
|
37485
|
+
type: AttributeUpdateType.ANIMATE_END
|
|
37486
|
+
}), !0;
|
|
37487
|
+
}
|
|
37488
|
+
|
|
37393
37489
|
class AnimateExecutor {
|
|
37394
37490
|
static registerBuiltInAnimate(name, animate) {
|
|
37395
37491
|
AnimateExecutor.builtInAnimateMap[name] = animate;
|
|
@@ -37569,7 +37665,7 @@
|
|
|
37569
37665
|
props = params.to,
|
|
37570
37666
|
from = params.from;
|
|
37571
37667
|
const commitAttrOutChannel = this.shouldCommitAttrOutChannel(type);
|
|
37572
|
-
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);
|
|
37668
|
+
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);
|
|
37573
37669
|
let totalDelay = 0;
|
|
37574
37670
|
oneByOneDelay && (totalDelay = oneByOneDelay * (count - index - 1));
|
|
37575
37671
|
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;
|
|
@@ -37651,6 +37747,25 @@
|
|
|
37651
37747
|
shouldCommitAttrOutChannel(type) {
|
|
37652
37748
|
return "update" !== type;
|
|
37653
37749
|
}
|
|
37750
|
+
commitAnimatedUpdateDiffAttrsOnEnd(animate, graphic, type, props) {
|
|
37751
|
+
if ("update" === type || !props || !this.isUpdateDiffContext(graphic)) return;
|
|
37752
|
+
const keys = this.collectAnimatedUpdateDiffAttrKeys(graphic, props);
|
|
37753
|
+
(null == keys ? void 0 : keys.length) && animate.onEnd(() => {
|
|
37754
|
+
commitAnimationStaticAttrs(graphic, keys, animate, props);
|
|
37755
|
+
});
|
|
37756
|
+
}
|
|
37757
|
+
isUpdateDiffContext(graphic) {
|
|
37758
|
+
const context = graphic.context;
|
|
37759
|
+
return "update" === (null == context ? void 0 : context.diffState) || "update" === (null == context ? void 0 : context.animationState);
|
|
37760
|
+
}
|
|
37761
|
+
collectAnimatedUpdateDiffAttrKeys(graphic, props) {
|
|
37762
|
+
var _a;
|
|
37763
|
+
const diffAttrs = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.diffAttrs;
|
|
37764
|
+
if (!diffAttrs) return null;
|
|
37765
|
+
let keys = null;
|
|
37766
|
+
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));
|
|
37767
|
+
return keys;
|
|
37768
|
+
}
|
|
37654
37769
|
createCustomAnimation(animate, CustomAnimateConstructor, from, props, duration, easing, customParams) {
|
|
37655
37770
|
const customAnimate = new CustomAnimateConstructor(from, props, duration, easing, customParams);
|
|
37656
37771
|
animate.play(customAnimate);
|
|
@@ -39682,25 +39797,6 @@
|
|
|
39682
39797
|
}
|
|
39683
39798
|
}
|
|
39684
39799
|
|
|
39685
|
-
function buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs) {
|
|
39686
|
-
var _a;
|
|
39687
|
-
const commitTarget = target,
|
|
39688
|
-
contextFinalAttrs = null === (_a = commitTarget.context) || void 0 === _a ? void 0 : _a.finalAttrs,
|
|
39689
|
-
finalAttribute = commitTarget.getFinalAttribute();
|
|
39690
|
-
let commitAttrs = null;
|
|
39691
|
-
for (let i = 0; i < keys.length; i++) {
|
|
39692
|
-
const key = keys[i];
|
|
39693
|
-
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]));
|
|
39694
|
-
}
|
|
39695
|
-
return commitAttrs;
|
|
39696
|
-
}
|
|
39697
|
-
function commitAnimationStaticAttrs(target, keys, animate, fallbackAttrs) {
|
|
39698
|
-
const commitAttrs = buildAnimationStaticCommitAttrs(target, keys, animate, fallbackAttrs);
|
|
39699
|
-
return !!commitAttrs && (target.setFinalAttributes(commitAttrs), target.setAttributes(commitAttrs, !1, {
|
|
39700
|
-
type: AttributeUpdateType.ANIMATE_END
|
|
39701
|
-
}), !0);
|
|
39702
|
-
}
|
|
39703
|
-
|
|
39704
39800
|
const clipPathGeometryAttrs = {
|
|
39705
39801
|
x: !0,
|
|
39706
39802
|
y: !0,
|
|
@@ -42972,6 +43068,24 @@
|
|
|
42972
43068
|
for (const key in record) Object.prototype.hasOwnProperty.call(record, key) && !includesKey(keys, key) && (nextRecord[key] = record[key]);
|
|
42973
43069
|
return nextRecord;
|
|
42974
43070
|
}
|
|
43071
|
+
function collectActiveSiblingAttrKeys(target, currentAnimate) {
|
|
43072
|
+
var _a;
|
|
43073
|
+
const getTrackedAnimates = null == target ? void 0 : target.getTrackedAnimates;
|
|
43074
|
+
if ("function" == typeof getTrackedAnimates) {
|
|
43075
|
+
const trackedAnimates = getTrackedAnimates.call(target);
|
|
43076
|
+
if (trackedAnimates && trackedAnimates.size <= 1) return;
|
|
43077
|
+
}
|
|
43078
|
+
const forEachTrackedAnimate = null == target ? void 0 : target.forEachTrackedAnimate;
|
|
43079
|
+
if ("function" != typeof forEachTrackedAnimate) return;
|
|
43080
|
+
let keys;
|
|
43081
|
+
const currentEndProps = null === (_a = currentAnimate.getEndProps) || void 0 === _a ? void 0 : _a.call(currentAnimate);
|
|
43082
|
+
return forEachTrackedAnimate.call(target, animate => {
|
|
43083
|
+
var _a;
|
|
43084
|
+
if (animate === currentAnimate || animate.status === AnimateStatus.END) return;
|
|
43085
|
+
const endProps = null === (_a = animate.getEndProps) || void 0 === _a ? void 0 : _a.call(animate);
|
|
43086
|
+
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);
|
|
43087
|
+
}), keys;
|
|
43088
|
+
}
|
|
42975
43089
|
class Animate {
|
|
42976
43090
|
constructor(id = Generator.GenAutoIncrementId(), timeline = defaultTimeline, slience) {
|
|
42977
43091
|
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;
|
|
@@ -42995,7 +43109,7 @@
|
|
|
42995
43109
|
this.target = target;
|
|
42996
43110
|
const trackerTarget = this.target;
|
|
42997
43111
|
return trackerTarget.detachAttributeFromBaseAttributes(), trackerTarget.trackAnimate(this), this.onRemove(() => {
|
|
42998
|
-
this.stop(), this.__skipRestoreStaticAttributeOnRemove || trackerTarget.restoreStaticAttribute(), trackerTarget.untrackAnimate(this.id);
|
|
43112
|
+
this.stop(), this.__skipRestoreStaticAttributeOnRemove || trackerTarget.restoreStaticAttribute(collectActiveSiblingAttrKeys(trackerTarget, this)), trackerTarget.untrackAnimate(this.id);
|
|
42999
43113
|
}), this.target.onAnimateBind && !this.slience && this.target.onAnimateBind(this), this.target.animationAttribute || (this.target.animationAttribute = {}), this;
|
|
43000
43114
|
}
|
|
43001
43115
|
to(props, duration = 300, easing = "linear") {
|
|
@@ -43132,7 +43246,8 @@
|
|
|
43132
43246
|
if (nextTime < this._startTime) return void (this.currentTime = nextTime);
|
|
43133
43247
|
if (nextTime >= this._startTime + this._totalDuration) {
|
|
43134
43248
|
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;
|
|
43135
|
-
|
|
43249
|
+
const trackerTarget = this.target;
|
|
43250
|
+
return trackerTarget.restoreStaticAttribute(collectActiveSiblingAttrKeys(trackerTarget, this)), void (this.__skipRestoreStaticAttributeOnRemove = !0);
|
|
43136
43251
|
}
|
|
43137
43252
|
this.status = AnimateStatus.RUNNING, this.currentTime <= this._startTime && this.onStart(), this.currentTime = nextTime;
|
|
43138
43253
|
let cycleTime = nextTime - this._startTime,
|
|
@@ -43346,10 +43461,10 @@
|
|
|
43346
43461
|
type: AttributeUpdateType.ANIMATE_BIND
|
|
43347
43462
|
});
|
|
43348
43463
|
}
|
|
43349
|
-
restoreStaticAttribute() {
|
|
43464
|
+
restoreStaticAttribute(excludedKeys) {
|
|
43350
43465
|
this._restoreAttributeFromStaticTruth({
|
|
43351
43466
|
type: AttributeUpdateType.ANIMATE_END
|
|
43352
|
-
});
|
|
43467
|
+
}, excludedKeys);
|
|
43353
43468
|
}
|
|
43354
43469
|
executeAnimation(config) {
|
|
43355
43470
|
return this.initAnimateExecutor(), this._animateExecutor.execute(config), this;
|
|
@@ -43481,6 +43596,86 @@
|
|
|
43481
43596
|
return bootstrap.installEnv(app, envParams), installDefaultGraphicsToApp(app), installMathPickersToApp(app), bootstrap.loadEnv(), legacyGraphicRegistrations.forEach(register => register()), syncLegacyRenderersToApp(app), syncLegacyPickersToApp(app, MathPickerContribution), registerDefaultPipeline(), app;
|
|
43482
43597
|
}
|
|
43483
43598
|
|
|
43599
|
+
const SHARED_APP_REGISTRY_KEY = Symbol.for("visactor.vrender.sharedAppRegistry");
|
|
43600
|
+
function getSharedAppRegistry() {
|
|
43601
|
+
var _a;
|
|
43602
|
+
const target = globalThis,
|
|
43603
|
+
registry = null !== (_a = target[SHARED_APP_REGISTRY_KEY]) && void 0 !== _a ? _a : new Map();
|
|
43604
|
+
return target[SHARED_APP_REGISTRY_KEY] = registry, registry;
|
|
43605
|
+
}
|
|
43606
|
+
function getSharedAppEnvRegistry(env, create) {
|
|
43607
|
+
const registry = getSharedAppRegistry(),
|
|
43608
|
+
envRegistry = registry.get(env);
|
|
43609
|
+
if (envRegistry || !create) return envRegistry;
|
|
43610
|
+
const nextEnvRegistry = new Map();
|
|
43611
|
+
return registry.set(env, nextEnvRegistry), nextEnvRegistry;
|
|
43612
|
+
}
|
|
43613
|
+
function getOrCreateSharedAppEnvRegistry(env) {
|
|
43614
|
+
return getSharedAppEnvRegistry(env, !0);
|
|
43615
|
+
}
|
|
43616
|
+
function removeSharedAppRecord(env, key, record) {
|
|
43617
|
+
const registry = getSharedAppRegistry(),
|
|
43618
|
+
envRegistry = registry.get(env);
|
|
43619
|
+
(null == envRegistry ? void 0 : envRegistry.get(key)) === record && (envRegistry.delete(key), envRegistry.size || registry.delete(env));
|
|
43620
|
+
}
|
|
43621
|
+
function releaseSharedAppRecord(env, key, record) {
|
|
43622
|
+
record.released || (record.released = !0, record.refCount = 0, removeSharedAppRecord(env, key, record), record.releaseApp());
|
|
43623
|
+
}
|
|
43624
|
+
function createSharedAppRecord(env, key, options, createApp) {
|
|
43625
|
+
const app = createApp(options),
|
|
43626
|
+
originalRelease = app.release.bind(app),
|
|
43627
|
+
record = {
|
|
43628
|
+
app: app,
|
|
43629
|
+
refCount: 0,
|
|
43630
|
+
released: !1,
|
|
43631
|
+
releaseApp: originalRelease
|
|
43632
|
+
};
|
|
43633
|
+
return app.release = () => releaseSharedAppRecord(env, key, record), record;
|
|
43634
|
+
}
|
|
43635
|
+
function createSharedAppHandle(registryEnv, handleEnv, key, record) {
|
|
43636
|
+
let released = !1;
|
|
43637
|
+
return {
|
|
43638
|
+
app: record.app,
|
|
43639
|
+
env: handleEnv,
|
|
43640
|
+
key: key,
|
|
43641
|
+
release() {
|
|
43642
|
+
if (released) return;
|
|
43643
|
+
released = !0;
|
|
43644
|
+
const envRegistry = getSharedAppEnvRegistry(registryEnv, !1);
|
|
43645
|
+
(null == envRegistry ? void 0 : envRegistry.get(key)) !== record || record.released || (record.refCount -= 1, record.refCount <= 0 && releaseSharedAppRecord(registryEnv, key, record));
|
|
43646
|
+
}
|
|
43647
|
+
};
|
|
43648
|
+
}
|
|
43649
|
+
function acquireSharedApp(registryEnv, options, createApp, handleEnv = registryEnv) {
|
|
43650
|
+
var _a;
|
|
43651
|
+
const key = null !== (_a = options.key) && void 0 !== _a ? _a : "default",
|
|
43652
|
+
envRegistry = getOrCreateSharedAppEnvRegistry(registryEnv);
|
|
43653
|
+
let record = envRegistry.get(key);
|
|
43654
|
+
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);
|
|
43655
|
+
}
|
|
43656
|
+
|
|
43657
|
+
undefined && undefined.__rest || function (s, e) {
|
|
43658
|
+
var t = {};
|
|
43659
|
+
for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
|
|
43660
|
+
if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
|
|
43661
|
+
var i = 0;
|
|
43662
|
+
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]]);
|
|
43663
|
+
}
|
|
43664
|
+
return t;
|
|
43665
|
+
};
|
|
43666
|
+
const installCoreRuntimeContributionModule = installRuntimeContributionModule,
|
|
43667
|
+
pendingRuntimeContributionModules = [];
|
|
43668
|
+
function installPendingRuntimeContributionModulesToApp(app) {
|
|
43669
|
+
pendingRuntimeContributionModules.forEach(({
|
|
43670
|
+
module: module,
|
|
43671
|
+
options: options
|
|
43672
|
+
}) => {
|
|
43673
|
+
installCoreRuntimeContributionModule(module, Object.assign(Object.assign({}, options), {
|
|
43674
|
+
app: app
|
|
43675
|
+
}));
|
|
43676
|
+
});
|
|
43677
|
+
}
|
|
43678
|
+
|
|
43484
43679
|
var __rest$y = undefined && undefined.__rest || function (s, e) {
|
|
43485
43680
|
var t = {};
|
|
43486
43681
|
for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
|
|
@@ -43494,8 +43689,9 @@
|
|
|
43494
43689
|
const {
|
|
43495
43690
|
envParams: envParams
|
|
43496
43691
|
} = options,
|
|
43497
|
-
entryOptions = __rest$y(options, ["envParams"])
|
|
43498
|
-
|
|
43692
|
+
entryOptions = __rest$y(options, ["envParams"]),
|
|
43693
|
+
app = bootstrapVRenderBrowserApp(createBrowserApp(entryOptions), envParams);
|
|
43694
|
+
return installPendingRuntimeContributionModulesToApp(app), app;
|
|
43499
43695
|
}
|
|
43500
43696
|
|
|
43501
43697
|
var __rest$x = undefined && undefined.__rest || function (s, e) {
|
|
@@ -43514,8 +43710,9 @@
|
|
|
43514
43710
|
const {
|
|
43515
43711
|
envParams: envParams
|
|
43516
43712
|
} = options,
|
|
43517
|
-
entryOptions = __rest$x(options, ["envParams"])
|
|
43518
|
-
|
|
43713
|
+
entryOptions = __rest$x(options, ["envParams"]),
|
|
43714
|
+
app = bootstrapVRenderMiniApp(createMiniappApp(entryOptions), env, envParams);
|
|
43715
|
+
return installPendingRuntimeContributionModulesToApp(app), app;
|
|
43519
43716
|
}
|
|
43520
43717
|
function createTaroVRenderApp(options = {}) {
|
|
43521
43718
|
return createMiniEnvVRenderApp("taro", options);
|
|
@@ -43552,66 +43749,9 @@
|
|
|
43552
43749
|
const {
|
|
43553
43750
|
envParams: envParams
|
|
43554
43751
|
} = options,
|
|
43555
|
-
entryOptions = __rest$w(options, ["envParams"])
|
|
43556
|
-
|
|
43557
|
-
|
|
43558
|
-
|
|
43559
|
-
const SHARED_APP_REGISTRY_KEY = Symbol.for("visactor.vrender.sharedAppRegistry");
|
|
43560
|
-
function getSharedAppRegistry() {
|
|
43561
|
-
var _a;
|
|
43562
|
-
const target = globalThis,
|
|
43563
|
-
registry = null !== (_a = target[SHARED_APP_REGISTRY_KEY]) && void 0 !== _a ? _a : new Map();
|
|
43564
|
-
return target[SHARED_APP_REGISTRY_KEY] = registry, registry;
|
|
43565
|
-
}
|
|
43566
|
-
function getSharedAppEnvRegistry(env, create) {
|
|
43567
|
-
const registry = getSharedAppRegistry(),
|
|
43568
|
-
envRegistry = registry.get(env);
|
|
43569
|
-
if (envRegistry || !create) return envRegistry;
|
|
43570
|
-
const nextEnvRegistry = new Map();
|
|
43571
|
-
return registry.set(env, nextEnvRegistry), nextEnvRegistry;
|
|
43572
|
-
}
|
|
43573
|
-
function getOrCreateSharedAppEnvRegistry(env) {
|
|
43574
|
-
return getSharedAppEnvRegistry(env, !0);
|
|
43575
|
-
}
|
|
43576
|
-
function removeSharedAppRecord(env, key, record) {
|
|
43577
|
-
const registry = getSharedAppRegistry(),
|
|
43578
|
-
envRegistry = registry.get(env);
|
|
43579
|
-
(null == envRegistry ? void 0 : envRegistry.get(key)) === record && (envRegistry.delete(key), envRegistry.size || registry.delete(env));
|
|
43580
|
-
}
|
|
43581
|
-
function releaseSharedAppRecord(env, key, record) {
|
|
43582
|
-
record.released || (record.released = !0, record.refCount = 0, removeSharedAppRecord(env, key, record), record.releaseApp());
|
|
43583
|
-
}
|
|
43584
|
-
function createSharedAppRecord(env, key, options, createApp) {
|
|
43585
|
-
const app = createApp(options),
|
|
43586
|
-
originalRelease = app.release.bind(app),
|
|
43587
|
-
record = {
|
|
43588
|
-
app: app,
|
|
43589
|
-
refCount: 0,
|
|
43590
|
-
released: !1,
|
|
43591
|
-
releaseApp: originalRelease
|
|
43592
|
-
};
|
|
43593
|
-
return app.release = () => releaseSharedAppRecord(env, key, record), record;
|
|
43594
|
-
}
|
|
43595
|
-
function createSharedAppHandle(registryEnv, handleEnv, key, record) {
|
|
43596
|
-
let released = !1;
|
|
43597
|
-
return {
|
|
43598
|
-
app: record.app,
|
|
43599
|
-
env: handleEnv,
|
|
43600
|
-
key: key,
|
|
43601
|
-
release() {
|
|
43602
|
-
if (released) return;
|
|
43603
|
-
released = !0;
|
|
43604
|
-
const envRegistry = getSharedAppEnvRegistry(registryEnv, !1);
|
|
43605
|
-
(null == envRegistry ? void 0 : envRegistry.get(key)) !== record || record.released || (record.refCount -= 1, record.refCount <= 0 && releaseSharedAppRecord(registryEnv, key, record));
|
|
43606
|
-
}
|
|
43607
|
-
};
|
|
43608
|
-
}
|
|
43609
|
-
function acquireSharedApp(registryEnv, options, createApp, handleEnv = registryEnv) {
|
|
43610
|
-
var _a;
|
|
43611
|
-
const key = null !== (_a = options.key) && void 0 !== _a ? _a : "default",
|
|
43612
|
-
envRegistry = getOrCreateSharedAppEnvRegistry(registryEnv);
|
|
43613
|
-
let record = envRegistry.get(key);
|
|
43614
|
-
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);
|
|
43752
|
+
entryOptions = __rest$w(options, ["envParams"]),
|
|
43753
|
+
app = bootstrapVRenderNodeApp(createNodeApp(entryOptions), envParams);
|
|
43754
|
+
return installPendingRuntimeContributionModulesToApp(app), app;
|
|
43615
43755
|
}
|
|
43616
43756
|
|
|
43617
43757
|
function createAppForSharedEnv(options) {
|
|
@@ -48604,6 +48744,7 @@
|
|
|
48604
48744
|
return this._beforeRender(option) ? (null === (_a = this._compiler) || void 0 === _a || _a.render(option.morphConfig), this._updateAnimateState(!1), this._afterRender(), self) : self;
|
|
48605
48745
|
}, this._updateSpec = (spec, forceMerge = !1, userUpdateOptions) => {
|
|
48606
48746
|
var _a;
|
|
48747
|
+
if (this._isReleased) return;
|
|
48607
48748
|
this._reSetRenderState();
|
|
48608
48749
|
const lastSpec = this._spec,
|
|
48609
48750
|
result = {
|
|
@@ -48874,9 +49015,10 @@
|
|
|
48874
49015
|
});
|
|
48875
49016
|
}
|
|
48876
49017
|
updateDataSync(id, data, parserOptions, userUpdateOptions) {
|
|
48877
|
-
return this._reSetRenderState(), isNil$1(this._dataSet) ? this : this._chart ? (this._chart.updateData(id, data, !0, parserOptions), (null == userUpdateOptions ? void 0 : userUpdateOptions.reAnimate) && (this.stopAnimation(), this._updateAnimateState(!0)), this._compiler.render(), this) : (this._spec.data = array(this._spec.data), this._updateDataById(id, data, parserOptions), this);
|
|
49018
|
+
return this._isReleased ? this : (this._reSetRenderState(), isNil$1(this._dataSet) ? this : this._chart ? (this._chart.updateData(id, data, !0, parserOptions), (null == userUpdateOptions ? void 0 : userUpdateOptions.reAnimate) && (this.stopAnimation(), this._updateAnimateState(!0)), this._compiler.render(), this) : (this._spec.data = array(this._spec.data), this._updateDataById(id, data, parserOptions), this));
|
|
48878
49019
|
}
|
|
48879
49020
|
updateFullDataSync(data, reRender = !0, userUpdateOptions) {
|
|
49021
|
+
if (this._isReleased) return this;
|
|
48880
49022
|
if (this._reSetRenderState(), this._chart) return this._chart.updateFullData(data), reRender && ((null == userUpdateOptions ? void 0 : userUpdateOptions.reAnimate) && (this.stopAnimation(), this._updateAnimateState(!0)), this._compiler.render()), this;
|
|
48881
49023
|
const prevData = array(this._spec.data);
|
|
48882
49024
|
return array(data).forEach(d => {
|
|
@@ -49370,7 +49512,7 @@
|
|
|
49370
49512
|
}
|
|
49371
49513
|
_reSetRenderState() {
|
|
49372
49514
|
var _a, _b;
|
|
49373
|
-
this._renderState = RenderStateEnum.render, null === (_b = null === (_a = this.getStage()) || void 0 === _a ? void 0 : _a.eventSystem) || void 0 === _b || _b.resumeTriggerEvent();
|
|
49515
|
+
!this._isReleased && this._compiler && (this._renderState = RenderStateEnum.render, null === (_b = null === (_a = this.getStage()) || void 0 === _a ? void 0 : _a.eventSystem) || void 0 === _b || _b.resumeTriggerEvent());
|
|
49374
49516
|
}
|
|
49375
49517
|
};
|
|
49376
49518
|
VChart$1.InstanceManager = InstanceManager, VChart$1.ThemeManager = ThemeManager, VChart$1.globalConfig = {
|
|
@@ -94374,7 +94516,7 @@
|
|
|
94374
94516
|
return sliderHeight >= controllersHeight ? sliderHeight - controllersHeight : 0;
|
|
94375
94517
|
}, this.autoPlayCallback = () => {
|
|
94376
94518
|
var _a;
|
|
94377
|
-
(null === (_a = this._spec) || void 0 === _a ? void 0 : _a.auto) && (this._playerComponent.pause(), this._playerComponent.play());
|
|
94519
|
+
(null === (_a = this._spec) || void 0 === _a ? void 0 : _a.auto) && this._playerComponent && (this._playerComponent.pause(), this._playerComponent.play());
|
|
94378
94520
|
}, this._initEvent = () => {
|
|
94379
94521
|
this._option.disableTriggerEvent || (this._option.globalInstance.off(ChartEvent.rendered, this.autoPlayCallback), this._option.globalInstance.on(ChartEvent.rendered, this.autoPlayCallback), this._playerComponent.addEventListener(PlayerEventEnum.end, () => {
|
|
94380
94522
|
var _a;
|
|
@@ -94526,18 +94668,20 @@
|
|
|
94526
94668
|
return isHorizontal(this._orient) || "start" === this._position ? 0 : "middle" === this._position ? (rect.height - this._height) / 2 : rect.height - this._height;
|
|
94527
94669
|
}
|
|
94528
94670
|
changePlayerIndex(index) {
|
|
94529
|
-
|
|
94530
|
-
|
|
94671
|
+
var _a, _b;
|
|
94672
|
+
const spec = null === (_a = this._specs) || void 0 === _a ? void 0 : _a[index];
|
|
94673
|
+
spec && (null === (_b = this._option) || void 0 === _b ? void 0 : _b.globalInstance) && (this._option.globalInstance.updateFullData(spec.data), this.event.emit(ChartEvent.playerChange, {
|
|
94531
94674
|
model: this,
|
|
94532
94675
|
value: {
|
|
94533
94676
|
spec: spec,
|
|
94534
94677
|
index: index,
|
|
94535
94678
|
specs: this._specs
|
|
94536
94679
|
}
|
|
94537
|
-
});
|
|
94680
|
+
}));
|
|
94538
94681
|
}
|
|
94539
94682
|
release() {
|
|
94540
|
-
|
|
94683
|
+
var _a, _b, _c, _d;
|
|
94684
|
+
null === (_b = null === (_a = this._playerComponent) || void 0 === _a ? void 0 : _a.pause) || void 0 === _b || _b.call(_a), null === (_d = null === (_c = this._option) || void 0 === _c ? void 0 : _c.globalInstance) || void 0 === _d || _d.off(ChartEvent.rendered, this.autoPlayCallback), super.release(), this._playerComponent = null, this._cacheAttrs = null, this._specs = [];
|
|
94541
94685
|
}
|
|
94542
94686
|
};
|
|
94543
94687
|
Player$1.builtInTheme = {
|
|
@@ -100769,7 +100913,7 @@
|
|
|
100769
100913
|
|
|
100770
100914
|
const VChartSimple = createChart('VChartSimple');
|
|
100771
100915
|
|
|
100772
|
-
const version = "2.1.
|
|
100916
|
+
const version = "2.1.1";
|
|
100773
100917
|
|
|
100774
100918
|
exports.Area = Area;
|
|
100775
100919
|
exports.AreaChart = AreaChart;
|