@visactor/vrender-core 0.16.0-alpha.0 → 0.16.0-alpha.1

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.
Files changed (155) hide show
  1. package/cjs/animate/animate.js +8 -2
  2. package/cjs/animate/animate.js.map +1 -1
  3. package/cjs/core/constants.d.ts +3 -0
  4. package/cjs/core/constants.js +4 -2
  5. package/cjs/core/constants.js.map +1 -1
  6. package/cjs/core/contributions/layerHandler/canvas2d-contribution.d.ts +3 -1
  7. package/cjs/core/contributions/layerHandler/canvas2d-contribution.js +1 -1
  8. package/cjs/core/contributions/layerHandler/canvas2d-contribution.js.map +1 -1
  9. package/cjs/core/contributions/layerHandler/empty-contribution.d.ts +24 -0
  10. package/cjs/core/contributions/layerHandler/empty-contribution.js +57 -0
  11. package/cjs/core/contributions/layerHandler/empty-contribution.js.map +1 -0
  12. package/cjs/core/contributions/layerHandler/modules.js +4 -2
  13. package/cjs/core/contributions/layerHandler/modules.js.map +1 -1
  14. package/cjs/core/contributions/layerHandler/offscreen2d-contribution.d.ts +3 -1
  15. package/cjs/core/contributions/layerHandler/offscreen2d-contribution.js +1 -1
  16. package/cjs/core/contributions/layerHandler/offscreen2d-contribution.js.map +1 -1
  17. package/cjs/core/layer-service.d.ts +5 -2
  18. package/cjs/core/layer-service.js +22 -3
  19. package/cjs/core/layer-service.js.map +1 -1
  20. package/cjs/core/layer.d.ts +4 -3
  21. package/cjs/core/layer.js +13 -8
  22. package/cjs/core/layer.js.map +1 -1
  23. package/cjs/core/stage.d.ts +8 -7
  24. package/cjs/core/stage.js +30 -36
  25. package/cjs/core/stage.js.map +1 -1
  26. package/cjs/graphic/config.d.ts +2 -1
  27. package/cjs/graphic/config.js +11 -6
  28. package/cjs/graphic/config.js.map +1 -1
  29. package/cjs/graphic/graphic-service/graphic-service.d.ts +2 -0
  30. package/cjs/graphic/graphic-service/graphic-service.js +4 -0
  31. package/cjs/graphic/graphic-service/graphic-service.js.map +1 -1
  32. package/cjs/graphic/graphic.js +3 -2
  33. package/cjs/graphic/graphic.js.map +1 -1
  34. package/cjs/graphic/node-tree.d.ts +1 -1
  35. package/cjs/graphic/node-tree.js +2 -2
  36. package/cjs/graphic/node-tree.js.map +1 -1
  37. package/cjs/graphic/text.d.ts +12 -0
  38. package/cjs/graphic/text.js +31 -5
  39. package/cjs/graphic/text.js.map +1 -1
  40. package/cjs/interface/core.d.ts +2 -1
  41. package/cjs/interface/core.js.map +1 -1
  42. package/cjs/interface/graphic/text.d.ts +3 -0
  43. package/cjs/interface/graphic/text.js.map +1 -1
  44. package/cjs/interface/graphic-service.d.ts +2 -0
  45. package/cjs/interface/graphic-service.js.map +1 -1
  46. package/cjs/interface/graphic.d.ts +6 -1
  47. package/cjs/interface/graphic.js.map +1 -1
  48. package/cjs/interface/layer.d.ts +9 -2
  49. package/cjs/interface/layer.js.map +1 -1
  50. package/cjs/interface/picker.d.ts +5 -5
  51. package/cjs/interface/picker.js.map +1 -1
  52. package/cjs/interface/render.d.ts +1 -1
  53. package/cjs/interface/render.js.map +1 -1
  54. package/cjs/interface/stage.d.ts +3 -8
  55. package/cjs/interface/stage.js.map +1 -1
  56. package/cjs/picker/global-picker-service.d.ts +1 -1
  57. package/cjs/picker/global-picker-service.js +14 -4
  58. package/cjs/picker/global-picker-service.js.map +1 -1
  59. package/cjs/picker/pick-interceptor.d.ts +3 -3
  60. package/cjs/picker/pick-interceptor.js +4 -4
  61. package/cjs/picker/pick-interceptor.js.map +1 -1
  62. package/cjs/picker/picker-service.d.ts +1 -1
  63. package/cjs/picker/picker-service.js +5 -4
  64. package/cjs/picker/picker-service.js.map +1 -1
  65. package/cjs/plugins/builtin-plugin/html-attribute-plugin.d.ts +1 -0
  66. package/cjs/plugins/builtin-plugin/html-attribute-plugin.js +7 -0
  67. package/cjs/plugins/builtin-plugin/html-attribute-plugin.js.map +1 -1
  68. package/cjs/render/contributions/render/draw-interceptor.d.ts +10 -0
  69. package/cjs/render/contributions/render/draw-interceptor.js +63 -1
  70. package/cjs/render/contributions/render/draw-interceptor.js.map +1 -1
  71. package/cjs/render/contributions/render/module.js +4 -0
  72. package/cjs/render/contributions/render/module.js.map +1 -1
  73. package/cjs/render/contributions/render/text-render.js +9 -2
  74. package/cjs/render/contributions/render/text-render.js.map +1 -1
  75. package/cjs/render/contributions/render/utils.js +1 -1
  76. package/cjs/render/contributions/render/utils.js.map +1 -1
  77. package/dist/index.js +351 -66
  78. package/dist/index.min.js +1 -1
  79. package/es/animate/animate.js +8 -2
  80. package/es/animate/animate.js.map +1 -1
  81. package/es/core/constants.d.ts +3 -0
  82. package/es/core/constants.js +6 -0
  83. package/es/core/constants.js.map +1 -1
  84. package/es/core/contributions/layerHandler/canvas2d-contribution.d.ts +3 -1
  85. package/es/core/contributions/layerHandler/canvas2d-contribution.js +1 -1
  86. package/es/core/contributions/layerHandler/canvas2d-contribution.js.map +1 -1
  87. package/es/core/contributions/layerHandler/empty-contribution.d.ts +24 -0
  88. package/es/core/contributions/layerHandler/empty-contribution.js +53 -0
  89. package/es/core/contributions/layerHandler/empty-contribution.js.map +1 -0
  90. package/es/core/contributions/layerHandler/modules.js +6 -2
  91. package/es/core/contributions/layerHandler/modules.js.map +1 -1
  92. package/es/core/contributions/layerHandler/offscreen2d-contribution.d.ts +3 -1
  93. package/es/core/contributions/layerHandler/offscreen2d-contribution.js +1 -1
  94. package/es/core/contributions/layerHandler/offscreen2d-contribution.js.map +1 -1
  95. package/es/core/layer-service.d.ts +5 -2
  96. package/es/core/layer-service.js +25 -2
  97. package/es/core/layer-service.js.map +1 -1
  98. package/es/core/layer.d.ts +4 -3
  99. package/es/core/layer.js +11 -7
  100. package/es/core/layer.js.map +1 -1
  101. package/es/core/stage.d.ts +8 -7
  102. package/es/core/stage.js +30 -36
  103. package/es/core/stage.js.map +1 -1
  104. package/es/graphic/config.d.ts +2 -1
  105. package/es/graphic/config.js +10 -4
  106. package/es/graphic/config.js.map +1 -1
  107. package/es/graphic/graphic-service/graphic-service.d.ts +2 -0
  108. package/es/graphic/graphic-service/graphic-service.js +4 -0
  109. package/es/graphic/graphic-service/graphic-service.js.map +1 -1
  110. package/es/graphic/graphic.js +3 -2
  111. package/es/graphic/graphic.js.map +1 -1
  112. package/es/graphic/node-tree.d.ts +1 -1
  113. package/es/graphic/node-tree.js +2 -2
  114. package/es/graphic/node-tree.js.map +1 -1
  115. package/es/graphic/text.d.ts +12 -0
  116. package/es/graphic/text.js +31 -5
  117. package/es/graphic/text.js.map +1 -1
  118. package/es/interface/core.d.ts +2 -1
  119. package/es/interface/core.js.map +1 -1
  120. package/es/interface/graphic/text.d.ts +3 -0
  121. package/es/interface/graphic/text.js.map +1 -1
  122. package/es/interface/graphic-service.d.ts +2 -0
  123. package/es/interface/graphic-service.js.map +1 -1
  124. package/es/interface/graphic.d.ts +6 -1
  125. package/es/interface/graphic.js.map +1 -1
  126. package/es/interface/layer.d.ts +9 -2
  127. package/es/interface/layer.js.map +1 -1
  128. package/es/interface/picker.d.ts +5 -5
  129. package/es/interface/picker.js.map +1 -1
  130. package/es/interface/render.d.ts +1 -1
  131. package/es/interface/render.js.map +1 -1
  132. package/es/interface/stage.d.ts +3 -8
  133. package/es/interface/stage.js.map +1 -1
  134. package/es/picker/global-picker-service.d.ts +1 -1
  135. package/es/picker/global-picker-service.js +14 -4
  136. package/es/picker/global-picker-service.js.map +1 -1
  137. package/es/picker/pick-interceptor.d.ts +3 -3
  138. package/es/picker/pick-interceptor.js +4 -4
  139. package/es/picker/pick-interceptor.js.map +1 -1
  140. package/es/picker/picker-service.d.ts +1 -1
  141. package/es/picker/picker-service.js +4 -4
  142. package/es/picker/picker-service.js.map +1 -1
  143. package/es/plugins/builtin-plugin/html-attribute-plugin.d.ts +1 -0
  144. package/es/plugins/builtin-plugin/html-attribute-plugin.js +7 -0
  145. package/es/plugins/builtin-plugin/html-attribute-plugin.js.map +1 -1
  146. package/es/render/contributions/render/draw-interceptor.d.ts +10 -0
  147. package/es/render/contributions/render/draw-interceptor.js +64 -0
  148. package/es/render/contributions/render/draw-interceptor.js.map +1 -1
  149. package/es/render/contributions/render/module.js +3 -1
  150. package/es/render/contributions/render/module.js.map +1 -1
  151. package/es/render/contributions/render/text-render.js +9 -2
  152. package/es/render/contributions/render/text-render.js.map +1 -1
  153. package/es/render/contributions/render/utils.js +1 -1
  154. package/es/render/contributions/render/utils.js.map +1 -1
  155. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -6153,7 +6153,8 @@
