@visactor/vchart-extension 1.13.10-alpha.1 → 1.13.11-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 +25 -5
- package/build/index.min.js +2 -2
- package/package.json +8 -8
package/build/index.js
CHANGED
|
@@ -2956,11 +2956,14 @@
|
|
|
2956
2956
|
const ContributionProvider = Symbol("ContributionProvider");
|
|
2957
2957
|
class ContributionProviderCache {
|
|
2958
2958
|
constructor(serviceIdentifier, container) {
|
|
2959
|
-
this.serviceIdentifier = serviceIdentifier, this.container = container;
|
|
2959
|
+
this.serviceIdentifier = serviceIdentifier, this.container = container, ContributionStore.setStore(this.serviceIdentifier, this);
|
|
2960
2960
|
}
|
|
2961
2961
|
getContributions() {
|
|
2962
2962
|
return this.caches || (this.caches = [], this.container && this.container.isBound(this.serviceIdentifier) && this.caches.push(...this.container.getAll(this.serviceIdentifier))), this.caches;
|
|
2963
2963
|
}
|
|
2964
|
+
refresh() {
|
|
2965
|
+
this.caches && (this.caches.length = 0, this.container && this.container.isBound(this.serviceIdentifier) && this.caches.push(...this.container.getAll(this.serviceIdentifier)));
|
|
2966
|
+
}
|
|
2964
2967
|
}
|
|
2965
2968
|
function bindContributionProvider(bind, id) {
|
|
2966
2969
|
bind(ContributionProvider).toDynamicValue(_ref => {
|
|
@@ -2970,6 +2973,20 @@
|
|
|
2970
2973
|
return new ContributionProviderCache(id, container);
|
|
2971
2974
|
}).inSingletonScope().whenTargetNamed(id);
|
|
2972
2975
|
}
|
|
2976
|
+
class ContributionStore {
|
|
2977
|
+
static getStore(id) {
|
|
2978
|
+
return this.store.get(id);
|
|
2979
|
+
}
|
|
2980
|
+
static setStore(id, cache) {
|
|
2981
|
+
this.store.set(id, cache);
|
|
2982
|
+
}
|
|
2983
|
+
static refreshAllContributions() {
|
|
2984
|
+
this.store.forEach(cache => {
|
|
2985
|
+
cache.refresh();
|
|
2986
|
+
});
|
|
2987
|
+
}
|
|
2988
|
+
}
|
|
2989
|
+
ContributionStore.store = new Map();
|
|
2973
2990
|
|
|
2974
2991
|
class Hook {
|
|
2975
2992
|
constructor(args, name) {
|
|
@@ -9662,6 +9679,9 @@
|
|
|
9662
9679
|
init(contributions) {
|
|
9663
9680
|
contributions && (this._renderContribitions = contributions.getContributions()), this._renderContribitions || (this._renderContribitions = []), this.builtinContributions || (this.builtinContributions = []), this.builtinContributions.push(defaultBaseClipRenderBeforeContribution), this.builtinContributions.push(defaultBaseClipRenderAfterContribution), this.builtinContributions.forEach(item => this._renderContribitions.push(item)), this._renderContribitions.length && (this._renderContribitions.sort((a, b) => b.order - a.order), this._beforeRenderContribitions = this._renderContribitions.filter(c => c.time === BaseRenderContributionTime.beforeFillStroke), this._afterRenderContribitions = this._renderContribitions.filter(c => c.time === BaseRenderContributionTime.afterFillStroke));
|
|
9664
9681
|
}
|
|
9682
|
+
reInit() {
|
|
9683
|
+
this.init(this.graphicRenderContributions);
|
|
9684
|
+
}
|
|
9665
9685
|
beforeRenderStep(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, params) {
|
|
9666
9686
|
this._beforeRenderContribitions && this._beforeRenderContribitions.forEach(c => {
|
|
9667
9687
|
if (c.supportedAppName && graphic.stage && graphic.stage.params && graphic.stage.params.context && graphic.stage.params.context.appName) {
|
|
@@ -10077,8 +10097,8 @@
|
|
|
10077
10097
|
};
|
|
10078
10098
|
};
|
|
10079
10099
|
let DefaultCanvasSymbolRender = class extends BaseRender {
|
|
10080
|
-
constructor(
|
|
10081
|
-
super(), this.
|
|
10100
|
+
constructor(graphicRenderContributions) {
|
|
10101
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = SYMBOL_NUMBER_TYPE, this.builtinContributions = [defaultSymbolRenderContribution, defaultSymbolBackgroundRenderContribution, defaultSymbolTextureRenderContribution, defaultSymbolClipRangeStrokeRenderContribution], this.init(graphicRenderContributions);
|
|
10082
10102
|
}
|
|
10083
10103
|
drawShape(symbol, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
10084
10104
|
var _a;
|
|
@@ -10214,8 +10234,8 @@
|
|
|
10214
10234
|
};
|
|
10215
10235
|
};
|
|
10216
10236
|
let DefaultCanvasPolygonRender = class extends BaseRender {
|
|
10217
|
-
constructor(
|
|
10218
|
-
super(), this.
|
|
10237
|
+
constructor(graphicRenderContributions) {
|
|
10238
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = POLYGON_NUMBER_TYPE, this.builtinContributions = [defaultPolygonBackgroundRenderContribution, defaultPolygonTextureRenderContribution], this.init(graphicRenderContributions);
|
|
10219
10239
|
}
|
|
10220
10240
|
drawShape(polygon, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
10221
10241
|
const polygonAttribute = getTheme(polygon, null == params ? void 0 : params.theme).polygon,
|