@visactor/vrender 1.0.0-alpha.6 → 1.0.0-alpha.7
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/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.es.js +56 -35
- package/dist/index.js +56 -35
- package/dist/index.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +7 -7
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
21
21
|
|
|
22
22
|
const vrender_core_1 = require("@visactor/vrender-core"), vrender_kits_1 = require("@visactor/vrender-kits"), vrender_kits_2 = require("@visactor/vrender-kits");
|
|
23
23
|
|
|
24
|
-
exports.version = "1.0.0-alpha.
|
|
24
|
+
exports.version = "1.0.0-alpha.7", (0, vrender_core_1.preLoadAllModule)(), (0, vrender_core_1.isBrowserEnv)() ? (0,
|
|
25
25
|
vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0, vrender_core_1.isNodeEnv)() && (0,
|
|
26
26
|
vrender_kits_1.loadNodeEnv)(vrender_core_1.container), (0, vrender_kits_2.registerArc)(),
|
|
27
27
|
(0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(), (0, vrender_kits_2.registerCircle)(),
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAmF;AACnF,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,eAAe,CAAC;AAEvC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,2BAAY,GAAE,CAAC;AAEf,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,4CAA6B,GAAE,CAAC;AAChC,IAAA,0CAA2B,GAAE,CAAC;AAC9B,IAAA,2CAA4B,GAAE,CAAC;AAC/B,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,kCAAmB,GAAE,CAAC;AACtB,yDAAuC;AACvC,yDAAuC;AACvC,4DAA0C","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport {\n container,\n isBrowserEnv,\n isNodeEnv,\n preLoadAllModule,\n registerFlexLayoutPlugin,\n registerViewTransform3dPlugin,\n registerHtmlAttributePlugin,\n registerReactAttributePlugin,\n registerDirectionalLight,\n registerOrthoCamera\n} from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv, registerStar } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"1.0.0-alpha.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAmF;AACnF,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,eAAe,CAAC;AAEvC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,2BAAY,GAAE,CAAC;AAEf,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,4CAA6B,GAAE,CAAC;AAChC,IAAA,0CAA2B,GAAE,CAAC;AAC9B,IAAA,2CAA4B,GAAE,CAAC;AAC/B,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,kCAAmB,GAAE,CAAC;AACtB,yDAAuC;AACvC,yDAAuC;AACvC,4DAA0C","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport {\n container,\n isBrowserEnv,\n isNodeEnv,\n preLoadAllModule,\n registerFlexLayoutPlugin,\n registerViewTransform3dPlugin,\n registerHtmlAttributePlugin,\n registerReactAttributePlugin,\n registerDirectionalLight,\n registerOrthoCamera\n} from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv, registerStar } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"1.0.0-alpha.7\";\n\npreLoadAllModule();\n\nif (isBrowserEnv()) {\n loadBrowserEnv(container);\n} else if (isNodeEnv()) {\n loadNodeEnv(container);\n}\nregisterArc();\nregisterArc3d();\nregisterArea();\nregisterCircle();\nregisterGlyph();\nregisterGroup();\nregisterImage();\nregisterLine();\nregisterPath();\nregisterPolygon();\nregisterPyramid3d();\nregisterRect();\nregisterRect3d();\nregisterRichtext();\nregisterShadowRoot();\nregisterSymbol();\nregisterText();\nregisterWrapText();\nregisterStar();\n\nregisterFlexLayoutPlugin();\nregisterViewTransform3dPlugin();\nregisterHtmlAttributePlugin();\nregisterReactAttributePlugin();\nregisterDirectionalLight();\nregisterOrthoCamera();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\nexport * from '@visactor/vrender-animate';\n"]}
|
package/dist/index.es.js
CHANGED
|
@@ -9157,12 +9157,13 @@ class Graphic extends Node {
|
|
|
9157
9157
|
this._emitCustomEvent("animate-bind", animate);
|
|
9158
9158
|
}
|
|
9159
9159
|
tryUpdateAABBBounds() {
|
|
9160
|
+
var _a, _b;
|
|
9160
9161
|
const full = "imprecise" === this.attribute.boundsMode;
|
|
9161
9162
|
if (!this.shouldUpdateAABBBounds()) return this._AABBBounds;
|
|
9162
9163
|
if (!this.valid) return this._AABBBounds.clear(), this._AABBBounds;
|
|
9163
|
-
|
|
9164
|
+
null === (_a = this.stage) || void 0 === _a || _a.graphicService.beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
|
|
9164
9165
|
const bounds = this.doUpdateAABBBounds(full);
|
|
9165
|
-
return
|
|
9166
|
+
return null === (_b = this.stage) || void 0 === _b || _b.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, !0), "empty" === this.attribute.boundsMode && bounds.clear(), bounds;
|
|
9166
9167
|
}
|
|
9167
9168
|
tryUpdateOBBBounds() {
|
|
9168
9169
|
if (this._OBBBounds || (this._OBBBounds = new OBBBounds()), this.tryUpdateAABBBounds(), this.updateOBBBoundsStamp === this.updateAABBBoundsStamp) return this._OBBBounds;
|
|
@@ -9450,7 +9451,8 @@ class Graphic extends Node {
|
|
|
9450
9451
|
return this;
|
|
9451
9452
|
}
|
|
9452
9453
|
onAttributeUpdate(context) {
|
|
9453
|
-
|
|
9454
|
+
var _a;
|
|
9455
|
+
context && context.skipUpdateCallback || (null === (_a = this.stage) || void 0 === _a || _a.graphicService.onAttributeUpdate(this), this._emitCustomEvent("afterAttributeUpdate", context));
|
|
9454
9456
|
}
|
|
9455
9457
|
update(d) {
|
|
9456
9458
|
d ? (d.bounds && this.tryUpdateAABBBounds(), d.trans && this.tryUpdateLocalTransMatrix()) : (this.tryUpdateAABBBounds(), this.tryUpdateLocalTransMatrix());
|
|
@@ -9637,6 +9639,7 @@ class Graphic extends Node {
|
|
|
9637
9639
|
}
|
|
9638
9640
|
}
|
|
9639
9641
|
setStage(stage, layer) {
|
|
9642
|
+
var _a;
|
|
9640
9643
|
if (this.stage !== stage) {
|
|
9641
9644
|
if (this.stage = stage, this.layer = layer, this.setStageToShadowRoot(stage, layer), this.animates && this.animates.size) {
|
|
9642
9645
|
const timeline = stage.getTimeline();
|
|
@@ -9644,7 +9647,7 @@ class Graphic extends Node {
|
|
|
9644
9647
|
a.timeline.isGlobal && (a.setTimeline(timeline), timeline.addAnimate(a));
|
|
9645
9648
|
});
|
|
9646
9649
|
}
|
|
9647
|
-
this._onSetStage && this._onSetStage(this, stage, layer),
|
|
9650
|
+
this._onSetStage && this._onSetStage(this, stage, layer), null === (_a = this.stage) || void 0 === _a || _a.graphicService.onSetStage(this, stage);
|
|
9648
9651
|
}
|
|
9649
9652
|
}
|
|
9650
9653
|
setStageToShadowRoot(stage, layer) {
|
|
@@ -9792,11 +9795,12 @@ class Group extends Graphic {
|
|
|
9792
9795
|
return !!super.shouldUpdateAABBBounds() || !!(this._childUpdateTag & UpdateTag.UPDATE_BOUNDS);
|
|
9793
9796
|
}
|
|
9794
9797
|
tryUpdateAABBBounds() {
|
|
9798
|
+
var _a, _b;
|
|
9795
9799
|
if (!this.shouldUpdateAABBBounds()) return this._AABBBounds;
|
|
9796
|
-
|
|
9800
|
+
null === (_a = this.stage) || void 0 === _a || _a.graphicService.beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
|
|
9797
9801
|
const selfChange = this.shouldSelfChangeUpdateAABBBounds(),
|
|
9798
9802
|
bounds = this.doUpdateAABBBounds();
|
|
9799
|
-
return this.addUpdateLayoutTag(),
|
|
9803
|
+
return this.addUpdateLayoutTag(), null === (_b = this.stage) || void 0 === _b || _b.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, selfChange), "empty" === this.attribute.boundsMode && bounds.clear(), bounds;
|
|
9800
9804
|
}
|
|
9801
9805
|
doUpdateLocalMatrix() {
|
|
9802
9806
|
const {
|
|
@@ -9856,11 +9860,13 @@ class Group extends Graphic {
|
|
|
9856
9860
|
return this.theme.getTheme(this);
|
|
9857
9861
|
}
|
|
9858
9862
|
incrementalAppendChild(node) {
|
|
9863
|
+
var _a;
|
|
9859
9864
|
const data = super.appendChild(node);
|
|
9860
|
-
return this.stage && data && (data.stage = this.stage, data.layer = this.layer), this.addUpdateBoundTag(),
|
|
9865
|
+
return this.stage && data && (data.stage = this.stage, data.layer = this.layer), this.addUpdateBoundTag(), null === (_a = this.stage) || void 0 === _a || _a.graphicService.onAddIncremental(node, this, this.stage), data;
|
|
9861
9866
|
}
|
|
9862
9867
|
incrementalClearChild() {
|
|
9863
|
-
|
|
9868
|
+
var _a;
|
|
9869
|
+
super.removeAllChild(), this.addUpdateBoundTag(), null === (_a = this.stage) || void 0 === _a || _a.graphicService.onClearIncremental(this, this.stage);
|
|
9864
9870
|
}
|
|
9865
9871
|
_updateChildToStage(child) {
|
|
9866
9872
|
return this.stage && child && child.setStage(this.stage, this.layer), this.addUpdateBoundTag(), child;
|
|
@@ -9880,17 +9886,20 @@ class Group extends Graphic {
|
|
|
9880
9886
|
return this._updateChildToStage(super.insertInto(newNode, idx));
|
|
9881
9887
|
}
|
|
9882
9888
|
removeChild(child) {
|
|
9889
|
+
var _a;
|
|
9883
9890
|
const data = super.removeChild(child);
|
|
9884
|
-
return child.stage = null,
|
|
9891
|
+
return child.stage = null, null === (_a = this.stage) || void 0 === _a || _a.graphicService.onRemove(child), this.addUpdateBoundTag(), data;
|
|
9885
9892
|
}
|
|
9886
9893
|
removeAllChild() {
|
|
9887
9894
|
let deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
9888
9895
|
this.forEachChildren(child => {
|
|
9889
|
-
|
|
9896
|
+
var _a;
|
|
9897
|
+
null === (_a = this.stage) || void 0 === _a || _a.graphicService.onRemove(child), deep && child.isContainer && child.removeAllChild(deep);
|
|
9890
9898
|
}), super.removeAllChild(), this.addUpdateBoundTag();
|
|
9891
9899
|
}
|
|
9892
9900
|
setStage(stage, layer) {
|
|
9893
|
-
|
|
9901
|
+
var _a;
|
|
9902
|
+
this.stage !== stage && (this.stage = stage, this.layer = layer, this.setStageToShadowRoot(stage, layer), this._onSetStage && this._onSetStage(this, stage, layer), null === (_a = this.stage) || void 0 === _a || _a.graphicService.onSetStage(this, stage), this.forEachChildren(item => {
|
|
9894
9903
|
item.setStage(stage, this.layer);
|
|
9895
9904
|
}));
|
|
9896
9905
|
}
|
|
@@ -16338,7 +16347,7 @@ var pickModule = new ContainerModule((bind, unbind, isBound) => {
|
|
|
16338
16347
|
});
|
|
16339
16348
|
|
|
16340
16349
|
var graphicModule = new ContainerModule(bind => {
|
|
16341
|
-
bind(GraphicService).to(DefaultGraphicService)
|
|
16350
|
+
bind(GraphicService).to(DefaultGraphicService), bind(GraphicCreator$1).toConstantValue(graphicCreator);
|
|
16342
16351
|
});
|
|
16343
16352
|
|
|
16344
16353
|
const AutoEnablePlugins = Symbol.for("AutoEnablePlugins");
|
|
@@ -17092,11 +17101,14 @@ class AutoRenderPlugin {
|
|
|
17092
17101
|
};
|
|
17093
17102
|
}
|
|
17094
17103
|
activate(context) {
|
|
17095
|
-
this.pluginService = context
|
|
17104
|
+
this.pluginService = context;
|
|
17105
|
+
const stage = this.pluginService.stage;
|
|
17106
|
+
stage && (stage.graphicService.hooks.onAttributeUpdate.tap(this.key, this.handleChange), stage.graphicService.hooks.onSetStage.tap(this.key, this.handleChange), stage.graphicService.hooks.onRemove.tap(this.key, this.handleChange));
|
|
17096
17107
|
}
|
|
17097
17108
|
deactivate(context) {
|
|
17098
|
-
const filterByName = taps => taps.filter(item => item.name !== this.key)
|
|
17099
|
-
|
|
17109
|
+
const filterByName = taps => taps.filter(item => item.name !== this.key),
|
|
17110
|
+
stage = this.pluginService.stage;
|
|
17111
|
+
stage && (stage.graphicService.hooks.onAttributeUpdate.taps = filterByName(stage.graphicService.hooks.onAttributeUpdate.taps), stage.graphicService.hooks.onSetStage.taps = filterByName(stage.graphicService.hooks.onSetStage.taps), stage.graphicService.hooks.onRemove.taps = filterByName(stage.graphicService.hooks.onRemove.taps));
|
|
17100
17112
|
}
|
|
17101
17113
|
}
|
|
17102
17114
|
|
|
@@ -17147,14 +17159,17 @@ class IncrementalAutoRenderPlugin {
|
|
|
17147
17159
|
this.name = "IncrementalAutoRenderPlugin", this.activeEvent = "onRegister", this.nextFrameRenderGroupSet = new Set(), this.willNextFrameRender = !1, this.nextUserParams = {}, this._uid = Generator.GenAutoIncrementId(), this.key = this.name + this._uid;
|
|
17148
17160
|
}
|
|
17149
17161
|
activate(context) {
|
|
17150
|
-
this.pluginService = context
|
|
17162
|
+
this.pluginService = context;
|
|
17163
|
+
const stage = this.pluginService.stage;
|
|
17164
|
+
stage && (stage.graphicService.hooks.onAddIncremental.tap(this.key, (graphic, group, stage) => {
|
|
17151
17165
|
graphic.glyphHost && (graphic = graphic.glyphHost), graphic.stage === context.stage && null != graphic.stage && (this.nextUserParams.startAtId = group._uid, this.renderNextFrame(group));
|
|
17152
|
-
}),
|
|
17166
|
+
}), stage.graphicService.hooks.onClearIncremental.tap(this.key, (group, stage) => {
|
|
17153
17167
|
group.stage === context.stage && null != group.stage && (this.nextUserParams.startAtId = group._uid, this.nextUserParams.restartIncremental = !0, this.renderNextFrame(group));
|
|
17154
|
-
});
|
|
17168
|
+
}));
|
|
17155
17169
|
}
|
|
17156
17170
|
deactivate(context) {
|
|
17157
|
-
|
|
17171
|
+
const stage = this.pluginService.stage;
|
|
17172
|
+
stage && (stage.graphicService.hooks.onAddIncremental.taps = stage.graphicService.hooks.onAddIncremental.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.onClearIncremental.taps = stage.graphicService.hooks.onClearIncremental.taps.filter(item => item.name !== this.key));
|
|
17158
17173
|
}
|
|
17159
17174
|
renderNextFrame(group) {
|
|
17160
17175
|
this.nextFrameRenderGroupSet.add(group), this.willNextFrameRender || (this.willNextFrameRender = !0, application.global.getRequestAnimationFrame()(() => {
|
|
@@ -17190,19 +17205,22 @@ class DirtyBoundsPlugin {
|
|
|
17190
17205
|
activate(context) {
|
|
17191
17206
|
this.pluginService = context, context.stage.hooks.afterRender.tap(this.key, stage => {
|
|
17192
17207
|
stage && stage === this.pluginService.stage && stage.dirtyBounds.clear();
|
|
17193
|
-
})
|
|
17208
|
+
});
|
|
17209
|
+
const stage = this.pluginService.stage;
|
|
17210
|
+
stage && (stage.graphicService.hooks.beforeUpdateAABBBounds.tap(this.key, (graphic, stage, willUpdate, bounds) => {
|
|
17194
17211
|
graphic.glyphHost && (graphic = graphic.glyphHost), stage && stage === this.pluginService.stage && stage.renderCount && (graphic.isContainer && !graphic.shouldSelfChangeUpdateAABBBounds() || willUpdate && (globalBounds.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2), stage.dirty(globalBounds, graphic.parent && graphic.parent.globalTransMatrix)));
|
|
17195
|
-
}),
|
|
17212
|
+
}), stage.graphicService.hooks.afterUpdateAABBBounds.tap(this.key, (graphic, stage, bounds, params, selfChange) => {
|
|
17196
17213
|
stage && stage === this.pluginService.stage && stage.renderCount && (graphic.isContainer && !selfChange || stage.dirty(params.globalAABBBounds));
|
|
17197
|
-
}),
|
|
17214
|
+
}), stage.graphicService.hooks.clearAABBBounds.tap(this.key, (graphic, stage, bounds) => {
|
|
17198
17215
|
stage && stage === this.pluginService.stage && stage.renderCount && stage && stage.dirty(bounds);
|
|
17199
|
-
}),
|
|
17216
|
+
}), stage.graphicService.hooks.onRemove.tap(this.key, graphic => {
|
|
17200
17217
|
const stage = graphic.stage;
|
|
17201
17218
|
stage && stage === this.pluginService.stage && stage.renderCount && stage && stage.dirty(graphic.globalAABBBounds);
|
|
17202
|
-
});
|
|
17219
|
+
}));
|
|
17203
17220
|
}
|
|
17204
17221
|
deactivate(context) {
|
|
17205
|
-
|
|
17222
|
+
const stage = this.pluginService.stage;
|
|
17223
|
+
stage && (stage.graphicService.hooks.beforeUpdateAABBBounds.taps = stage.graphicService.hooks.beforeUpdateAABBBounds.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.afterUpdateAABBBounds.taps = stage.graphicService.hooks.afterUpdateAABBBounds.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.clearAABBBounds.taps = stage.graphicService.hooks.clearAABBBounds.taps.filter(item => item.name !== this.key), stage.hooks.afterRender.taps = stage.hooks.afterRender.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.onRemove.taps = stage.graphicService.hooks.onRemove.taps.filter(item => item.name !== this.key));
|
|
17206
17224
|
}
|
|
17207
17225
|
}
|
|
17208
17226
|
|
|
@@ -17337,7 +17355,7 @@ class Stage extends Group {
|
|
|
17337
17355
|
}, this.params = params, this.theme = new Theme(), this.hooks = {
|
|
17338
17356
|
beforeRender: new SyncHook(["stage"]),
|
|
17339
17357
|
afterRender: new SyncHook(["stage"])
|
|
17340
|
-
}, this.global = application.global, !this.global.env && isBrowserEnv() && this.global.setEnv("browser"), this.window = container.get(VWindow), this.renderService = container.get(RenderService), this.pluginService = container.get(PluginService), this.layerService = container.get(LayerService), this.pluginService.active(this, params), this.window.create({
|
|
17358
|
+
}, this.global = application.global, !this.global.env && isBrowserEnv() && this.global.setEnv("browser"), this.window = container.get(VWindow), this.renderService = container.get(RenderService), this.pluginService = container.get(PluginService), this.layerService = container.get(LayerService), this.graphicService = container.get(GraphicService), this.pluginService.active(this, params), this.window.create({
|
|
17341
17359
|
width: params.width,
|
|
17342
17360
|
height: params.height,
|
|
17343
17361
|
viewBox: params.viewBox,
|
|
@@ -17349,7 +17367,7 @@ class Stage extends Group {
|
|
|
17349
17367
|
}), this.state = "normal", this.renderCount = 0, this.tryInitEventSystem(), this._background = null !== (_a = params.background) && void 0 !== _a ? _a : DefaultConfig.BACKGROUND, this.appendChild(this.layerService.createLayer(this, {
|
|
17350
17368
|
main: !0
|
|
17351
17369
|
})), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
|
|
17352
|
-
tickRenderMode: "
|
|
17370
|
+
tickRenderMode: "effect"
|
|
17353
17371
|
}), this.optmize(params.optimize), params.background && isString$1(this._background) && this._background.includes("/") && this.setAttributes({
|
|
17354
17372
|
background: this._background
|
|
17355
17373
|
}), this.initAnimate(params), this.rafId = null !== (_b = params.rafId) && void 0 !== _b ? _b : Math.floor(6 * Math.random());
|
|
@@ -20459,7 +20477,7 @@ class HtmlAttributePlugin {
|
|
|
20459
20477
|
});
|
|
20460
20478
|
}
|
|
20461
20479
|
deactivate(context) {
|
|
20462
|
-
context.stage.hooks.afterRender.taps = context.stage.hooks.afterRender.taps.filter(item => item.name !== this.key),
|
|
20480
|
+
context.stage.hooks.afterRender.taps = context.stage.hooks.afterRender.taps.filter(item => item.name !== this.key), this.release();
|
|
20463
20481
|
}
|
|
20464
20482
|
getWrapContainer(stage, userContainer, domParams) {
|
|
20465
20483
|
let nativeContainer;
|
|
@@ -20978,18 +20996,21 @@ class FlexLayoutPlugin {
|
|
|
20978
20996
|
}
|
|
20979
20997
|
}
|
|
20980
20998
|
activate(context) {
|
|
20981
|
-
this.pluginService = context
|
|
20999
|
+
this.pluginService = context;
|
|
21000
|
+
const stage = this.pluginService.stage;
|
|
21001
|
+
stage && (stage.graphicService.hooks.onAttributeUpdate.tap(this.key, graphic => {
|
|
20982
21002
|
graphic.glyphHost && (graphic = graphic.glyphHost), graphic.stage && graphic.stage === this.pluginService.stage && this.tryLayout(graphic, !1);
|
|
20983
|
-
}),
|
|
21003
|
+
}), stage.graphicService.hooks.beforeUpdateAABBBounds.tap(this.key, (graphic, stage, willUpdate, bounds) => {
|
|
20984
21004
|
graphic.glyphHost && (graphic = graphic.glyphHost), stage && stage === this.pluginService.stage && graphic.isContainer && !this.skipBoundsTrigger && _tempBounds.copy(bounds);
|
|
20985
|
-
}),
|
|
21005
|
+
}), stage.graphicService.hooks.afterUpdateAABBBounds.tap(this.key, (graphic, stage, bounds, params, selfChange) => {
|
|
20986
21006
|
stage && stage === this.pluginService.stage && graphic.isContainer && !this.skipBoundsTrigger && (_tempBounds.equals(bounds) || this.tryLayout(graphic, !1));
|
|
20987
|
-
}),
|
|
21007
|
+
}), stage.graphicService.hooks.onSetStage.tap(this.key, graphic => {
|
|
20988
21008
|
graphic.glyphHost && (graphic = graphic.glyphHost), this.tryLayout(graphic, !1);
|
|
20989
|
-
});
|
|
21009
|
+
}));
|
|
20990
21010
|
}
|
|
20991
21011
|
deactivate(context) {
|
|
20992
|
-
|
|
21012
|
+
const stage = this.pluginService.stage;
|
|
21013
|
+
stage && (stage.graphicService.hooks.onAttributeUpdate.taps = stage.graphicService.hooks.onAttributeUpdate.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.beforeUpdateAABBBounds.taps = stage.graphicService.hooks.beforeUpdateAABBBounds.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.afterUpdateAABBBounds.taps = stage.graphicService.hooks.afterUpdateAABBBounds.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.onSetStage.taps = stage.graphicService.hooks.onSetStage.taps.filter(item => item.name !== this.key));
|
|
20993
21014
|
}
|
|
20994
21015
|
}
|
|
20995
21016
|
function getPadding(graphic, field) {
|
|
@@ -35182,7 +35203,7 @@ const registerCustomAnimate = () => {
|
|
|
35182
35203
|
AnimateExecutor.registerBuiltInAnimate("increaseCount", IncreaseCount), AnimateExecutor.registerBuiltInAnimate("fromTo", FromTo), AnimateExecutor.registerBuiltInAnimate("scaleIn", ScaleIn), AnimateExecutor.registerBuiltInAnimate("scaleOut", ScaleOut), AnimateExecutor.registerBuiltInAnimate("growHeightIn", GrowHeightIn), AnimateExecutor.registerBuiltInAnimate("growHeightOut", GrowHeightOut), AnimateExecutor.registerBuiltInAnimate("growWidthIn", GrowWidthIn), AnimateExecutor.registerBuiltInAnimate("growWidthOut", GrowWidthOut), AnimateExecutor.registerBuiltInAnimate("growCenterIn", GrowCenterIn), AnimateExecutor.registerBuiltInAnimate("growCenterOut", GrowCenterOut), AnimateExecutor.registerBuiltInAnimate("clipIn", ClipIn), AnimateExecutor.registerBuiltInAnimate("clipOut", ClipOut), AnimateExecutor.registerBuiltInAnimate("fadeIn", FadeIn), AnimateExecutor.registerBuiltInAnimate("fadeOut", FadeOut), AnimateExecutor.registerBuiltInAnimate("growPointsIn", GrowPointsIn), AnimateExecutor.registerBuiltInAnimate("growPointsOut", GrowPointsOut), AnimateExecutor.registerBuiltInAnimate("growPointsXIn", GrowPointsXIn), AnimateExecutor.registerBuiltInAnimate("growPointsXOut", GrowPointsXOut), AnimateExecutor.registerBuiltInAnimate("growPointsYIn", GrowPointsYIn), AnimateExecutor.registerBuiltInAnimate("growPointsYOut", GrowPointsYOut), AnimateExecutor.registerBuiltInAnimate("growAngleIn", GrowAngleIn), AnimateExecutor.registerBuiltInAnimate("growAngleOut", GrowAngleOut), AnimateExecutor.registerBuiltInAnimate("growRadiusIn", GrowRadiusIn), AnimateExecutor.registerBuiltInAnimate("growRadiusOut", GrowRadiusOut), AnimateExecutor.registerBuiltInAnimate("moveIn", MoveIn), AnimateExecutor.registerBuiltInAnimate("moveOut", MoveOut), AnimateExecutor.registerBuiltInAnimate("rotateIn", RotateIn), AnimateExecutor.registerBuiltInAnimate("rotateOut", RotateOut), AnimateExecutor.registerBuiltInAnimate("update", Update), AnimateExecutor.registerBuiltInAnimate("state", State), AnimateExecutor.registerBuiltInAnimate("labelItemAppear", LabelItemAppear), AnimateExecutor.registerBuiltInAnimate("labelItemDisappear", LabelItemDisappear), AnimateExecutor.registerBuiltInAnimate("poptipAppear", PoptipAppear), AnimateExecutor.registerBuiltInAnimate("poptipDisappear", PoptipDisappear), AnimateExecutor.registerBuiltInAnimate("inputText", InputText), AnimateExecutor.registerBuiltInAnimate("inputRichText", InputRichText), AnimateExecutor.registerBuiltInAnimate("outputRichText", OutputRichText), AnimateExecutor.registerBuiltInAnimate("slideRichText", SlideRichText), AnimateExecutor.registerBuiltInAnimate("slideOutRichText", SlideOutRichText), AnimateExecutor.registerBuiltInAnimate("slideIn", SlideIn), AnimateExecutor.registerBuiltInAnimate("growIn", GrowIn), AnimateExecutor.registerBuiltInAnimate("spinIn", SpinIn), AnimateExecutor.registerBuiltInAnimate("moveScaleIn", MoveScaleIn), AnimateExecutor.registerBuiltInAnimate("moveRotateIn", MoveRotateIn), AnimateExecutor.registerBuiltInAnimate("strokeIn", StrokeIn), AnimateExecutor.registerBuiltInAnimate("slideOut", SlideOut), AnimateExecutor.registerBuiltInAnimate("growOut", GrowOut), AnimateExecutor.registerBuiltInAnimate("spinOut", SpinOut), AnimateExecutor.registerBuiltInAnimate("moveScaleOut", MoveScaleOut), AnimateExecutor.registerBuiltInAnimate("moveRotateOut", MoveRotateOut), AnimateExecutor.registerBuiltInAnimate("strokeOut", StrokeOut), AnimateExecutor.registerBuiltInAnimate("pulse", PulseAnimate), AnimateExecutor.registerBuiltInAnimate("MotionPath", MotionPath), AnimateExecutor.registerBuiltInAnimate("streamLight", StreamLight);
|
|
35183
35204
|
};
|
|
35184
35205
|
|
|
35185
|
-
const version = "1.0.0-alpha.
|
|
35206
|
+
const version = "1.0.0-alpha.7";
|
|
35186
35207
|
preLoadAllModule();
|
|
35187
35208
|
if (isBrowserEnv()) {
|
|
35188
35209
|
loadBrowserEnv(container);
|
package/dist/index.js
CHANGED
|
@@ -9163,12 +9163,13 @@
|
|
|
9163
9163
|
this._emitCustomEvent("animate-bind", animate);
|
|
9164
9164
|
}
|
|
9165
9165
|
tryUpdateAABBBounds() {
|
|
9166
|
+
var _a, _b;
|
|
9166
9167
|
const full = "imprecise" === this.attribute.boundsMode;
|
|
9167
9168
|
if (!this.shouldUpdateAABBBounds()) return this._AABBBounds;
|
|
9168
9169
|
if (!this.valid) return this._AABBBounds.clear(), this._AABBBounds;
|
|
9169
|
-
|
|
9170
|
+
null === (_a = this.stage) || void 0 === _a || _a.graphicService.beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
|
|
9170
9171
|
const bounds = this.doUpdateAABBBounds(full);
|
|
9171
|
-
return
|
|
9172
|
+
return null === (_b = this.stage) || void 0 === _b || _b.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, !0), "empty" === this.attribute.boundsMode && bounds.clear(), bounds;
|
|
9172
9173
|
}
|
|
9173
9174
|
tryUpdateOBBBounds() {
|
|
9174
9175
|
if (this._OBBBounds || (this._OBBBounds = new OBBBounds()), this.tryUpdateAABBBounds(), this.updateOBBBoundsStamp === this.updateAABBBoundsStamp) return this._OBBBounds;
|
|
@@ -9456,7 +9457,8 @@
|
|
|
9456
9457
|
return this;
|
|
9457
9458
|
}
|
|
9458
9459
|
onAttributeUpdate(context) {
|
|
9459
|
-
|
|
9460
|
+
var _a;
|
|
9461
|
+
context && context.skipUpdateCallback || (null === (_a = this.stage) || void 0 === _a || _a.graphicService.onAttributeUpdate(this), this._emitCustomEvent("afterAttributeUpdate", context));
|
|
9460
9462
|
}
|
|
9461
9463
|
update(d) {
|
|
9462
9464
|
d ? (d.bounds && this.tryUpdateAABBBounds(), d.trans && this.tryUpdateLocalTransMatrix()) : (this.tryUpdateAABBBounds(), this.tryUpdateLocalTransMatrix());
|
|
@@ -9643,6 +9645,7 @@
|
|
|
9643
9645
|
}
|
|
9644
9646
|
}
|
|
9645
9647
|
setStage(stage, layer) {
|
|
9648
|
+
var _a;
|
|
9646
9649
|
if (this.stage !== stage) {
|
|
9647
9650
|
if (this.stage = stage, this.layer = layer, this.setStageToShadowRoot(stage, layer), this.animates && this.animates.size) {
|
|
9648
9651
|
const timeline = stage.getTimeline();
|
|
@@ -9650,7 +9653,7 @@
|
|
|
9650
9653
|
a.timeline.isGlobal && (a.setTimeline(timeline), timeline.addAnimate(a));
|
|
9651
9654
|
});
|
|
9652
9655
|
}
|
|
9653
|
-
this._onSetStage && this._onSetStage(this, stage, layer),
|
|
9656
|
+
this._onSetStage && this._onSetStage(this, stage, layer), null === (_a = this.stage) || void 0 === _a || _a.graphicService.onSetStage(this, stage);
|
|
9654
9657
|
}
|
|
9655
9658
|
}
|
|
9656
9659
|
setStageToShadowRoot(stage, layer) {
|
|
@@ -9798,11 +9801,12 @@
|
|
|
9798
9801
|
return !!super.shouldUpdateAABBBounds() || !!(this._childUpdateTag & exports.UpdateTag.UPDATE_BOUNDS);
|
|
9799
9802
|
}
|
|
9800
9803
|
tryUpdateAABBBounds() {
|
|
9804
|
+
var _a, _b;
|
|
9801
9805
|
if (!this.shouldUpdateAABBBounds()) return this._AABBBounds;
|
|
9802
|
-
|
|
9806
|
+
null === (_a = this.stage) || void 0 === _a || _a.graphicService.beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
|
|
9803
9807
|
const selfChange = this.shouldSelfChangeUpdateAABBBounds(),
|
|
9804
9808
|
bounds = this.doUpdateAABBBounds();
|
|
9805
|
-
return this.addUpdateLayoutTag(),
|
|
9809
|
+
return this.addUpdateLayoutTag(), null === (_b = this.stage) || void 0 === _b || _b.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, selfChange), "empty" === this.attribute.boundsMode && bounds.clear(), bounds;
|
|
9806
9810
|
}
|
|
9807
9811
|
doUpdateLocalMatrix() {
|
|
9808
9812
|
const {
|
|
@@ -9862,11 +9866,13 @@
|
|
|
9862
9866
|
return this.theme.getTheme(this);
|
|
9863
9867
|
}
|
|
9864
9868
|
incrementalAppendChild(node) {
|
|
9869
|
+
var _a;
|
|
9865
9870
|
const data = super.appendChild(node);
|
|
9866
|
-
return this.stage && data && (data.stage = this.stage, data.layer = this.layer), this.addUpdateBoundTag(),
|
|
9871
|
+
return this.stage && data && (data.stage = this.stage, data.layer = this.layer), this.addUpdateBoundTag(), null === (_a = this.stage) || void 0 === _a || _a.graphicService.onAddIncremental(node, this, this.stage), data;
|
|
9867
9872
|
}
|
|
9868
9873
|
incrementalClearChild() {
|
|
9869
|
-
|
|
9874
|
+
var _a;
|
|
9875
|
+
super.removeAllChild(), this.addUpdateBoundTag(), null === (_a = this.stage) || void 0 === _a || _a.graphicService.onClearIncremental(this, this.stage);
|
|
9870
9876
|
}
|
|
9871
9877
|
_updateChildToStage(child) {
|
|
9872
9878
|
return this.stage && child && child.setStage(this.stage, this.layer), this.addUpdateBoundTag(), child;
|
|
@@ -9886,17 +9892,20 @@
|
|
|
9886
9892
|
return this._updateChildToStage(super.insertInto(newNode, idx));
|
|
9887
9893
|
}
|
|
9888
9894
|
removeChild(child) {
|
|
9895
|
+
var _a;
|
|
9889
9896
|
const data = super.removeChild(child);
|
|
9890
|
-
return child.stage = null,
|
|
9897
|
+
return child.stage = null, null === (_a = this.stage) || void 0 === _a || _a.graphicService.onRemove(child), this.addUpdateBoundTag(), data;
|
|
9891
9898
|
}
|
|
9892
9899
|
removeAllChild() {
|
|
9893
9900
|
let deep = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !1;
|
|
9894
9901
|
this.forEachChildren(child => {
|
|
9895
|
-
|
|
9902
|
+
var _a;
|
|
9903
|
+
null === (_a = this.stage) || void 0 === _a || _a.graphicService.onRemove(child), deep && child.isContainer && child.removeAllChild(deep);
|
|
9896
9904
|
}), super.removeAllChild(), this.addUpdateBoundTag();
|
|
9897
9905
|
}
|
|
9898
9906
|
setStage(stage, layer) {
|
|
9899
|
-
|
|
9907
|
+
var _a;
|
|
9908
|
+
this.stage !== stage && (this.stage = stage, this.layer = layer, this.setStageToShadowRoot(stage, layer), this._onSetStage && this._onSetStage(this, stage, layer), null === (_a = this.stage) || void 0 === _a || _a.graphicService.onSetStage(this, stage), this.forEachChildren(item => {
|
|
9900
9909
|
item.setStage(stage, this.layer);
|
|
9901
9910
|
}));
|
|
9902
9911
|
}
|
|
@@ -16344,7 +16353,7 @@
|
|
|
16344
16353
|
});
|
|
16345
16354
|
|
|
16346
16355
|
var graphicModule = new ContainerModule(bind => {
|
|
16347
|
-
bind(GraphicService).to(exports.DefaultGraphicService)
|
|
16356
|
+
bind(GraphicService).to(exports.DefaultGraphicService), bind(GraphicCreator$1).toConstantValue(graphicCreator);
|
|
16348
16357
|
});
|
|
16349
16358
|
|
|
16350
16359
|
const AutoEnablePlugins = Symbol.for("AutoEnablePlugins");
|
|
@@ -17098,11 +17107,14 @@
|
|
|
17098
17107
|
};
|
|
17099
17108
|
}
|
|
17100
17109
|
activate(context) {
|
|
17101
|
-
this.pluginService = context
|
|
17110
|
+
this.pluginService = context;
|
|
17111
|
+
const stage = this.pluginService.stage;
|
|
17112
|
+
stage && (stage.graphicService.hooks.onAttributeUpdate.tap(this.key, this.handleChange), stage.graphicService.hooks.onSetStage.tap(this.key, this.handleChange), stage.graphicService.hooks.onRemove.tap(this.key, this.handleChange));
|
|
17102
17113
|
}
|
|
17103
17114
|
deactivate(context) {
|
|
17104
|
-
const filterByName = taps => taps.filter(item => item.name !== this.key)
|
|
17105
|
-
|
|
17115
|
+
const filterByName = taps => taps.filter(item => item.name !== this.key),
|
|
17116
|
+
stage = this.pluginService.stage;
|
|
17117
|
+
stage && (stage.graphicService.hooks.onAttributeUpdate.taps = filterByName(stage.graphicService.hooks.onAttributeUpdate.taps), stage.graphicService.hooks.onSetStage.taps = filterByName(stage.graphicService.hooks.onSetStage.taps), stage.graphicService.hooks.onRemove.taps = filterByName(stage.graphicService.hooks.onRemove.taps));
|
|
17106
17118
|
}
|
|
17107
17119
|
}
|
|
17108
17120
|
|
|
@@ -17153,14 +17165,17 @@
|
|
|
17153
17165
|
this.name = "IncrementalAutoRenderPlugin", this.activeEvent = "onRegister", this.nextFrameRenderGroupSet = new Set(), this.willNextFrameRender = !1, this.nextUserParams = {}, this._uid = Generator.GenAutoIncrementId(), this.key = this.name + this._uid;
|
|
17154
17166
|
}
|
|
17155
17167
|
activate(context) {
|
|
17156
|
-
this.pluginService = context
|
|
17168
|
+
this.pluginService = context;
|
|
17169
|
+
const stage = this.pluginService.stage;
|
|
17170
|
+
stage && (stage.graphicService.hooks.onAddIncremental.tap(this.key, (graphic, group, stage) => {
|
|
17157
17171
|
graphic.glyphHost && (graphic = graphic.glyphHost), graphic.stage === context.stage && null != graphic.stage && (this.nextUserParams.startAtId = group._uid, this.renderNextFrame(group));
|
|
17158
|
-
}),
|
|
17172
|
+
}), stage.graphicService.hooks.onClearIncremental.tap(this.key, (group, stage) => {
|
|
17159
17173
|
group.stage === context.stage && null != group.stage && (this.nextUserParams.startAtId = group._uid, this.nextUserParams.restartIncremental = !0, this.renderNextFrame(group));
|
|
17160
|
-
});
|
|
17174
|
+
}));
|
|
17161
17175
|
}
|
|
17162
17176
|
deactivate(context) {
|
|
17163
|
-
|
|
17177
|
+
const stage = this.pluginService.stage;
|
|
17178
|
+
stage && (stage.graphicService.hooks.onAddIncremental.taps = stage.graphicService.hooks.onAddIncremental.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.onClearIncremental.taps = stage.graphicService.hooks.onClearIncremental.taps.filter(item => item.name !== this.key));
|
|
17164
17179
|
}
|
|
17165
17180
|
renderNextFrame(group) {
|
|
17166
17181
|
this.nextFrameRenderGroupSet.add(group), this.willNextFrameRender || (this.willNextFrameRender = !0, application.global.getRequestAnimationFrame()(() => {
|
|
@@ -17196,19 +17211,22 @@
|
|
|
17196
17211
|
activate(context) {
|
|
17197
17212
|
this.pluginService = context, context.stage.hooks.afterRender.tap(this.key, stage => {
|
|
17198
17213
|
stage && stage === this.pluginService.stage && stage.dirtyBounds.clear();
|
|
17199
|
-
})
|
|
17214
|
+
});
|
|
17215
|
+
const stage = this.pluginService.stage;
|
|
17216
|
+
stage && (stage.graphicService.hooks.beforeUpdateAABBBounds.tap(this.key, (graphic, stage, willUpdate, bounds) => {
|
|
17200
17217
|
graphic.glyphHost && (graphic = graphic.glyphHost), stage && stage === this.pluginService.stage && stage.renderCount && (graphic.isContainer && !graphic.shouldSelfChangeUpdateAABBBounds() || willUpdate && (globalBounds.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2), stage.dirty(globalBounds, graphic.parent && graphic.parent.globalTransMatrix)));
|
|
17201
|
-
}),
|
|
17218
|
+
}), stage.graphicService.hooks.afterUpdateAABBBounds.tap(this.key, (graphic, stage, bounds, params, selfChange) => {
|
|
17202
17219
|
stage && stage === this.pluginService.stage && stage.renderCount && (graphic.isContainer && !selfChange || stage.dirty(params.globalAABBBounds));
|
|
17203
|
-
}),
|
|
17220
|
+
}), stage.graphicService.hooks.clearAABBBounds.tap(this.key, (graphic, stage, bounds) => {
|
|
17204
17221
|
stage && stage === this.pluginService.stage && stage.renderCount && stage && stage.dirty(bounds);
|
|
17205
|
-
}),
|
|
17222
|
+
}), stage.graphicService.hooks.onRemove.tap(this.key, graphic => {
|
|
17206
17223
|
const stage = graphic.stage;
|
|
17207
17224
|
stage && stage === this.pluginService.stage && stage.renderCount && stage && stage.dirty(graphic.globalAABBBounds);
|
|
17208
|
-
});
|
|
17225
|
+
}));
|
|
17209
17226
|
}
|
|
17210
17227
|
deactivate(context) {
|
|
17211
|
-
|
|
17228
|
+
const stage = this.pluginService.stage;
|
|
17229
|
+
stage && (stage.graphicService.hooks.beforeUpdateAABBBounds.taps = stage.graphicService.hooks.beforeUpdateAABBBounds.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.afterUpdateAABBBounds.taps = stage.graphicService.hooks.afterUpdateAABBBounds.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.clearAABBBounds.taps = stage.graphicService.hooks.clearAABBBounds.taps.filter(item => item.name !== this.key), stage.hooks.afterRender.taps = stage.hooks.afterRender.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.onRemove.taps = stage.graphicService.hooks.onRemove.taps.filter(item => item.name !== this.key));
|
|
17212
17230
|
}
|
|
17213
17231
|
}
|
|
17214
17232
|
|
|
@@ -17343,7 +17361,7 @@
|
|
|
17343
17361
|
}, this.params = params, this.theme = new Theme(), this.hooks = {
|
|
17344
17362
|
beforeRender: new SyncHook(["stage"]),
|
|
17345
17363
|
afterRender: new SyncHook(["stage"])
|
|
17346
|
-
}, this.global = application.global, !this.global.env && isBrowserEnv() && this.global.setEnv("browser"), this.window = container.get(VWindow), this.renderService = container.get(RenderService), this.pluginService = container.get(PluginService), this.layerService = container.get(LayerService), this.pluginService.active(this, params), this.window.create({
|
|
17364
|
+
}, this.global = application.global, !this.global.env && isBrowserEnv() && this.global.setEnv("browser"), this.window = container.get(VWindow), this.renderService = container.get(RenderService), this.pluginService = container.get(PluginService), this.layerService = container.get(LayerService), this.graphicService = container.get(GraphicService), this.pluginService.active(this, params), this.window.create({
|
|
17347
17365
|
width: params.width,
|
|
17348
17366
|
height: params.height,
|
|
17349
17367
|
viewBox: params.viewBox,
|
|
@@ -17355,7 +17373,7 @@
|
|
|
17355
17373
|
}), this.state = "normal", this.renderCount = 0, this.tryInitEventSystem(), this._background = null !== (_a = params.background) && void 0 !== _a ? _a : DefaultConfig.BACKGROUND, this.appendChild(this.layerService.createLayer(this, {
|
|
17356
17374
|
main: !0
|
|
17357
17375
|
})), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this.supportInteractiveLayer = !1 !== params.interactiveLayer, params.optimize || (params.optimize = {
|
|
17358
|
-
tickRenderMode: "
|
|
17376
|
+
tickRenderMode: "effect"
|
|
17359
17377
|
}), this.optmize(params.optimize), params.background && isString$1(this._background) && this._background.includes("/") && this.setAttributes({
|
|
17360
17378
|
background: this._background
|
|
17361
17379
|
}), this.initAnimate(params), this.rafId = null !== (_b = params.rafId) && void 0 !== _b ? _b : Math.floor(6 * Math.random());
|
|
@@ -20465,7 +20483,7 @@
|
|
|
20465
20483
|
});
|
|
20466
20484
|
}
|
|
20467
20485
|
deactivate(context) {
|
|
20468
|
-
context.stage.hooks.afterRender.taps = context.stage.hooks.afterRender.taps.filter(item => item.name !== this.key),
|
|
20486
|
+
context.stage.hooks.afterRender.taps = context.stage.hooks.afterRender.taps.filter(item => item.name !== this.key), this.release();
|
|
20469
20487
|
}
|
|
20470
20488
|
getWrapContainer(stage, userContainer, domParams) {
|
|
20471
20489
|
let nativeContainer;
|
|
@@ -20984,18 +21002,21 @@
|
|
|
20984
21002
|
}
|
|
20985
21003
|
}
|
|
20986
21004
|
activate(context) {
|
|
20987
|
-
this.pluginService = context
|
|
21005
|
+
this.pluginService = context;
|
|
21006
|
+
const stage = this.pluginService.stage;
|
|
21007
|
+
stage && (stage.graphicService.hooks.onAttributeUpdate.tap(this.key, graphic => {
|
|
20988
21008
|
graphic.glyphHost && (graphic = graphic.glyphHost), graphic.stage && graphic.stage === this.pluginService.stage && this.tryLayout(graphic, !1);
|
|
20989
|
-
}),
|
|
21009
|
+
}), stage.graphicService.hooks.beforeUpdateAABBBounds.tap(this.key, (graphic, stage, willUpdate, bounds) => {
|
|
20990
21010
|
graphic.glyphHost && (graphic = graphic.glyphHost), stage && stage === this.pluginService.stage && graphic.isContainer && !this.skipBoundsTrigger && _tempBounds.copy(bounds);
|
|
20991
|
-
}),
|
|
21011
|
+
}), stage.graphicService.hooks.afterUpdateAABBBounds.tap(this.key, (graphic, stage, bounds, params, selfChange) => {
|
|
20992
21012
|
stage && stage === this.pluginService.stage && graphic.isContainer && !this.skipBoundsTrigger && (_tempBounds.equals(bounds) || this.tryLayout(graphic, !1));
|
|
20993
|
-
}),
|
|
21013
|
+
}), stage.graphicService.hooks.onSetStage.tap(this.key, graphic => {
|
|
20994
21014
|
graphic.glyphHost && (graphic = graphic.glyphHost), this.tryLayout(graphic, !1);
|
|
20995
|
-
});
|
|
21015
|
+
}));
|
|
20996
21016
|
}
|
|
20997
21017
|
deactivate(context) {
|
|
20998
|
-
|
|
21018
|
+
const stage = this.pluginService.stage;
|
|
21019
|
+
stage && (stage.graphicService.hooks.onAttributeUpdate.taps = stage.graphicService.hooks.onAttributeUpdate.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.beforeUpdateAABBBounds.taps = stage.graphicService.hooks.beforeUpdateAABBBounds.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.afterUpdateAABBBounds.taps = stage.graphicService.hooks.afterUpdateAABBBounds.taps.filter(item => item.name !== this.key), stage.graphicService.hooks.onSetStage.taps = stage.graphicService.hooks.onSetStage.taps.filter(item => item.name !== this.key));
|
|
20999
21020
|
}
|
|
21000
21021
|
}
|
|
21001
21022
|
function getPadding(graphic, field) {
|
|
@@ -35188,7 +35209,7 @@
|
|
|
35188
35209
|
AnimateExecutor.registerBuiltInAnimate("increaseCount", IncreaseCount), AnimateExecutor.registerBuiltInAnimate("fromTo", FromTo), AnimateExecutor.registerBuiltInAnimate("scaleIn", ScaleIn), AnimateExecutor.registerBuiltInAnimate("scaleOut", ScaleOut), AnimateExecutor.registerBuiltInAnimate("growHeightIn", GrowHeightIn), AnimateExecutor.registerBuiltInAnimate("growHeightOut", GrowHeightOut), AnimateExecutor.registerBuiltInAnimate("growWidthIn", GrowWidthIn), AnimateExecutor.registerBuiltInAnimate("growWidthOut", GrowWidthOut), AnimateExecutor.registerBuiltInAnimate("growCenterIn", GrowCenterIn), AnimateExecutor.registerBuiltInAnimate("growCenterOut", GrowCenterOut), AnimateExecutor.registerBuiltInAnimate("clipIn", ClipIn), AnimateExecutor.registerBuiltInAnimate("clipOut", ClipOut), AnimateExecutor.registerBuiltInAnimate("fadeIn", FadeIn), AnimateExecutor.registerBuiltInAnimate("fadeOut", FadeOut), AnimateExecutor.registerBuiltInAnimate("growPointsIn", GrowPointsIn), AnimateExecutor.registerBuiltInAnimate("growPointsOut", GrowPointsOut), AnimateExecutor.registerBuiltInAnimate("growPointsXIn", GrowPointsXIn), AnimateExecutor.registerBuiltInAnimate("growPointsXOut", GrowPointsXOut), AnimateExecutor.registerBuiltInAnimate("growPointsYIn", GrowPointsYIn), AnimateExecutor.registerBuiltInAnimate("growPointsYOut", GrowPointsYOut), AnimateExecutor.registerBuiltInAnimate("growAngleIn", GrowAngleIn), AnimateExecutor.registerBuiltInAnimate("growAngleOut", GrowAngleOut), AnimateExecutor.registerBuiltInAnimate("growRadiusIn", GrowRadiusIn), AnimateExecutor.registerBuiltInAnimate("growRadiusOut", GrowRadiusOut), AnimateExecutor.registerBuiltInAnimate("moveIn", MoveIn), AnimateExecutor.registerBuiltInAnimate("moveOut", MoveOut), AnimateExecutor.registerBuiltInAnimate("rotateIn", RotateIn), AnimateExecutor.registerBuiltInAnimate("rotateOut", RotateOut), AnimateExecutor.registerBuiltInAnimate("update", Update), AnimateExecutor.registerBuiltInAnimate("state", State), AnimateExecutor.registerBuiltInAnimate("labelItemAppear", LabelItemAppear), AnimateExecutor.registerBuiltInAnimate("labelItemDisappear", LabelItemDisappear), AnimateExecutor.registerBuiltInAnimate("poptipAppear", PoptipAppear), AnimateExecutor.registerBuiltInAnimate("poptipDisappear", PoptipDisappear), AnimateExecutor.registerBuiltInAnimate("inputText", InputText), AnimateExecutor.registerBuiltInAnimate("inputRichText", InputRichText), AnimateExecutor.registerBuiltInAnimate("outputRichText", OutputRichText), AnimateExecutor.registerBuiltInAnimate("slideRichText", SlideRichText), AnimateExecutor.registerBuiltInAnimate("slideOutRichText", SlideOutRichText), AnimateExecutor.registerBuiltInAnimate("slideIn", SlideIn), AnimateExecutor.registerBuiltInAnimate("growIn", GrowIn), AnimateExecutor.registerBuiltInAnimate("spinIn", SpinIn), AnimateExecutor.registerBuiltInAnimate("moveScaleIn", MoveScaleIn), AnimateExecutor.registerBuiltInAnimate("moveRotateIn", MoveRotateIn), AnimateExecutor.registerBuiltInAnimate("strokeIn", StrokeIn), AnimateExecutor.registerBuiltInAnimate("slideOut", SlideOut), AnimateExecutor.registerBuiltInAnimate("growOut", GrowOut), AnimateExecutor.registerBuiltInAnimate("spinOut", SpinOut), AnimateExecutor.registerBuiltInAnimate("moveScaleOut", MoveScaleOut), AnimateExecutor.registerBuiltInAnimate("moveRotateOut", MoveRotateOut), AnimateExecutor.registerBuiltInAnimate("strokeOut", StrokeOut), AnimateExecutor.registerBuiltInAnimate("pulse", PulseAnimate), AnimateExecutor.registerBuiltInAnimate("MotionPath", MotionPath), AnimateExecutor.registerBuiltInAnimate("streamLight", StreamLight);
|
|
35189
35210
|
};
|
|
35190
35211
|
|
|
35191
|
-
const version = "1.0.0-alpha.
|
|
35212
|
+
const version = "1.0.0-alpha.7";
|
|
35192
35213
|
preLoadAllModule();
|
|
35193
35214
|
if (isBrowserEnv()) {
|
|
35194
35215
|
loadBrowserEnv(container);
|