6153
6153
  scaleIn3d: false,
6154
6154
  direction: 'horizontal',
6155
6155
  wordBreak: 'break-all',
6156
- ignoreBuf: false
6156
+ ignoreBuf: false,
6157
+ verticalMode: 0
6157
6158
  };
6158
6159
  const DefaultStyle = Object.assign(Object.assign(Object.assign({ opacity: 1, background: null, texture: null, textureColor: 'black', textureSize: 10, texturePadding: 2, backgroundMode: 0, blur: 0, cursor: null, html: null }, DefaultFillStyle), DefaultStrokeStyle), DefaultLayout);
6159
6160
  const DefaultConnectAttribute = {
@@ -6162,7 +6163,10 @@
6162
6163
  connectedX: NaN,
6163
6164
  connectedY: NaN
6164
6165
  };
6165
- const DefaultAttribute = Object.assign(Object.assign({ strokeSeg: null, pickable: true, childrenPickable: true, visible: true, zIndex: 0, layout: null, boundsPadding: 0, pickMode: 'accurate', customPickShape: null, boundsMode: 'accurate', keepDirIn3d: true, shadowRootIdx: 1 }, DefaultStyle), DefaultTransform);
6166
+ const DefaultDebugAttribute = {
6167
+ _debug_bounds: false
6168
+ };
6169
+ const DefaultAttribute = Object.assign(Object.assign(Object.assign({ strokeSeg: null, pickable: true, childrenPickable: true, visible: true, zIndex: 0, layout: null, boundsPadding: 0, pickMode: 'accurate', customPickShape: null, boundsMode: 'accurate', keepDirIn3d: true, shadowRootIdx: 1, interactive: false }, DefaultDebugAttribute), DefaultStyle), DefaultTransform);
6166
6170
  function addAttributeToPrototype(obj, c, keys) {
6167
6171
  keys.forEach(key => {
6168
6172
  c.prototype[key] = obj[key];
@@ -7762,11 +7766,11 @@
7762
7766
  forEach(cb) {
7763
7767
  return this.forEachChildren(cb);
7764
7768
  }
7765
- appendChild(node) {
7769
+ appendChild(node, highPerformance = true) {
7766
7770
  if (this._uid === node._uid) {
7767
7771
  return null;
7768
7772
  }
7769
- if (node.isAncestorsOf(this)) {
7773
+ if (!highPerformance && node.isAncestorsOf(this)) {
7770
7774
  throw new Error('【Node::appendChild】不能将父辈元素append为子元素');
7771
7775
  }
7772
7776
  node.parent && node.parent.removeChild(node);
@@ -9997,9 +10001,14 @@
9997
10001
  update(end, ratio, out) {
9998
10002
  if (this.updateCount === 0) {
9999
10003
  this.onFirstRun();
10004
+ const props = this.step.getLastProps();
10005
+ Object.keys(props).forEach(k => {
10006
+ if (this.subAnimate.animate.validAttr(k)) {
10007
+ out[k] = props[k];
10008
+ }
10009
+ });
10000
10010
  }
10001
10011
  this.updateCount += 1;
10002
- Object.assign(out, this.step.getLastProps());
10003
10012
  this.onUpdate(end, ratio, out);
10004
10013
  if (end) {
10005
10014
  this.onEnd();
@@ -13666,6 +13675,9 @@
13666
13675
  return animate;
13667
13676
  }
13668
13677
  onAttributeUpdate(context) {
13678
+ if (context && context.skipUpdateCallback) {
13679
+ return;
13680
+ }
13669
13681
  application.graphicService.onAttributeUpdate(this);
13670
13682
  this._emitCustomEvent('afterAttributeUpdate', context);
13671
13683
  }
@@ -14164,6 +14176,7 @@
14164
14176
  }
14165
14177
  release() {
14166
14178
  this.releaseStatus = 'released';
14179
+ application.graphicService.onRelease(this);
14167
14180
  }
14168
14181
  _emitCustomEvent(type, context) {
14169
14182
  var _a, _b;
@@ -14959,11 +14972,13 @@
14959
14972
  }
14960
14973
  Group.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
14961
14974
 
14962
- const LayerHandlerContribution = Symbol.for('LayerHandlerContribution');
14963
14975
  class Layer extends Group {
14964
14976
  get offscreen() {
14965
14977
  return this.layerHandler.offscreen;
14966
14978
  }
14979
+ get layerMode() {
14980
+ return this.layerHandler.type;
14981
+ }
14967
14982
  get width() {
14968
14983
  if (!this.stage) {
14969
14984
  return 0;
@@ -15001,7 +15016,7 @@
15001
15016
  this.global = global;
15002
15017
  this.window = window;
15003
15018
  this.main = params.main;
15004
- this.layerHandler = container.get(LayerHandlerContribution);
15019
+ this.layerHandler = params.layerHandler;
15005
15020
  this.layerHandler.init(this, window, {
15006
15021
  main: params.main,
15007
15022
  canvasId: params.canvasId,
@@ -15013,7 +15028,6 @@
15013
15028
  this.subLayers = new Map();
15014
15029
  this.theme = new Theme();
15015
15030
  this.background = 'rgba(0, 0, 0, 0)';
15016
- this.virtual = !!params.virtual;
15017
15031
  this.afterDrawCbs = [];
15018
15032
  }
15019
15033
  combineSubLayer(removeIncrementalKey = true) {
@@ -15045,6 +15059,14 @@
15045
15059
  pick(x, y) {
15046
15060
  throw new Error('暂不支持');
15047
15061
  }
15062
+ tryRenderSecondaryLayer(params, userParams) {
15063
+ if (this.layerHandler.secondaryHandlers && this.layerHandler.secondaryHandlers.length) {
15064
+ this.layerHandler.secondaryHandlers.forEach(h => {
15065
+ h.layer.renderCount = this.renderCount;
15066
+ h.layer.render(params, userParams);
15067
+ });
15068
+ }
15069
+ }
15048
15070
  render(params, userParams) {
15049
15071
  var _a;
15050
15072
  const stage = this.stage;
@@ -15060,6 +15082,7 @@
15060
15082
  updateBounds: params.updateBounds
15061
15083
  }, userParams);
15062
15084
  this.afterDrawCbs.forEach(c => c(this));
15085
+ this.tryRenderSecondaryLayer(params, userParams);
15063
15086
  }
15064
15087
  resize(w, h) {
15065
15088
  this.layerHandler.resize(w, h);
@@ -15105,6 +15128,13 @@
15105
15128
  }
15106
15129
  }
15107
15130
 
15131
+ const TransformUtil = Symbol.for('TransformUtil');
15132
+ const GraphicUtil = Symbol.for('GraphicUtil');
15133
+ const LayerService = Symbol.for('LayerService');
15134
+ const StaticLayerHandlerContribution = Symbol.for('StaticLayerHandlerContribution');
15135
+ const DynamicLayerHandlerContribution = Symbol.for('DynamicLayerHandlerContribution');
15136
+ const VirtualLayerHandlerContribution = Symbol.for('VirtualLayerHandlerContribution');
15137
+
15108
15138
  exports.DefaultLayerService = class DefaultLayerService {
15109
15139
  constructor(global) {
15110
15140
  this.global = global;
@@ -15120,15 +15150,57 @@
15120
15150
  getStageLayer(stage) {
15121
15151
  return this.layerMap.get(stage);
15122
15152
  }
15153
+ getRecommendedLayerType(layerMode) {
15154
+ if (layerMode) {
15155
+ return layerMode;
15156
+ }
15157
+ if (this.staticLayerCountInEnv !== 0) {
15158
+ return 'static';
15159
+ }
15160
+ else if (this.dynamicLayerCountInEnv !== 0) {
15161
+ return 'dynamic';
15162
+ }
15163
+ return 'virtual';
15164
+ }
15165
+ getLayerHandler(layerMode) {
15166
+ let layerHandler;
15167
+ if (layerMode === 'static') {
15168
+ layerHandler = container.get(StaticLayerHandlerContribution);
15169
+ }
15170
+ else if (layerMode === 'dynamic') {
15171
+ layerHandler = container.get(DynamicLayerHandlerContribution);
15172
+ }
15173
+ else {
15174
+ layerHandler = container.get(VirtualLayerHandlerContribution);
15175
+ }
15176
+ return layerHandler;
15177
+ }
15123
15178
  createLayer(stage, options = { main: false }) {
15124
15179
  this.tryInit();
15125
- const layer = new Layer(stage, this.global, stage.window, Object.assign(Object.assign({}, options), { virtual: this.staticLayerCountInEnv === 0 }));
15180
+ const layerMode = this.getRecommendedLayerType(options.layerMode);
15181
+ const layerHandler = this.getLayerHandler(layerMode);
15182
+ const layer = new Layer(stage, this.global, stage.window, Object.assign(Object.assign({ main: false }, options), { layerMode,
15183
+ layerHandler }));
15126
15184
  const stageLayers = this.layerMap.get(stage) || [];
15127
15185
  stageLayers.push(layer);
15128
15186
  this.layerMap.set(stage, stageLayers);
15129
15187
  this.staticLayerCountInEnv--;
15130
15188
  return layer;
15131
15189
  }
15190
+ prepareStageLayer(stage) {
15191
+ let mainHandler;
15192
+ stage.forEachChildren((l) => {
15193
+ const handler = l.getNativeHandler();
15194
+ if (handler.type === 'virtual') {
15195
+ handler.mainHandler = mainHandler;
15196
+ mainHandler.secondaryHandlers.push(handler);
15197
+ }
15198
+ else {
15199
+ mainHandler = handler;
15200
+ mainHandler.secondaryHandlers = [];
15201
+ }
15202
+ });
15203
+ }
15132
15204
  releaseLayer(stage, layer) {
15133
15205
  layer.release();
15134
15206
  const stageLayers = this.layerMap.get(stage) || [];
@@ -15274,10 +15346,6 @@
15274
15346
  __metadata("design:paramtypes", [Object])
15275
15347
  ], exports.DefaultWindow);
15276
15348
 
15277
- const TransformUtil = Symbol.for('TransformUtil');
15278
- const GraphicUtil = Symbol.for('GraphicUtil');
15279
- const LayerService = Symbol.for('LayerService');
15280
-
15281
15349
  var coreModule = new ContainerModule(bind => {
15282
15350
  bind(exports.DefaultGlobal).toSelf().inSingletonScope();
15283
15351
  bind(VGlobal).toService(exports.DefaultGlobal);
@@ -15513,7 +15581,7 @@
15513
15581
  context.arc(cx, cy, outerRadius, outerStartAngle, outerEndAngle, !clockwise);
15514
15582
  }
15515
15583
  else {
15516
- context.moveTo(cx + outerRadius * cos(outerEndAngle), cy + (yore !== null && yore !== void 0 ? yore : 0));
15584
+ context.moveTo(cx + outerRadius * cos(outerEndAngle), cy + outerRadius * sin(outerEndAngle));
15517
15585
  }
15518
15586
  }
15519
15587
  if (!(innerRadius > epsilon) || innerDeltaAngle < 0.001) {
@@ -16195,15 +16263,27 @@
16195
16263
  }
16196
16264
  return this._AABBBounds;
16197
16265
  }
16266
+ getBaselineMapAlign() {
16267
+ return Text.baselineMapAlign;
16268
+ }
16269
+ getAlignMapBaseline() {
16270
+ return Text.alignMapBaseline;
16271
+ }
16198
16272
  updateVerticalSinglelineAABBBounds(text) {
16199
- var _a;
16273
+ var _a, _b, _c;
16200
16274
  const textTheme = getTheme(this).text;
16201
16275
  const textMeasure = application.graphicUtil.textMeasure;
16202
16276
  let width;
16203
16277
  const attribute = this.attribute;
16204
16278
  const { ignoreBuf = textTheme.ignoreBuf } = attribute;
16205
16279
  const buf = ignoreBuf ? 0 : 2;
16206
- const { maxLineWidth = textTheme.maxLineWidth, ellipsis = textTheme.ellipsis, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontSize = textTheme.fontSize, fontWeight = textTheme.fontWeight, fontFamily = textTheme.fontFamily, stroke = textTheme.stroke, lineHeight = (_a = attribute.lineHeight) !== null && _a !== void 0 ? _a : (attribute.fontSize || textTheme.fontSize) + buf, lineWidth = textTheme.lineWidth, wordBreak = textTheme.wordBreak } = attribute;
16280
+ const { maxLineWidth = textTheme.maxLineWidth, ellipsis = textTheme.ellipsis, fontSize = textTheme.fontSize, fontWeight = textTheme.fontWeight, fontFamily = textTheme.fontFamily, stroke = textTheme.stroke, lineHeight = (_a = attribute.lineHeight) !== null && _a !== void 0 ? _a : (attribute.fontSize || textTheme.fontSize) + buf, lineWidth = textTheme.lineWidth, verticalMode = textTheme.verticalMode } = attribute;
16281
+ let { textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline } = attribute;
16282
+ if (!verticalMode) {
16283
+ const t = textAlign;
16284
+ textAlign = (_b = Text.baselineMapAlign[textBaseline]) !== null && _b !== void 0 ? _b : 'left';
16285
+ textBaseline = (_c = Text.alignMapBaseline[t]) !== null && _c !== void 0 ? _c : 'top';
16286
+ }
16207
16287
  if (!this.shouldUpdateShape() && this.cache) {
16208
16288
  width = this.cache.clipedWidth;
16209
16289
  const dx = textDrawOffsetX(textAlign, width);
@@ -16279,14 +16359,20 @@
16279
16359
  return this._AABBBounds;
16280
16360
  }
16281
16361
  updateVerticalMultilineAABBBounds(text) {
16282
- var _a;
16362
+ var _a, _b, _c;
16283
16363
  const textTheme = getTheme(this).text;
16284
16364
  const textMeasure = application.graphicUtil.textMeasure;
16285
16365
  let width;
16286
16366
  const attribute = this.attribute;
16287
16367
  const { ignoreBuf = textTheme.ignoreBuf } = attribute;
16288
16368
  const buf = ignoreBuf ? 0 : 2;
16289
- const { maxLineWidth = textTheme.maxLineWidth, ellipsis = textTheme.ellipsis, textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline, fontFamily = textTheme.fontFamily, fontSize = textTheme.fontSize, fontWeight = textTheme.fontWeight, stroke = textTheme.stroke, lineHeight = (_a = attribute.lineHeight) !== null && _a !== void 0 ? _a : (attribute.fontSize || textTheme.fontSize) + buf, lineWidth = textTheme.lineWidth, wordBreak = textTheme.wordBreak } = attribute;
16369
+ const { maxLineWidth = textTheme.maxLineWidth, ellipsis = textTheme.ellipsis, fontFamily = textTheme.fontFamily, fontSize = textTheme.fontSize, fontWeight = textTheme.fontWeight, stroke = textTheme.stroke, lineHeight = (_a = attribute.lineHeight) !== null && _a !== void 0 ? _a : (attribute.fontSize || textTheme.fontSize) + buf, lineWidth = textTheme.lineWidth, verticalMode = textTheme.verticalMode } = attribute;
16370
+ let { textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline } = attribute;
16371
+ if (!verticalMode) {
16372
+ const t = textAlign;
16373
+ textAlign = (_b = Text.baselineMapAlign[textBaseline]) !== null && _b !== void 0 ? _b : 'left';
16374
+ textBaseline = (_c = Text.alignMapBaseline[t]) !== null && _c !== void 0 ? _c : 'top';
16375
+ }
16290
16376
  width = 0;
16291
16377
  if (!this.shouldUpdateShape() && this.cache) {
16292
16378
  this.cache.verticalList.forEach(item => {
@@ -16366,6 +16452,16 @@
16366
16452
  }
16367
16453
  }
16368
16454
  Text.NOWORK_ANIMATE_ATTR = Object.assign({ ellipsis: 1, wordBreak: 1, direction: 1, textAlign: 1, textBaseline: 1, fontFamily: 1, fontWeight: 1 }, NOWORK_ANIMATE_ATTR);
16455
+ Text.baselineMapAlign = {
16456
+ top: 'left',
16457
+ bottom: 'right',
16458
+ middle: 'center'
16459
+ };
16460
+ Text.alignMapBaseline = {
16461
+ left: 'top',
16462
+ right: 'bottom',
16463
+ center: 'middle'
16464
+ };
16369
16465
 
16370
16466
  const WRAP_TEXT_UPDATE_TAG_KEY = ['heightLimit', 'lineClamp'];
16371
16467
  class WrapText extends Text {
@@ -20075,6 +20171,7 @@
20075
20171
  onAttributeUpdate: new SyncHook(['graphic']),
20076
20172
  onSetStage: new SyncHook(['graphic', 'stage']),
20077
20173
  onRemove: new SyncHook(['graphic']),
20174
+ onRelease: new SyncHook(['graphic']),
20078
20175
  onAddIncremental: new SyncHook(['graphic', 'group', 'stage']),
20079
20176
  onClearIncremental: new SyncHook(['graphic', 'group', 'stage']),
20080
20177
  beforeUpdateAABBBounds: new SyncHook([
@@ -20109,6 +20206,11 @@
20109
20206
  this.hooks.onRemove.call(graphic);
20110
20207
  }
20111
20208
  }
20209
+ onRelease(graphic) {
20210
+ if (this.hooks.onRelease.taps.length) {
20211
+ this.hooks.onRelease.call(graphic);
20212
+ }
20213
+ }
20112
20214
  onAddIncremental(graphic, group, stage) {
20113
20215
  if (this.hooks.onAddIncremental.taps.length) {
20114
20216
  this.hooks.onAddIncremental.call(graphic, group, stage);
@@ -22527,10 +22629,16 @@
22527
22629
  this.init(textRenderContribitions);
22528
22630
  }
22529
22631
  drawShape(text, context, x, y, drawContext, params, fillCb, strokeCb) {
22530
- var _a;
22632
+ var _a, _b, _c;
22531
22633
  const textAttribute = getTheme(text, params === null || params === void 0 ? void 0 : params.theme).text;
22532
- const { text: str, fill = textAttribute.fill, stroke = textAttribute.stroke, fillOpacity = textAttribute.fillOpacity, strokeOpacity = textAttribute.strokeOpacity, opacity = textAttribute.opacity, lineWidth = textAttribute.lineWidth, visible = textAttribute.visible, underline = textAttribute.underline, lineThrough = textAttribute.lineThrough, keepDirIn3d = textAttribute.keepDirIn3d, direction = textAttribute.direction, fontSize = textAttribute.fontSize, textBaseline = textAttribute.textBaseline, textAlign = textAttribute.textAlign, x: originX = textAttribute.x, y: originY = textAttribute.y } = text.attribute;
22533
- const lineHeight = (_a = text.attribute.lineHeight) !== null && _a !== void 0 ? _a : fontSize;
22634
+ const { text: str, fill = textAttribute.fill, stroke = textAttribute.stroke, fillOpacity = textAttribute.fillOpacity, strokeOpacity = textAttribute.strokeOpacity, opacity = textAttribute.opacity, lineWidth = textAttribute.lineWidth, visible = textAttribute.visible, underline = textAttribute.underline, lineThrough = textAttribute.lineThrough, keepDirIn3d = textAttribute.keepDirIn3d, direction = textAttribute.direction, fontSize = textAttribute.fontSize, verticalMode = textAttribute.verticalMode, x: originX = textAttribute.x, y: originY = textAttribute.y } = text.attribute;
22635
+ let { textAlign = textAttribute.textAlign, textBaseline = textAttribute.textBaseline } = text.attribute;
22636
+ if (!verticalMode && direction === 'vertical') {
22637
+ const t = textAlign;
22638
+ textAlign = (_a = text.getBaselineMapAlign()[textBaseline]) !== null && _a !== void 0 ? _a : 'left';
22639
+ textBaseline = (_b = text.getAlignMapBaseline()[t]) !== null && _b !== void 0 ? _b : 'top';
22640
+ }
22641
+ const lineHeight = (_c = text.attribute.lineHeight) !== null && _c !== void 0 ? _c : fontSize;
22534
22642
  const data = this.valid(text, textAttribute, fillCb, strokeCb);
22535
22643
  if (!data) {
22536
22644
  return;
@@ -24010,7 +24118,11 @@
24010
24118
  result = this.pickGroup(graphics[i], point, parentMatrix, params);
24011
24119
  }
24012
24120
  else {
24013
- result.graphic = this.pickItem(graphics[i], point, parentMatrix, params);
24121
+ const data = this.pickItem(graphics[i], point, parentMatrix, params);
24122
+ if (data) {
24123
+ result.graphic = data.graphic;
24124
+ result.params = data.params;
24125
+ }
24014
24126
  }
24015
24127
  if (result.graphic) {
24016
24128
  break;
@@ -24064,7 +24176,11 @@
24064
24176
  else {
24065
24177
  const newPoint = new Point(point.x, point.y);
24066
24178
  parentMatrix.transformPoint(newPoint, newPoint);
24067
- result.graphic = this.pickItem(graphic, newPoint, parentMatrix, params);
24179
+ const data = this.pickItem(graphic, newPoint, parentMatrix, params);
24180
+ if (data) {
24181
+ result.graphic = data.graphic;
24182
+ result.params = data.params;
24183
+ }
24068
24184
  }
24069
24185
  return !!result.graphic || !!result.group;
24070
24186
  });
@@ -24079,7 +24195,9 @@
24079
24195
  return null;
24080
24196
  }
24081
24197
  if (graphic.AABBBounds.containsPoint(point)) {
24082
- return graphic;
24198
+ return {
24199
+ graphic: graphic
24200
+ };
24083
24201
  }
24084
24202
  return null;
24085
24203
  }
@@ -24099,21 +24217,21 @@
24099
24217
  if (graphic.attribute.shadowRootIdx > 0 || !graphic.attribute.shadowRootIdx) {
24100
24218
  return this._pickItem(graphic, pickerService, point, pickParams, params);
24101
24219
  }
24102
- return false;
24220
+ return null;
24103
24221
  }
24104
24222
  beforePickItem(graphic, pickerService, point, pickParams, params) {
24105
24223
  if (graphic.attribute.shadowRootIdx < 0) {
24106
24224
  return this._pickItem(graphic, pickerService, point, pickParams, params);
24107
24225
  }
24108
- return false;
24226
+ return null;
24109
24227
  }
24110
24228
  _pickItem(graphic, pickerService, point, pickParams, params) {
24111
24229
  if (!graphic.shadowRoot) {
24112
- return false;
24230
+ return null;
24113
24231
  }
24114
24232
  const { parentMatrix } = params || {};
24115
24233
  if (!parentMatrix) {
24116
- return false;
24234
+ return null;
24117
24235
  }
24118
24236
  const context = pickerService.pickContext;
24119
24237
  context.highPerformanceSave();
@@ -24371,6 +24489,7 @@
24371
24489
  let CanvasLayerHandlerContribution = class CanvasLayerHandlerContribution {
24372
24490
  constructor(global) {
24373
24491
  this.global = global;
24492
+ this.type = 'static';
24374
24493
  this.offscreen = false;
24375
24494
  }
24376
24495
  setDpr(dpr) {
@@ -24466,9 +24585,64 @@
24466
24585
  __metadata("design:paramtypes", [Object])
24467
24586
  ], CanvasLayerHandlerContribution);
24468
24587
 
24588
+ let EmptyLayerHandlerContribution = class EmptyLayerHandlerContribution {
24589
+ constructor(global) {
24590
+ this.global = global;
24591
+ this.type = 'virtual';
24592
+ this.offscreen = false;
24593
+ }
24594
+ setDpr(dpr) {
24595
+ return;
24596
+ }
24597
+ init(layer, window, params) {
24598
+ this.layer = layer;
24599
+ this.window = window;
24600
+ if (params.main) {
24601
+ throw new Error('virtual layer不能作为main layer');
24602
+ }
24603
+ this.main = false;
24604
+ this.canvas = null;
24605
+ this.context = null;
24606
+ }
24607
+ resize(w, h) {
24608
+ return;
24609
+ }
24610
+ resizeView(w, h) {
24611
+ return;
24612
+ }
24613
+ render(group, params, userParams) {
24614
+ this.mainHandler.render(group, params, Object.assign(Object.assign({}, userParams), { clear: false }));
24615
+ return;
24616
+ }
24617
+ merge(layerHandlers) {
24618
+ return;
24619
+ }
24620
+ prepare(dirtyBounds, params) {
24621
+ return;
24622
+ }
24623
+ drawTo(target, group, params) {
24624
+ var _a;
24625
+ const context = target.getContext();
24626
+ params.renderService.render(group, Object.assign(Object.assign({ context }, params), { clear: params.clear ? (_a = params.background) !== null && _a !== void 0 ? _a : '#fff' : undefined }));
24627
+ return;
24628
+ }
24629
+ getContext() {
24630
+ return null;
24631
+ }
24632
+ release() {
24633
+ return;
24634
+ }
24635
+ };
24636
+ EmptyLayerHandlerContribution = __decorate([
24637
+ injectable(),
24638
+ __param(0, inject(VGlobal)),
24639
+ __metadata("design:paramtypes", [Object])
24640
+ ], EmptyLayerHandlerContribution);
24641
+
24469
24642
  let OffscreenLayerHandlerContribution = class OffscreenLayerHandlerContribution {
24470
24643
  constructor(global) {
24471
24644
  this.global = global;
24645
+ this.type = 'dynamic';
24472
24646
  this.offscreen = true;
24473
24647
  }
24474
24648
  setDpr(dpr) {
@@ -24538,7 +24712,10 @@
24538
24712
  var layerHandlerModules = new ContainerModule(bind => {
24539
24713
  bind(CanvasLayerHandlerContribution).toSelf();
24540
24714
  bind(OffscreenLayerHandlerContribution).toSelf();
24541
- bind(LayerHandlerContribution).toService(CanvasLayerHandlerContribution);
24715
+ bind(EmptyLayerHandlerContribution).toSelf();
24716
+ bind(StaticLayerHandlerContribution).toService(CanvasLayerHandlerContribution);
24717
+ bind(DynamicLayerHandlerContribution).toService(OffscreenLayerHandlerContribution);
24718
+ bind(VirtualLayerHandlerContribution).toService(EmptyLayerHandlerContribution);
24542
24719
  });
24543
24720
 
24544
24721
  function load$1(container) {
@@ -24714,6 +24891,82 @@
24714
24891
  ShadowRootDrawItemInterceptorContribution = __decorate([
24715
24892
  injectable()
24716
24893
  ], ShadowRootDrawItemInterceptorContribution);
24894
+ let CommonDrawItemInterceptorContribution = class CommonDrawItemInterceptorContribution {
24895
+ constructor() {
24896
+ this.order = 1;
24897
+ }
24898
+ afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
24899
+ if (graphic.attribute.shadowRootIdx > 0 || !graphic.attribute.shadowRootIdx) {
24900
+ this.drawItem(graphic, renderService, drawContext, drawContribution, params);
24901
+ }
24902
+ return false;
24903
+ }
24904
+ beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
24905
+ if (graphic.attribute.shadowRootIdx < 0) {
24906
+ this.drawItem(graphic, renderService, drawContext, drawContribution, params);
24907
+ }
24908
+ return false;
24909
+ }
24910
+ drawItem(graphic, renderService, drawContext, drawContribution, params) {
24911
+ if (!graphic.attribute._debug_bounds) {
24912
+ return false;
24913
+ }
24914
+ const { context } = drawContext;
24915
+ context.highPerformanceSave();
24916
+ const b = graphic.AABBBounds;
24917
+ if (graphic.attribute._debug_bounds !== true) {
24918
+ graphic.attribute._debug_bounds(context, graphic);
24919
+ }
24920
+ context.strokeRect(b.x1, b.y1, b.width(), b.height());
24921
+ context.highPerformanceRestore();
24922
+ return true;
24923
+ }
24924
+ };
24925
+ CommonDrawItemInterceptorContribution = __decorate([
24926
+ injectable()
24927
+ ], CommonDrawItemInterceptorContribution);
24928
+ let InteractiveDrawItemInterceptorContribution = class InteractiveDrawItemInterceptorContribution {
24929
+ constructor() {
24930
+ this.order = 1;
24931
+ }
24932
+ beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
24933
+ let interactiveGraphic;
24934
+ if (graphic.attribute.interactive) {
24935
+ interactiveGraphic = graphic.interactiveGraphic;
24936
+ if (!interactiveGraphic) {
24937
+ interactiveGraphic = graphic.clone();
24938
+ graphic.interactiveGraphic = interactiveGraphic;
24939
+ }
24940
+ const m = graphic.globalTransMatrix;
24941
+ interactiveGraphic.setAttributes({
24942
+ x: 0,
24943
+ y: 0,
24944
+ scaleX: 1,
24945
+ scaleY: 1,
24946
+ angle: 0,
24947
+ postMatrix: m,
24948
+ interactive: false
24949
+ }, false, { skipUpdateCallback: true });
24950
+ drawContext.stage.tryInitInteractiveLayer();
24951
+ const interactiveLayer = drawContext.stage.getLayer('_builtin_interactive');
24952
+ if (interactiveLayer) {
24953
+ interactiveLayer.add(interactiveGraphic);
24954
+ }
24955
+ return true;
24956
+ }
24957
+ else if (interactiveGraphic) {
24958
+ drawContext.stage.tryInitInteractiveLayer();
24959
+ const interactiveLayer = drawContext.stage.getLayer('_builtin_interactive');
24960
+ if (interactiveLayer) {
24961
+ interactiveLayer.removeChild(interactiveGraphic);
24962
+ }
24963
+ }
24964
+ return false;
24965
+ }
24966
+ };
24967
+ InteractiveDrawItemInterceptorContribution = __decorate([
24968
+ injectable()
24969
+ ], InteractiveDrawItemInterceptorContribution);
24717
24970
  let Canvas3DDrawItemInterceptor = class Canvas3DDrawItemInterceptor {
24718
24971
  constructor() {
24719
24972
  this.order = 1;
@@ -26381,8 +26634,12 @@
26381
26634
  bindContributionProvider(bind, GraphicRender);
26382
26635
  bind(ShadowRootDrawItemInterceptorContribution).toSelf().inSingletonScope();
26383
26636
  bind(DrawItemInterceptor).toService(ShadowRootDrawItemInterceptorContribution);
26637
+ bind(CommonDrawItemInterceptorContribution).toSelf().inSingletonScope();
26638
+ bind(DrawItemInterceptor).toService(CommonDrawItemInterceptorContribution);
26384
26639
  bind(Canvas3DDrawItemInterceptor).toSelf().inSingletonScope();
26385
26640
  bind(DrawItemInterceptor).toService(Canvas3DDrawItemInterceptor);
26641
+ bind(InteractiveDrawItemInterceptorContribution).toSelf().inSingletonScope();
26642
+ bind(DrawItemInterceptor).toService(InteractiveDrawItemInterceptorContribution);
26386
26643
  bindContributionProvider(bind, DrawItemInterceptor);
26387
26644
  });
26388
26645
 
@@ -26602,6 +26859,9 @@
26602
26859
  }
26603
26860
  this.drawHTML(context.stage.renderService);
26604
26861
  });
26862
+ application.graphicService.hooks.onRelease.tap(this.key, graphic => {
26863
+ this.removeDom(graphic);
26864
+ });
26605
26865
  }
26606
26866
  deactivate(context) {
26607
26867
  context.stage.hooks.afterRender.taps = context.stage.hooks.afterRender.taps.filter(item => {
@@ -26631,6 +26891,14 @@
26631
26891
  }
26632
26892
  });
26633
26893
  }
26894
+ removeDom(graphic) {
26895
+ if (graphic.bindDom && graphic.bindDom.size) {
26896
+ graphic.bindDom.forEach(item => {
26897
+ item.dom && item.dom.parentElement.removeChild(item.dom);
26898
+ });
26899
+ graphic.bindDom.clear();
26900
+ }
26901
+ }
26634
26902
  renderGraphicHTML(graphic) {
26635
26903
  const { html } = graphic.attribute;
26636
26904
  if (!html) {
@@ -27451,6 +27719,7 @@
27451
27719
  else {
27452
27720
  this._viewBox.setValue(0, 0, this.width, this.height);
27453
27721
  }
27722
+ this.state = 'normal';
27454
27723
  this.renderCount = 0;
27455
27724
  this._subView = !(this._viewBox.width() === this.width && this._viewBox.height() === this.height);
27456
27725
  this._background = (_a = params.background) !== null && _a !== void 0 ? _a : DefaultConfig$1.BACKGROUND;
@@ -27703,10 +27972,10 @@
27703
27972
  combineLayer(ILayer1, ILayer2) {
27704
27973
  throw new Error('暂不支持');
27705
27974
  }
27706
- createLayer(canvasId) {
27975
+ createLayer(layerMode) {
27707
27976
  const layer = this.layerService.createLayer(this, {
27708
27977
  main: false,
27709
- canvasId
27978
+ layerMode
27710
27979
  });
27711
27980
  this.appendChild(layer);
27712
27981
  return layer;
@@ -27735,37 +28004,27 @@
27735
28004
  render(layers, params) {
27736
28005
  this.ticker.start();
27737
28006
  this.timeline.resume();
28007
+ const state = this.state;
28008
+ this.state = 'rendering';
28009
+ this.layerService.prepareStageLayer(this);
27738
28010
  if (!this._skipRender) {
27739
28011
  this.lastRenderparams = params;
27740
28012
  this.hooks.beforeRender.call(this);
27741
- (layers || this).forEach((layer, i) => {
27742
- layer.render({
27743
- renderService: this.renderService,
27744
- background: layer === this.defaultLayer ? this.background : undefined,
27745
- updateBounds: !!this.dirtyBounds
27746
- }, Object.assign({ renderStyle: this.renderStyle }, params));
27747
- });
28013
+ this.renderLayerList(this.children);
27748
28014
  this.combineLayersToWindow();
27749
28015
  this.nextFrameRenderLayerSet.clear();
27750
28016
  this.hooks.afterRender.call(this);
27751
28017
  }
28018
+ this.state = state;
27752
28019
  this._skipRender && this._skipRender++;
27753
28020
  }
27754
28021
  combineLayersToWindow() {
27755
- this.forEach((layer, i) => {
27756
- layer.combineTo(this.window, {
27757
- clear: i === 0,
27758
- x: this.x,
27759
- y: this.y,
27760
- width: this.viewWidth,
27761
- height: this.viewHeight,
27762
- renderService: this.renderService,
27763
- background: layer === this.defaultLayer ? this.background : undefined,
27764
- updateBounds: !!this.dirtyBounds
27765
- });
27766
- });
28022
+ return;
27767
28023
  }
27768
- renderNextFrame(layers) {
28024
+ renderNextFrame(layers, force) {
28025
+ if (this.state === 'rendering' && !force) {
28026
+ return;
28027
+ }
27769
28028
  if (this.nextFrameRenderLayerSet.size !== this.childrenCount) {
27770
28029
  (layers || this).forEach((layer) => {
27771
28030
  this.nextFrameRenderLayerSet.add(layer);
@@ -27781,23 +28040,42 @@
27781
28040
  _doRenderInThisFrame() {
27782
28041
  this.timeline.resume();
27783
28042
  this.ticker.start();
28043
+ const state = this.state;
28044
+ this.state = 'rendering';
28045
+ this.layerService.prepareStageLayer(this);
27784
28046
  if (this.nextFrameRenderLayerSet.size && !this._skipRender) {
27785
28047
  this.hooks.beforeRender.call(this);
27786
- this.forEach((layer) => {
27787
- if (this.nextFrameRenderLayerSet.has(layer)) {
27788
- layer.render({
27789
- renderService: this.renderService,
27790
- background: layer === this.defaultLayer ? this.background : undefined,
27791
- updateBounds: !!this.dirtyBounds
27792
- }, Object.assign({ renderStyle: this.renderStyle }, (this.lastRenderparams || {})));
27793
- }
27794
- });
28048
+ this.renderLayerList(Array.from(this.nextFrameRenderLayerSet.values()), this.lastRenderparams || {});
27795
28049
  this.combineLayersToWindow();
27796
28050
  this.hooks.afterRender.call(this);
27797
28051
  this.nextFrameRenderLayerSet.clear();
27798
28052
  }
28053
+ this.state = state;
27799
28054
  this._skipRender && this._skipRender++;
27800
28055
  }
28056
+ renderLayerList(layerList, params) {
28057
+ const list = [];
28058
+ for (let i = 0; i < layerList.length; i++) {
28059
+ let l = layerList[i];
28060
+ if (l.layerMode === 'virtual') {
28061
+ l = l.getNativeHandler().mainHandler.layer;
28062
+ }
28063
+ if (!list.includes(l)) {
28064
+ list.push(l);
28065
+ }
28066
+ }
28067
+ list.forEach(layer => {
28068
+ if (layer.renderCount > this.renderCount) {
28069
+ return;
28070
+ }
28071
+ layer.renderCount = this.renderCount + 1;
28072
+ layer.render({
28073
+ renderService: this.renderService,
28074
+ background: layer === this.defaultLayer ? this.background : undefined,
28075
+ updateBounds: !!this.dirtyBounds
28076
+ }, Object.assign({ renderStyle: this.renderStyle }, params));
28077
+ });
28078
+ }
27801
28079
  resizeWindow(w, h, rerender = true) {
27802
28080
  this.window.resize(w, h);
27803
28081
  rerender && this.render();
@@ -28506,7 +28784,7 @@
28506
28784
  result = this.pickGroup(graphics[i], point, parentMatrix, params);
28507
28785
  }
28508
28786
  else {
28509
- result.graphic = this.pickItem(graphics[i], point, parentMatrix, params);
28787
+ result = this.pickItem(graphics[i], point, parentMatrix, params);
28510
28788
  }
28511
28789
  if (result.graphic) {
28512
28790
  break;
@@ -28588,12 +28866,13 @@
28588
28866
  return result;
28589
28867
  }
28590
28868
  const pickedItem = this.pickItem(group, newPoint.clone(), parentMatrix, params);
28591
- if (pickedItem) {
28592
- result.graphic = pickedItem;
28869
+ if (pickedItem && pickedItem.graphic) {
28870
+ result.graphic = pickedItem.graphic;
28871
+ result.params = pickedItem.params;
28593
28872
  }
28594
28873
  const groupPicked = group.attribute.pickable !== false && insideGroup;
28595
28874
  currentGroupMatrix.multiply(transMatrix.a, transMatrix.b, transMatrix.c, transMatrix.d, transMatrix.e, transMatrix.f);
28596
- if (group.attribute.childrenPickable !== false && !pickedItem) {
28875
+ if (group.attribute.childrenPickable !== false && !(pickedItem && pickedItem.graphic)) {
28597
28876
  foreach(group, DefaultAttribute.zIndex, (graphic) => {
28598
28877
  if (graphic.isContainer) {
28599
28878
  const newPoint = new Point(point.x, point.y);
@@ -28611,7 +28890,10 @@
28611
28890
  newPoint.x -= scrollX;
28612
28891
  newPoint.y -= scrollY;
28613
28892
  const pickedItem = this.pickItem(graphic, newPoint, parentMatrix, params);
28614
- result.graphic = pickedItem;
28893
+ if (pickedItem && pickedItem.graphic) {
28894
+ result.graphic = pickedItem.graphic;
28895
+ result.params = pickedItem.params;
28896
+ }
28615
28897
  }
28616
28898
  return !!result.graphic || !!result.group;
28617
28899
  }, true, !!context.camera);
@@ -28690,6 +28972,7 @@
28690
28972
  exports.DefaultAttribute = DefaultAttribute;
28691
28973
  exports.DefaultCircleAttribute = DefaultCircleAttribute;
28692
28974
  exports.DefaultConnectAttribute = DefaultConnectAttribute;
28975
+ exports.DefaultDebugAttribute = DefaultDebugAttribute;
28693
28976
  exports.DefaultFillStyle = DefaultFillStyle;
28694
28977
  exports.DefaultGlyphAttribute = DefaultGlyphAttribute;
28695
28978
  exports.DefaultGroupAttribute = DefaultGroupAttribute;
@@ -28717,6 +29000,7 @@
28717
29000
  exports.DefaultTimeline = DefaultTimeline;
28718
29001
  exports.DefaultTransform = DefaultTransform;
28719
29002
  exports.DrawContribution = DrawContribution;
29003
+ exports.DynamicLayerHandlerContribution = DynamicLayerHandlerContribution;
28720
29004
  exports.EnvContribution = EnvContribution;
28721
29005
  exports.EventManager = EventManager;
28722
29006
  exports.EventSystem = EventSystem;
@@ -28755,7 +29039,6 @@
28755
29039
  exports.InteractiveSubRenderContribution = InteractiveSubRenderContribution;
28756
29040
  exports.LINE_NUMBER_TYPE = LINE_NUMBER_TYPE;
28757
29041
  exports.Layer = Layer;
28758
- exports.LayerHandlerContribution = LayerHandlerContribution;
28759
29042
  exports.LayerService = LayerService;
28760
29043
  exports.Line = Line$1;
28761
29044
  exports.LineRender = LineRender;
@@ -28812,6 +29095,7 @@
28812
29095
  exports.SYMBOL_NUMBER_TYPE = SYMBOL_NUMBER_TYPE;
28813
29096
  exports.SegContext = SegContext;
28814
29097
  exports.Stage = Stage;
29098
+ exports.StaticLayerHandlerContribution = StaticLayerHandlerContribution;
28815
29099
  exports.Step = Step$1;
28816
29100
  exports.StreamLight = StreamLight;
28817
29101
  exports.SubAnimate = SubAnimate;
@@ -28829,6 +29113,7 @@
28829
29113
  exports.TransformUtil = TransformUtil;
28830
29114
  exports.VGlobal = VGlobal;
28831
29115
  exports.VWindow = VWindow;
29116
+ exports.VirtualLayerHandlerContribution = VirtualLayerHandlerContribution;
28832
29117
  exports.WILDCARD = WILDCARD;
28833
29118
  exports.WindowHandlerContribution = WindowHandlerContribution;
28834
29119
  exports.WrapText = WrapText;