@visactor/vchart-extension 1.13.11 → 1.13.13-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
CHANGED
|
@@ -4718,11 +4718,14 @@
|
|
|
4718
4718
|
const ContributionProvider = Symbol("ContributionProvider");
|
|
4719
4719
|
class ContributionProviderCache {
|
|
4720
4720
|
constructor(serviceIdentifier, container) {
|
|
4721
|
-
this.serviceIdentifier = serviceIdentifier, this.container = container;
|
|
4721
|
+
this.serviceIdentifier = serviceIdentifier, this.container = container, ContributionStore.setStore(this.serviceIdentifier, this);
|
|
4722
4722
|
}
|
|
4723
4723
|
getContributions() {
|
|
4724
4724
|
return this.caches || (this.caches = [], this.container && this.container.isBound(this.serviceIdentifier) && this.caches.push(...this.container.getAll(this.serviceIdentifier))), this.caches;
|
|
4725
4725
|
}
|
|
4726
|
+
refresh() {
|
|
4727
|
+
this.caches && (this.caches.length = 0, this.container && this.container.isBound(this.serviceIdentifier) && this.caches.push(...this.container.getAll(this.serviceIdentifier)));
|
|
4728
|
+
}
|
|
4726
4729
|
}
|
|
4727
4730
|
function bindContributionProvider(bind, id) {
|
|
4728
4731
|
bind(ContributionProvider).toDynamicValue(_ref => {
|
|
@@ -4732,6 +4735,20 @@
|
|
|
4732
4735
|
return new ContributionProviderCache(id, container);
|
|
4733
4736
|
}).inSingletonScope().whenTargetNamed(id);
|
|
4734
4737
|
}
|
|
4738
|
+
class ContributionStore {
|
|
4739
|
+
static getStore(id) {
|
|
4740
|
+
return this.store.get(id);
|
|
4741
|
+
}
|
|
4742
|
+
static setStore(id, cache) {
|
|
4743
|
+
this.store.set(id, cache);
|
|
4744
|
+
}
|
|
4745
|
+
static refreshAllContributions() {
|
|
4746
|
+
this.store.forEach(cache => {
|
|
4747
|
+
cache.refresh();
|
|
4748
|
+
});
|
|
4749
|
+
}
|
|
4750
|
+
}
|
|
4751
|
+
ContributionStore.store = new Map();
|
|
4735
4752
|
|
|
4736
4753
|
class Hook {
|
|
4737
4754
|
constructor(args, name) {
|
|
@@ -11424,6 +11441,9 @@
|
|
|
11424
11441
|
init(contributions) {
|
|
11425
11442
|
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));
|
|
11426
11443
|
}
|
|
11444
|
+
reInit() {
|
|
11445
|
+
this.init(this.graphicRenderContributions);
|
|
11446
|
+
}
|
|
11427
11447
|
beforeRenderStep(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, params) {
|
|
11428
11448
|
this._beforeRenderContribitions && this._beforeRenderContribitions.forEach(c => {
|
|
11429
11449
|
if (c.supportedAppName && graphic.stage && graphic.stage.params && graphic.stage.params.context && graphic.stage.params.context.appName) {
|
|
@@ -11839,8 +11859,8 @@
|
|
|
11839
11859
|
};
|
|
11840
11860
|
};
|
|
11841
11861
|
let DefaultCanvasSymbolRender = class extends BaseRender {
|
|
11842
|
-
constructor(
|
|
11843
|
-
super(), this.
|
|
11862
|
+
constructor(graphicRenderContributions) {
|
|
11863
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = SYMBOL_NUMBER_TYPE, this.builtinContributions = [defaultSymbolRenderContribution, defaultSymbolBackgroundRenderContribution, defaultSymbolTextureRenderContribution, defaultSymbolClipRangeStrokeRenderContribution], this.init(graphicRenderContributions);
|
|
11844
11864
|
}
|
|
11845
11865
|
drawShape(symbol, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
11846
11866
|
var _a;
|
|
@@ -11976,8 +11996,8 @@
|
|
|
11976
11996
|
};
|
|
11977
11997
|
};
|
|
11978
11998
|
let DefaultCanvasPolygonRender = class extends BaseRender {
|
|
11979
|
-
constructor(
|
|
11980
|
-
super(), this.
|
|
11999
|
+
constructor(graphicRenderContributions) {
|
|
12000
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = POLYGON_NUMBER_TYPE, this.builtinContributions = [defaultPolygonBackgroundRenderContribution, defaultPolygonTextureRenderContribution], this.init(graphicRenderContributions);
|
|
11981
12001
|
}
|
|
11982
12002
|
drawShape(polygon, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
11983
12003
|
const polygonAttribute = getTheme(polygon, null == params ? void 0 : params.theme).polygon,
|
|
@@ -12160,6 +12180,18 @@
|
|
|
12160
12180
|
const changeEvent = new CustomEvent(eventName, details);
|
|
12161
12181
|
changeEvent.manager = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.eventSystem.manager, this.dispatchEvent(changeEvent);
|
|
12162
12182
|
}
|
|
12183
|
+
eventPosToStagePos(e) {
|
|
12184
|
+
var _a, _b;
|
|
12185
|
+
const result = {
|
|
12186
|
+
x: 0,
|
|
12187
|
+
y: 0
|
|
12188
|
+
},
|
|
12189
|
+
stagePoints = null !== (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.eventPointTransform(e)) && void 0 !== _b ? _b : {
|
|
12190
|
+
x: 0,
|
|
12191
|
+
y: 0
|
|
12192
|
+
};
|
|
12193
|
+
return this.globalTransMatrix.transformPoint(stagePoints, result), result;
|
|
12194
|
+
}
|
|
12163
12195
|
}
|
|
12164
12196
|
|
|
12165
12197
|
const MathPickerContribution = Symbol.for("MathPickerContribution");
|