@visactor/vrender-core 0.22.7-alpha.8 → 0.22.7-alpha.9

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 (184) hide show
  1. package/cjs/common/canvas-utils.js +5 -2
  2. package/cjs/common/canvas-utils.js.map +1 -1
  3. package/cjs/event/federated-event/base-event.js +1 -1
  4. package/cjs/event/federated-event/base-event.js.map +1 -1
  5. package/cjs/graphic/arc.js +1 -1
  6. package/cjs/graphic/arc.js.map +1 -1
  7. package/cjs/graphic/area.js +1 -1
  8. package/cjs/graphic/area.js.map +1 -1
  9. package/cjs/graphic/circle.js +2 -1
  10. package/cjs/graphic/circle.js.map +1 -1
  11. package/cjs/graphic/config.d.ts +2 -1
  12. package/cjs/graphic/config.js +8 -2
  13. package/cjs/graphic/config.js.map +1 -1
  14. package/cjs/graphic/constants.d.ts +1 -0
  15. package/cjs/graphic/constants.js +4 -3
  16. package/cjs/graphic/constants.js.map +1 -1
  17. package/cjs/graphic/graphic.d.ts +3 -0
  18. package/cjs/graphic/graphic.js +9 -6
  19. package/cjs/graphic/graphic.js.map +1 -1
  20. package/cjs/graphic/image.js +2 -1
  21. package/cjs/graphic/image.js.map +1 -1
  22. package/cjs/graphic/index.d.ts +1 -0
  23. package/cjs/graphic/index.js +8 -8
  24. package/cjs/graphic/index.js.map +1 -1
  25. package/cjs/graphic/line.js +2 -1
  26. package/cjs/graphic/line.js.map +1 -1
  27. package/cjs/graphic/path.js +2 -1
  28. package/cjs/graphic/path.js.map +1 -1
  29. package/cjs/graphic/polygon.js +2 -1
  30. package/cjs/graphic/polygon.js.map +1 -1
  31. package/cjs/graphic/rect.js +2 -1
  32. package/cjs/graphic/rect.js.map +1 -1
  33. package/cjs/graphic/richtext/paragraph.d.ts +3 -0
  34. package/cjs/graphic/richtext/paragraph.js +14 -10
  35. package/cjs/graphic/richtext/paragraph.js.map +1 -1
  36. package/cjs/graphic/richtext/utils.js +12 -2
  37. package/cjs/graphic/richtext/utils.js.map +1 -1
  38. package/cjs/graphic/richtext.d.ts +3 -0
  39. package/cjs/graphic/richtext.js +3 -2
  40. package/cjs/graphic/richtext.js.map +1 -1
  41. package/cjs/graphic/star.d.ts +53 -0
  42. package/cjs/graphic/star.js +76 -0
  43. package/cjs/graphic/star.js.map +1 -0
  44. package/cjs/graphic/symbol.js +2 -1
  45. package/cjs/graphic/symbol.js.map +1 -1
  46. package/cjs/graphic/text.js +1 -0
  47. package/cjs/graphic/text.js.map +1 -1
  48. package/cjs/graphic/theme.js +2 -0
  49. package/cjs/graphic/theme.js.map +1 -1
  50. package/cjs/index.d.ts +2 -0
  51. package/cjs/index.js +7 -6
  52. package/cjs/index.js.map +1 -1
  53. package/cjs/interface/contribution.d.ts +2 -0
  54. package/cjs/interface/contribution.js.map +1 -1
  55. package/cjs/interface/graphic/index.d.ts +1 -0
  56. package/cjs/interface/graphic/index.js +3 -2
  57. package/cjs/interface/graphic/index.js.map +1 -1
  58. package/cjs/interface/graphic/richText.d.ts +3 -0
  59. package/cjs/interface/graphic/richText.js.map +1 -1
  60. package/cjs/interface/graphic/star.d.ts +12 -0
  61. package/cjs/interface/graphic/star.js +6 -0
  62. package/cjs/interface/graphic/star.js.map +1 -0
  63. package/cjs/interface/graphic/theme.d.ts +3 -0
  64. package/cjs/interface/graphic/theme.js.map +1 -1
  65. package/cjs/interface/graphic.d.ts +5 -0
  66. package/cjs/interface/graphic.js.map +1 -1
  67. package/cjs/plugins/builtin-plugin/edit-module.js +11 -8
  68. package/cjs/plugins/builtin-plugin/edit-module.js.map +1 -1
  69. package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js +1 -1
  70. package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
  71. package/cjs/register/register-star.d.ts +1 -0
  72. package/cjs/register/register-star.js +14 -0
  73. package/cjs/register/register-star.js.map +1 -0
  74. package/cjs/render/contributions/render/contributions/constants.d.ts +1 -0
  75. package/cjs/render/contributions/render/contributions/constants.js +3 -2
  76. package/cjs/render/contributions/render/contributions/constants.js.map +1 -1
  77. package/cjs/render/contributions/render/contributions/index.d.ts +1 -0
  78. package/cjs/render/contributions/render/contributions/index.js +2 -2
  79. package/cjs/render/contributions/render/contributions/index.js.map +1 -1
  80. package/cjs/render/contributions/render/contributions/star-contribution-render.d.ts +2 -0
  81. package/cjs/render/contributions/render/contributions/star-contribution-render.js +11 -0
  82. package/cjs/render/contributions/render/contributions/star-contribution-render.js.map +1 -0
  83. package/cjs/render/contributions/render/star-module.d.ts +2 -0
  84. package/cjs/render/contributions/render/star-module.js +15 -0
  85. package/cjs/render/contributions/render/star-module.js.map +1 -0
  86. package/cjs/render/contributions/render/star-render.d.ts +10 -0
  87. package/cjs/render/contributions/render/star-render.js +54 -0
  88. package/cjs/render/contributions/render/star-render.js.map +1 -0
  89. package/cjs/render/contributions/render/symbol.d.ts +1 -0
  90. package/cjs/render/contributions/render/symbol.js +2 -2
  91. package/cjs/render/contributions/render/symbol.js.map +1 -1
  92. package/dist/index.es.js +282 -21
  93. package/es/common/canvas-utils.js +5 -2
  94. package/es/common/canvas-utils.js.map +1 -1
  95. package/es/event/federated-event/base-event.js +1 -1
  96. package/es/event/federated-event/base-event.js.map +1 -1
  97. package/es/graphic/arc.js +1 -1
  98. package/es/graphic/arc.js.map +1 -1
  99. package/es/graphic/area.js +1 -1
  100. package/es/graphic/area.js.map +1 -1
  101. package/es/graphic/circle.js +2 -1
  102. package/es/graphic/circle.js.map +1 -1
  103. package/es/graphic/config.d.ts +2 -1
  104. package/es/graphic/config.js +9 -1
  105. package/es/graphic/config.js.map +1 -1
  106. package/es/graphic/constants.d.ts +1 -0
  107. package/es/graphic/constants.js +2 -0
  108. package/es/graphic/constants.js.map +1 -1
  109. package/es/graphic/graphic.d.ts +3 -0
  110. package/es/graphic/graphic.js +9 -6
  111. package/es/graphic/graphic.js.map +1 -1
  112. package/es/graphic/image.js +2 -1
  113. package/es/graphic/image.js.map +1 -1
  114. package/es/graphic/index.d.ts +1 -0
  115. package/es/graphic/index.js +2 -0
  116. package/es/graphic/index.js.map +1 -1
  117. package/es/graphic/line.js +2 -1
  118. package/es/graphic/line.js.map +1 -1
  119. package/es/graphic/path.js +2 -1
  120. package/es/graphic/path.js.map +1 -1
  121. package/es/graphic/polygon.js +2 -1
  122. package/es/graphic/polygon.js.map +1 -1
  123. package/es/graphic/rect.js +2 -1
  124. package/es/graphic/rect.js.map +1 -1
  125. package/es/graphic/richtext/paragraph.d.ts +3 -0
  126. package/es/graphic/richtext/paragraph.js +14 -10
  127. package/es/graphic/richtext/paragraph.js.map +1 -1
  128. package/es/graphic/richtext/utils.js +12 -2
  129. package/es/graphic/richtext/utils.js.map +1 -1
  130. package/es/graphic/richtext.d.ts +3 -0
  131. package/es/graphic/richtext.js +3 -2
  132. package/es/graphic/richtext.js.map +1 -1
  133. package/es/graphic/star.d.ts +53 -0
  134. package/es/graphic/star.js +80 -0
  135. package/es/graphic/star.js.map +1 -0
  136. package/es/graphic/symbol.js +2 -1
  137. package/es/graphic/symbol.js.map +1 -1
  138. package/es/graphic/text.js +1 -0
  139. package/es/graphic/text.js.map +1 -1
  140. package/es/graphic/theme.js +3 -1
  141. package/es/graphic/theme.js.map +1 -1
  142. package/es/index.d.ts +2 -0
  143. package/es/index.js +4 -0
  144. package/es/index.js.map +1 -1
  145. package/es/interface/contribution.d.ts +2 -0
  146. package/es/interface/contribution.js.map +1 -1
  147. package/es/interface/graphic/index.d.ts +1 -0
  148. package/es/interface/graphic/index.js +2 -0
  149. package/es/interface/graphic/index.js.map +1 -1
  150. package/es/interface/graphic/richText.d.ts +3 -0
  151. package/es/interface/graphic/richText.js.map +1 -1
  152. package/es/interface/graphic/star.d.ts +12 -0
  153. package/es/interface/graphic/star.js +2 -0
  154. package/es/interface/graphic/star.js.map +1 -0
  155. package/es/interface/graphic/theme.d.ts +3 -0
  156. package/es/interface/graphic/theme.js.map +1 -1
  157. package/es/interface/graphic.d.ts +5 -0
  158. package/es/interface/graphic.js.map +1 -1
  159. package/es/plugins/builtin-plugin/edit-module.js +11 -8
  160. package/es/plugins/builtin-plugin/edit-module.js.map +1 -1
  161. package/es/plugins/builtin-plugin/richtext-edit-plugin.js +1 -1
  162. package/es/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
  163. package/es/register/register-star.d.ts +1 -0
  164. package/es/register/register-star.js +8 -0
  165. package/es/register/register-star.js.map +1 -0
  166. package/es/render/contributions/render/contributions/constants.d.ts +1 -0
  167. package/es/render/contributions/render/contributions/constants.js +2 -0
  168. package/es/render/contributions/render/contributions/constants.js.map +1 -1
  169. package/es/render/contributions/render/contributions/index.d.ts +1 -0
  170. package/es/render/contributions/render/contributions/index.js +2 -0
  171. package/es/render/contributions/render/contributions/index.js.map +1 -1
  172. package/es/render/contributions/render/contributions/star-contribution-render.d.ts +2 -0
  173. package/es/render/contributions/render/contributions/star-contribution-render.js +8 -0
  174. package/es/render/contributions/render/contributions/star-contribution-render.js.map +1 -0
  175. package/es/render/contributions/render/star-module.d.ts +2 -0
  176. package/es/render/contributions/render/star-module.js +13 -0
  177. package/es/render/contributions/render/star-module.js.map +1 -0
  178. package/es/render/contributions/render/star-render.d.ts +10 -0
  179. package/es/render/contributions/render/star-render.js +59 -0
  180. package/es/render/contributions/render/star-render.js.map +1 -0
  181. package/es/render/contributions/render/symbol.d.ts +1 -0
  182. package/es/render/contributions/render/symbol.js +2 -0
  183. package/es/render/contributions/render/symbol.js.map +1 -1
  184. package/package.json +2 -2
@@ -256,6 +256,9 @@ export class Graphic extends Node {
256
256
  y: y
257
257
  });
258
258
  }
259
+ setWidthHeightWithoutTransform(aabbBounds) {
260
+ this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1, this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1;
261
+ }
259
262
  setAttributes(params, forceUpdateTag = !1, context) {
260
263
  (params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params).background ? this.loadImage(params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic),
261
264
  this._setAttributes(params, forceUpdateTag, context);
@@ -542,15 +545,15 @@ export class Graphic extends Node {
542
545
  getAnchor(anchor, params) {
543
546
  const _anchor = [ 0, 0 ], getBounds = () => {
544
547
  if (params.b) return params.b;
545
- const {scaleX: scaleX, scaleY: scaleY, angle: angle} = this.attribute;
548
+ const {scaleX: scaleX, scaleY: scaleY, angle: angle, scaleCenter: scaleCenter} = this.attribute;
546
549
  return tempBounds.copy(this._AABBBounds), this.setAttributes({
547
- scaleX: 1,
548
- scaleY: 1,
549
- angle: 0
550
+ angle: 0,
551
+ scaleCenter: null
550
552
  }), params.b = this.AABBBounds.clone(), this._AABBBounds.copy(tempBounds), this.setAttributes({
551
553
  scaleX: scaleX,
552
554
  scaleY: scaleY,
553
- angle: angle
555
+ angle: angle,
556
+ scaleCenter: scaleCenter
554
557
  }), params.b;
555
558
  };
556
559
  if ("string" == typeof anchor[0]) {
@@ -567,7 +570,7 @@ export class Graphic extends Node {
567
570
  const {x: x = DefaultTransform.x, y: y = DefaultTransform.y, scaleX: scaleX = DefaultTransform.scaleX, scaleY: scaleY = DefaultTransform.scaleY, angle: angle = DefaultTransform.angle, scaleCenter: scaleCenter, anchor: anchor, postMatrix: postMatrix} = this.attribute;
568
571
  let _anchor = [ 0, 0 ];
569
572
  const params = {};
570
- if (anchor && (_anchor = this.getAnchor(anchor, params)), !scaleCenter || 1 === scaleX && 1 === scaleY) normalTransform(this._transMatrix, this._transMatrix.reset(), x, y, scaleX, scaleY, angle, anchor && _anchor); else {
573
+ if (anchor && angle && (_anchor = this.getAnchor(anchor, params)), !scaleCenter || 1 === scaleX && 1 === scaleY) normalTransform(this._transMatrix, this._transMatrix.reset(), x, y, scaleX, scaleY, angle, anchor && _anchor); else {
571
574
  const m = this._transMatrix;
572
575
  m.reset(), m.translate(_anchor[0], _anchor[1]), m.rotate(angle), m.translate(-_anchor[0], -_anchor[1]),
573
576
  m.translate(x, y), _anchor = this.getAnchor(scaleCenter, params), application.transformUtil.fromMatrix(m, m).scale(scaleX, scaleY, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/graphic.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EACL,UAAU,EACV,MAAM,EACN,eAAe,EACf,KAAK,EACL,KAAK,EACL,GAAG,EACH,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,QAAQ,EACT,MAAM,kBAAkB,CAAC;AAY1B,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAcnC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC7F,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,4BAA4B,EAAE,MAAM,aAAa,CA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AAa,0CAAE,WAAW,0CAAE,OAAO,CAAC;YACzE,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;SACjC;IACH,CAAC;;AA58CM,qBAAa,GAAiC,EAAE,CAAC;AAm9C1D,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;AAE3B,SAAS,kBAAkB,CAAC,KAAU;IACpC,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,MAAM,EAAE;QAC9B,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC","file":"graphic.js","sourcesContent":["import type { ICustomPath2D } from './../interface/path';\nimport type { Dict, IPointLike, IAABBBounds, IOBBBounds } from '@visactor/vutils';\nimport { isArray, max, OBBBounds } from '@visactor/vutils';\nimport {\n AABBBounds,\n Matrix,\n normalTransform,\n Point,\n isNil,\n has,\n isString,\n isValidUrl,\n isBase64,\n isObject\n} from '@visactor/vutils';\nimport type {\n GraphicType,\n IAnimateConfig,\n IGraphicAttribute,\n IGraphic,\n IGraphicAnimateParams,\n IGraphicJson,\n ISetAttributeContext,\n ITransform,\n GraphicReleaseStatus\n} from '../interface/graphic';\nimport { Node } from './node-tree';\nimport type {\n IAnimate,\n IAnimateTarget,\n IGlyphGraphicAttribute,\n IGroup,\n ILayer,\n IPickerService,\n IShadowRoot,\n IStage,\n IStep,\n ISubAnimate,\n ISymbolClass\n} from '../interface';\nimport { EventTarget, CustomEvent } from '../event';\nimport { DefaultTransform } from './config';\nimport { application } from '../application';\nimport { Animate, DefaultStateAnimateConfig, defaultTimeline } from '../animate';\nimport { interpolateColor } from '../color-string/interpolate';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport { ResourceLoader } from '../resource-loader/loader';\nimport { AttributeUpdateType, IContainPointMode, UpdateTag } from '../common/enums';\nimport { BoundsContext } from '../common/bounds-context';\nimport { renderCommandList } from '../common/render-command-list';\nimport { parsePadding } from '../common/utils';\nimport { builtinSymbolsMap, builtInSymbolStrMap, CustomSymbolClass } from './builtin-symbol';\nimport { isSvg, XMLParser } from '../common/xml';\nimport { SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS } from './constants';\n\nconst _tempBounds = new AABBBounds();\n/**\n * pathProxy参考自zrender\n * BSD 3-Clause License\n\n Copyright (c) 2017, Baidu Inc.\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n * Neither the name of the copyright holder nor the names of its\n contributors may be used to endorse or promote products derived from\n this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst tempMatrix = new Matrix();\nconst tempBounds = new AABBBounds();\n\nexport const PURE_STYLE_KEY = [\n 'stroke',\n 'opacity',\n 'strokeOpacity',\n 'lineDash',\n 'lineDashOffset',\n 'lineCap',\n 'lineJoin',\n 'miterLimit',\n 'fill',\n 'fillOpacity'\n];\n\nexport const GRAPHIC_UPDATE_TAG_KEY = [\n 'lineWidth',\n // 'lineCap',\n // 'lineJoin',\n // 'miterLimit',\n 'scaleX',\n 'scaleY',\n 'angle',\n 'anchor',\n 'visible'\n];\n\nconst tempConstantXYKey = ['x', 'y'];\nconst tempConstantScaleXYKey = ['scaleX', 'scaleY'];\nconst tempConstantAngleKey = ['angle'];\n\nconst point = new Point();\n\nexport const NOWORK_ANIMATE_ATTR = {\n strokeSeg: 1,\n boundsPadding: 2,\n pickMode: 1,\n boundsMode: 1,\n customPickShape: 1,\n pickable: 1,\n childrenPickable: 1,\n visible: 1,\n zIndex: 1,\n layout: 1,\n keepDirIn3d: 1,\n globalZIndex: 1,\n\n outerBorder: 1,\n innerBorder: 1,\n lineDash: 1,\n lineCap: 1,\n lineJoin: 1,\n miterLimit: 2,\n strokeBoundsBuffer: 2,\n\n scaleCenter: 1,\n anchor: 1,\n anchor3d: 1,\n postMatrix: 1,\n\n backgroundMode: 2,\n background: 1,\n texture: 1,\n cursor: 1,\n html: 1\n};\n\n/**\n * globalTransMatrix更新逻辑\n * 1. group的transform修改,会下发到所有下层group,将所有下层的tag修改\n * 2. 叶子graphic每次获取globalTransMatrix都重新计算\n * 3. 所有节点的transform修改,或者globalTransform修改,都会下发到自己的shadowRoot上\n */\n\nexport abstract class Graphic<T extends Partial<IGraphicAttribute> = Partial<IGraphicAttribute>>\n extends Node\n implements IGraphic<T>, IAnimateTarget\n{\n /**\n * Mixes all enumerable properties and methods from a source object to Element.\n * @param source - The source of properties and methods to mix in.\n */\n static mixin(source: Dict<any>): void {\n // in ES8/ES2017, this would be really easy:\n // Object.defineProperties(Element.prototype, Object.getOwnPropertyDescriptors(source));\n\n // get all the enumerable property keys\n const keys = Object.keys(source);\n\n // loop through properties\n for (let i = 0; i < keys.length; ++i) {\n const propertyName = keys[i];\n\n // Set the property using the property descriptor - this works for accessors and normal value properties\n Object.defineProperty(\n Graphic.prototype,\n propertyName,\n Object.getOwnPropertyDescriptor(source, propertyName) as PropertyDecorator\n );\n }\n }\n\n declare _events?: any;\n\n static userSymbolMap: Record<string, ISymbolClass> = {};\n\n declare onBeforeAttributeUpdate?: (\n val: any,\n attributes: Partial<T>,\n key: null | string | string[],\n context?: ISetAttributeContext\n ) => T | undefined;\n declare parent: any;\n\n declare resources?: Map<\n string | HTMLImageElement | HTMLCanvasElement,\n { state: 'init' | 'loading' | 'success' | 'fail'; data?: HTMLImageElement | HTMLCanvasElement }\n >;\n declare backgroundImg?: boolean;\n\n declare type: GraphicType;\n declare prefixed: string;\n declare numberType: number;\n declare isContainer?: boolean;\n declare valid: boolean;\n declare stage?: IStage;\n declare layer?: ILayer;\n declare incremental?: number;\n declare glyphHost?: IGraphic<IGlyphGraphicAttribute>;\n declare _onSetStage?: (g: IGraphic, stage: IStage, layer: ILayer) => void;\n // declare _beforeAttributeUpdate?: (key: string | string, value: any) => void;\n // 标记是否是在3d模式下\n declare in3dMode?: boolean;\n\n // aabbBounds,所有图形都需要有,所以初始化即赋值\n protected declare _AABBBounds: IAABBBounds;\n get AABBBounds(): IAABBBounds {\n return this.tryUpdateAABBBounds();\n }\n // 具有旋转的包围盒,部分图元需要,动态初始化\n protected declare _OBBBounds?: IOBBBounds;\n get OBBBounds(): IOBBBounds {\n return this.tryUpdateOBBBounds();\n }\n protected declare _globalAABBBounds: IAABBBounds;\n // 全局包围盒,部分图元需要,动态初始化,建议使用AABBBounds\n get globalAABBBounds(): IAABBBounds {\n return this.tryUpdateGlobalAABBBounds();\n }\n protected declare _transMatrix: Matrix;\n get transMatrix(): Matrix {\n return this.tryUpdateLocalTransMatrix(true);\n }\n protected declare _globalTransMatrix: Matrix;\n get globalTransMatrix(): Matrix {\n return this.tryUpdateGlobalTransMatrix(true);\n }\n protected declare _updateTag: number;\n\n // 上次更新的stamp\n declare stamp?: number;\n\n declare attribute: T;\n\n declare shadowRoot?: IShadowRoot;\n\n declare releaseStatus?: GraphicReleaseStatus;\n\n /** 记录state对应的图形属性 */\n declare states?: Record<string, Partial<T>>;\n /** 当前state值 */\n declare currentStates?: string[];\n /** TODO: state更新对应的动画配置 */\n declare stateAnimateConfig?: IAnimateConfig;\n /** 记录应用state之前,attribute对应的原始图形属性 */\n declare normalAttrs?: Partial<T>;\n /** 获取state图形属性的方法 */\n declare stateProxy?: (stateName: string, targetStates?: string[]) => T;\n declare animates: Map<string | number, IAnimate>;\n\n declare nextAttrs?: T;\n declare prevAttrs?: T;\n declare finalAttrs?: T;\n\n declare pathProxy?: ICustomPath2D;\n // 依附于某个theme,如果该节点不存在parent,那么这个Theme就作为节点的Theme,避免添加到节点前计算属性\n declare attachedThemeGraphic?: IGraphic;\n protected updateAABBBoundsStamp: number;\n protected updateOBBBoundsStamp?: number;\n declare clipPathMap?: Map<string, ISymbolClass>;\n\n constructor(params: T = {} as T) {\n super();\n this._AABBBounds = new AABBBounds();\n this._updateTag = UpdateTag.INIT;\n this.attribute = params;\n this.valid = this.isValid();\n this.updateAABBBoundsStamp = 0;\n if (params.background) {\n this.loadImage((params.background as any).background ?? params.background, true);\n } else if (params.shadowGraphic) {\n this.setShadowGraphic(params.shadowGraphic);\n }\n }\n\n setMode(mode: '2d' | '3d') {\n mode === '3d' ? this.set3dMode() : this.set2dMode();\n }\n\n set3dMode() {\n this.in3dMode = true;\n }\n set2dMode() {\n this.in3dMode = false;\n }\n getOffsetXY(attr?: ITransform, includeScroll: boolean = false) {\n const { dx = attr.dx, dy = attr.dy } = this.attribute;\n if (includeScroll && this.parent) {\n // const groupTheme = getTheme(this.parent).group;\n const attribute = this.parent.attribute;\n point.x = dx + (attribute.scrollX ?? 0);\n point.y = dy + (attribute.scrollY ?? 0);\n } else {\n point.x = dx;\n point.y = dy;\n }\n return point;\n }\n\n onAnimateBind(animate: IAnimate | ISubAnimate) {\n this._emitCustomEvent('animate-bind', animate);\n }\n\n protected tryUpdateAABBBounds(): IAABBBounds {\n const full = this.attribute.boundsMode === 'imprecise';\n if (!this.shouldUpdateAABBBounds()) {\n return this._AABBBounds;\n }\n if (!this.valid) {\n this._AABBBounds.clear();\n return this._AABBBounds;\n }\n\n application.graphicService.beforeUpdateAABBBounds(this, this.stage, true, this._AABBBounds);\n const bounds = this.doUpdateAABBBounds(full);\n // this.addUpdateLayoutTag();\n application.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, true);\n\n // 直接返回空Bounds,但是前面的流程还是要走\n if (this.attribute.boundsMode === 'empty') {\n bounds.clear();\n }\n return bounds;\n }\n\n protected tryUpdateOBBBounds(): IOBBBounds {\n if (!this._OBBBounds) {\n this._OBBBounds = new OBBBounds();\n }\n // 尝试更新AABBBounds\n this.tryUpdateAABBBounds();\n // 如果AABBBounds和OBBBounds不一致,则重新计算OBBBounds\n if (this.updateOBBBoundsStamp === this.updateAABBBoundsStamp) {\n return this._OBBBounds;\n }\n this.updateOBBBoundsStamp = this.updateAABBBoundsStamp;\n if (!this.valid) {\n this._OBBBounds.clear();\n return this._OBBBounds;\n }\n\n const bounds = this.doUpdateOBBBounds();\n return bounds;\n }\n\n protected combindShadowAABBBounds(bounds: IAABBBounds) {\n // 合并shadowRoot的Bounds\n if (this.shadowRoot) {\n const b = this.shadowRoot.AABBBounds.clone();\n bounds.union(b);\n }\n }\n\n abstract getGraphicTheme(): T;\n\n protected doUpdateOBBBounds(): IOBBBounds {\n return this._OBBBounds;\n }\n\n protected abstract updateAABBBounds(\n attribute: T,\n symbolTheme: Required<T>,\n aabbBounds: IAABBBounds,\n full?: boolean\n ): IAABBBounds;\n\n getClipPath() {\n const { clipConfig } = this.attribute;\n if (!clipConfig) {\n return null;\n }\n if (!this.clipPathMap) {\n this.clipPathMap = new Map();\n }\n\n const { shape } = clipConfig;\n let path = this.clipPathMap.get(shape) || null;\n if (!path) {\n // 即使清理,避免内存溢出\n if (this.clipPathMap.size > 10) {\n this.clipPathMap.clear();\n }\n path = this.parsePath(shape);\n path && this.clipPathMap.set(shape, path);\n }\n return path;\n }\n\n parsePath(symbolType: string) {\n if (!symbolType) {\n return null;\n }\n let path = builtinSymbolsMap[symbolType];\n if (path) {\n return path;\n }\n path = Graphic.userSymbolMap[symbolType];\n if (path) {\n return path;\n }\n const _symbolType = builtInSymbolStrMap[symbolType];\n symbolType = _symbolType || symbolType;\n const valid = isSvg(symbolType);\n if (valid === true) {\n const parser = new XMLParser();\n const { svg } = parser.parse(symbolType);\n if (!svg) {\n return null;\n }\n const path = isArray(svg.path) ? svg.path : [svg.path];\n _tempBounds.clear();\n const cacheList: { path: CustomPath2D; attribute: Record<string, any> }[] = [];\n path.forEach((item: any) => {\n const cache = new CustomPath2D().fromString(item.d);\n const attribute: any = {};\n SVG_PARSE_ATTRIBUTE_MAP_KEYS.forEach(k => {\n if (item[k]) {\n (attribute as any)[(SVG_PARSE_ATTRIBUTE_MAP as any)[k]] = item[k];\n }\n });\n // 查找\n cacheList.push({\n path: cache,\n attribute\n });\n _tempBounds.union(cache.bounds);\n });\n const width = _tempBounds.width();\n const height = _tempBounds.height();\n // 规范化到1\n const maxWH = max(width, height);\n const scale = 1 / maxWH;\n cacheList.forEach(cache => cache.path.transform(0, 0, scale, scale));\n\n const _parsedPath = new CustomSymbolClass(symbolType, cacheList, true);\n Graphic.userSymbolMap[symbolType] = _parsedPath;\n return _parsedPath;\n }\n\n const cache = new CustomPath2D().fromString(symbolType);\n const width = cache.bounds.width();\n const height = cache.bounds.height();\n // 规范化到1\n const maxWH = max(width, height);\n const scale = 1 / maxWH;\n cache.transform(0, 0, scale, scale);\n const _parsedPath = new CustomSymbolClass(symbolType, cache);\n Graphic.userSymbolMap[symbolType] = _parsedPath;\n return _parsedPath;\n }\n\n protected doUpdateAABBBounds(full?: boolean): IAABBBounds {\n this.updateAABBBoundsStamp++;\n const graphicTheme = this.getGraphicTheme();\n this._AABBBounds.clear();\n const attribute = this.attribute;\n const bounds = this.updateAABBBounds(attribute, graphicTheme as Required<T>, this._AABBBounds, full) as AABBBounds;\n\n const { boundsPadding = graphicTheme.boundsPadding } = attribute;\n const paddingArray = parsePadding(boundsPadding);\n if (paddingArray) {\n bounds.expand(paddingArray);\n }\n\n this.clearUpdateBoundTag();\n return bounds;\n }\n\n updatePathProxyAABBBounds(aabbBounds: IAABBBounds): boolean {\n const path = typeof this.pathProxy === 'function' ? (this.pathProxy as any)(this.attribute) : this.pathProxy;\n if (!path) {\n return false;\n }\n const boundsContext = new BoundsContext(aabbBounds);\n renderCommandList(path.commandList, boundsContext, 0, 0);\n return true;\n }\n\n protected tryUpdateGlobalAABBBounds(): IAABBBounds {\n const b = this.AABBBounds;\n if (!this._globalAABBBounds) {\n this._globalAABBBounds = b.clone();\n } else {\n this._globalAABBBounds.setValue(b.x1, b.y1, b.x2, b.y2);\n }\n if (this._globalAABBBounds.empty()) {\n return this._globalAABBBounds;\n }\n // 使用parent的grloalAABBBounds\n // todo: 考虑是否需要性能优化\n if (this.parent) {\n this._globalAABBBounds.transformWithMatrix((this.parent as IGroup).globalTransMatrix);\n }\n return this._globalAABBBounds;\n }\n\n /**\n * 这里都是叶子节点的UpdateGlobalTransMatrix函数,只要走进来就直接计算\n * @param clearTag\n * @returns\n */\n protected tryUpdateGlobalTransMatrix(clearTag: boolean = true): Matrix {\n if (!this._globalTransMatrix) {\n this._globalTransMatrix = this.parent\n ? (this.parent as IGroup).globalTransMatrix.clone()\n : this.transMatrix.clone();\n } else if (this.parent) {\n const m = (this.parent as IGroup).globalTransMatrix;\n this._globalTransMatrix.setValue(m.a, m.b, m.c, m.d, m.e, m.f);\n }\n if (this.shouldUpdateGlobalMatrix()) {\n this.doUpdateGlobalMatrix();\n }\n return this._globalTransMatrix;\n }\n\n shouldUpdateGlobalMatrix(): boolean {\n return true;\n }\n\n protected tryUpdateLocalTransMatrix(clearTag: boolean = true) {\n if (!this._transMatrix) {\n this._transMatrix = new Matrix();\n }\n if (this.shouldUpdateLocalMatrix()) {\n this.doUpdateLocalMatrix();\n clearTag && this.clearUpdateLocalPositionTag();\n }\n return this._transMatrix;\n }\n\n shouldUpdateAABBBounds(): boolean {\n // 如果存在shadowRoot,那么判断shadowRoot是否需要更新\n if (this.shadowRoot) {\n return (\n (!!(this._updateTag & UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds()) &&\n application.graphicService.validCheck(\n this.attribute,\n this.getGraphicTheme() as Required<T>,\n this._AABBBounds,\n this\n )\n );\n }\n return (\n !!(this._updateTag & UpdateTag.UPDATE_BOUNDS) &&\n application.graphicService.validCheck(\n this.attribute,\n this.getGraphicTheme() as Required<T>,\n this._AABBBounds,\n this\n )\n );\n }\n\n // 自身变化导致的AABBBounds的变化\n shouldSelfChangeUpdateAABBBounds(): boolean {\n // 如果存在shadowRoot,那么判断shadowRoot是否需要更新\n if (this.shadowRoot) {\n return !!(this._updateTag & UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds();\n }\n return !!(this._updateTag & UpdateTag.UPDATE_BOUNDS);\n }\n\n protected shouldUpdateLocalMatrix(): boolean {\n return !!(this._updateTag & UpdateTag.UPDATE_LOCAL_MATRIX);\n }\n\n isValid(): boolean {\n const attribute = this.attribute;\n return Number.isFinite((attribute.x ?? 0) + (attribute.y ?? 0));\n }\n\n protected _validNumber(num?: number) {\n return num == null || Number.isFinite(num);\n }\n\n shouldUpdateShape(): boolean {\n return !!(this._updateTag & UpdateTag.UPDATE_SHAPE);\n }\n clearUpdateShapeTag() {\n this._updateTag &= UpdateTag.CLEAR_SHAPE;\n }\n\n /**\n * 是否包含某个点(点需要是全局坐标系)\n * @param x\n * @param y\n * @param mode\n * @returns\n */\n containsPoint(x: number, y: number, mode: IContainPointMode, picker?: IPickerService): boolean {\n if (!picker) {\n return false;\n }\n if (mode === IContainPointMode.GLOBAL) {\n // 转换x,y更精准\n const point = new Point(x, y);\n if (this.parent) {\n this.parent.globalTransMatrix.transformPoint(point, point);\n }\n x = point.x;\n y = point.y;\n }\n return picker.containsPoint(this, { x, y });\n }\n\n setAttributes(params: Partial<T>, forceUpdateTag: boolean = false, context?: ISetAttributeContext) {\n params =\n (this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context)) || params;\n\n if (params.background) {\n this.loadImage(params.background, true);\n } else if (params.shadowGraphic) {\n this.setShadowGraphic(params.shadowGraphic);\n }\n this._setAttributes(params, forceUpdateTag, context);\n }\n\n _setAttributes(params: Partial<T>, forceUpdateTag: boolean = false, context?: ISetAttributeContext) {\n const keys = Object.keys(params);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n\n (this.attribute as any)[key] = (params as any)[key];\n }\n this.valid = this.isValid();\n // 没有设置shape&bounds的tag\n if (!this.updateShapeAndBoundsTagSetted() && (forceUpdateTag || this.needUpdateTags(keys))) {\n this.addUpdateShapeAndBoundsTag();\n } else {\n this.addUpdateBoundTag();\n }\n this.addUpdatePositionTag();\n this.addUpdateLayoutTag();\n this.onAttributeUpdate(context);\n }\n\n setAttribute(key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext) {\n const params =\n this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate({ [key]: value }, this.attribute, key, context);\n if (!params) {\n if (!isNil((this.normalAttrs as any)?.[key])) {\n (this.normalAttrs as any)[key] = value;\n } else {\n (this.attribute as any)[key] = value;\n this.valid = this.isValid();\n if (!this.updateShapeAndBoundsTagSetted() && (forceUpdateTag || this.needUpdateTag(key))) {\n this.addUpdateShapeAndBoundsTag();\n } else {\n this.addUpdateBoundTag();\n }\n this.addUpdatePositionTag();\n this.addUpdateLayoutTag();\n this.onAttributeUpdate(context);\n }\n } else {\n this._setAttributes(params, forceUpdateTag, context);\n }\n if (key === 'background') {\n this.loadImage(value, true);\n } else if (key === 'shadowGraphic') {\n this.setShadowGraphic(value);\n }\n }\n\n protected needUpdateTags(keys: string[], k: string[] = GRAPHIC_UPDATE_TAG_KEY): boolean {\n for (let i = 0; i < k.length; i++) {\n const attrKey = k[i];\n if (keys.indexOf(attrKey) !== -1) {\n return true;\n }\n }\n return false;\n }\n\n protected needUpdateTag(key: string, k: string[] = GRAPHIC_UPDATE_TAG_KEY): boolean {\n for (let i = 0; i < k.length; i++) {\n const attrKey = k[i];\n if (key === attrKey) {\n return true;\n }\n }\n return false;\n }\n\n initAttributes(params: T) {\n // this.setAttributes(params, true);\n const context = { type: AttributeUpdateType.INIT };\n params =\n (this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context)) || params;\n this.attribute = params;\n if (params.background) {\n this.loadImage(params.background, true);\n } else if (params.shadowGraphic) {\n this.setShadowGraphic(params.shadowGraphic);\n }\n this._updateTag = UpdateTag.INIT;\n this.valid = this.isValid();\n this.onAttributeUpdate(context);\n }\n\n translate(x: number, y: number) {\n if (x === 0 && y === 0) {\n return this;\n }\n const context = {\n type: AttributeUpdateType.TRANSLATE\n };\n const params =\n this.onBeforeAttributeUpdate &&\n this.onBeforeAttributeUpdate({ x, y }, this.attribute, tempConstantXYKey, context);\n if (params) {\n x = params.x;\n y = params.y;\n delete params.x;\n delete params.y;\n this._setAttributes(params);\n }\n const attribute = this.attribute;\n const postMatrix = attribute.postMatrix;\n if (!postMatrix) {\n attribute.x = (attribute.x ?? DefaultTransform.x) + x;\n attribute.y = (attribute.y ?? DefaultTransform.y) + y;\n } else {\n application.transformUtil.fromMatrix(postMatrix, postMatrix).translate(x, y);\n }\n\n this.addUpdatePositionTag();\n this.addUpdateBoundTag();\n this.addUpdateLayoutTag();\n this.onAttributeUpdate(context);\n return this;\n }\n\n translateTo(x: number, y: number) {\n const attribute = this.attribute;\n if (attribute.x === x && attribute.y === y) {\n return this;\n }\n const context = {\n type: AttributeUpdateType.TRANSLATE_TO\n };\n const params =\n this.onBeforeAttributeUpdate &&\n this.onBeforeAttributeUpdate({ x, y }, this.attribute, tempConstantXYKey, context);\n if (params) {\n this._setAttributes(params, false, context);\n return this;\n }\n attribute.x = x;\n attribute.y = y;\n this.addUpdatePositionTag();\n this.addUpdateBoundTag();\n this.addUpdateLayoutTag();\n this.onAttributeUpdate(context);\n return this;\n }\n\n scale(scaleX: number, scaleY: number, scaleCenter?: IPointLike) {\n if (scaleX === 1 && scaleY === 1) {\n return this;\n }\n const context = {\n type: AttributeUpdateType.SCALE\n };\n const params =\n this.onBeforeAttributeUpdate &&\n this.onBeforeAttributeUpdate({ scaleX, scaleY, scaleCenter }, this.attribute, tempConstantScaleXYKey, context);\n if (params) {\n scaleX = params.scaleX;\n scaleY = params.scaleY;\n delete params.scaleX;\n delete params.scaleY;\n this._setAttributes(params);\n }\n const attribute = this.attribute;\n if (!scaleCenter) {\n attribute.scaleX = (attribute.scaleX ?? DefaultTransform.scaleX) * scaleX;\n attribute.scaleY = (attribute.scaleY ?? DefaultTransform.scaleY) * scaleY;\n } else {\n let { postMatrix } = this.attribute;\n if (!postMatrix) {\n postMatrix = new Matrix();\n attribute.postMatrix = postMatrix;\n }\n application.transformUtil.fromMatrix(postMatrix, postMatrix).scale(scaleX, scaleY, scaleCenter);\n }\n this.addUpdatePositionTag();\n this.addUpdateBoundTag();\n this.addUpdateLayoutTag();\n this.onAttributeUpdate(context);\n return this;\n }\n\n scaleTo(scaleX: number, scaleY: number) {\n const attribute = this.attribute;\n if (attribute.scaleX === scaleX && attribute.scaleY === scaleY) {\n return this;\n }\n const context = {\n type: AttributeUpdateType.SCALE_TO\n };\n const params =\n this.onBeforeAttributeUpdate &&\n this.onBeforeAttributeUpdate({ scaleX, scaleY }, this.attribute, tempConstantScaleXYKey, context);\n if (params) {\n this._setAttributes(params, false, context);\n return this;\n }\n attribute.scaleX = scaleX;\n attribute.scaleY = scaleY;\n this.addUpdatePositionTag();\n this.addUpdateBoundTag();\n this.addUpdateLayoutTag();\n this.onAttributeUpdate(context);\n return this;\n }\n\n rotate(angle: number, rotateCenter?: IPointLike) {\n if (angle === 0) {\n return this;\n }\n const context = { type: AttributeUpdateType.ROTATE };\n const params =\n this.onBeforeAttributeUpdate &&\n this.onBeforeAttributeUpdate({ angle, rotateCenter }, this.attribute, tempConstantAngleKey, context);\n if (params) {\n delete params.angle;\n this._setAttributes(params, false, context);\n // return this;\n }\n const attribute = this.attribute;\n if (!rotateCenter) {\n attribute.angle = (attribute.angle ?? DefaultTransform.angle) + angle;\n } else {\n let { postMatrix } = this.attribute;\n if (!postMatrix) {\n postMatrix = new Matrix();\n attribute.postMatrix = postMatrix;\n }\n application.transformUtil.fromMatrix(postMatrix, postMatrix).rotate(angle, rotateCenter);\n }\n this.addUpdatePositionTag();\n this.addUpdateBoundTag();\n this.addUpdateLayoutTag();\n this.onAttributeUpdate(context);\n return this;\n }\n\n rotateTo(angle: number) {\n const attribute = this.attribute;\n if (attribute.angle === angle) {\n return this;\n }\n const context = {\n type: AttributeUpdateType.ROTATE_TO\n };\n const params =\n this.onBeforeAttributeUpdate &&\n this.onBeforeAttributeUpdate(angle, this.attribute, tempConstantAngleKey, context);\n if (params) {\n this._setAttributes(params, false, context);\n return this;\n }\n attribute.angle = angle;\n this.addUpdatePositionTag();\n this.addUpdateBoundTag();\n this.addUpdateLayoutTag();\n this.onAttributeUpdate(context);\n return this;\n }\n\n skewTo(b: number, c: number) {\n return this;\n }\n\n animate(params?: IGraphicAnimateParams) {\n if (!this.animates) {\n this.animates = new Map();\n }\n const animate = new Animate(\n params?.id,\n params?.timeline ?? (this.stage && this.stage.getTimeline()),\n params?.slience\n );\n\n animate.bind(this);\n if (params) {\n const { onStart, onFrame, onEnd, onRemove } = params;\n onStart != null && animate.onStart(onStart);\n onFrame != null && animate.onFrame(onFrame);\n onEnd != null && animate.onEnd(onEnd);\n onRemove != null && animate.onRemove(onRemove);\n animate.interpolateFunc = params.interpolate;\n }\n this.animates.set(animate.id, animate);\n animate.onRemove(() => {\n animate.stop();\n this.animates.delete(animate.id);\n });\n\n return animate;\n }\n\n onAttributeUpdate(context?: ISetAttributeContext) {\n if (context && context.skipUpdateCallback) {\n return;\n }\n application.graphicService.onAttributeUpdate(this);\n this._emitCustomEvent('afterAttributeUpdate', context);\n }\n\n // hasListener(event: string) {\n // const prefix = this.prefixed;\n // var evt = prefix ? prefix + event : event;\n // return this._events[evt];\n // }\n\n update(d?: { bounds: boolean; trans: boolean }) {\n if (d) {\n d.bounds && this.tryUpdateAABBBounds();\n d.trans && this.tryUpdateLocalTransMatrix();\n } else {\n this.tryUpdateAABBBounds();\n this.tryUpdateLocalTransMatrix();\n }\n }\n\n hasState(stateName?: string) {\n if (!this.currentStates || !this.currentStates.length) {\n return false;\n }\n\n if (!isNil(stateName)) {\n return this.currentStates.includes(stateName);\n }\n\n return true;\n }\n getState(stateName: string) {\n return this.states?.[stateName];\n }\n\n applyStateAttrs(attrs: Partial<T>, stateNames: string[], hasAnimation?: boolean, isClear?: boolean) {\n if (hasAnimation) {\n const keys = Object.keys(attrs);\n const noWorkAttrs = this.getNoWorkAnimateAttr();\n const animateAttrs: Partial<T> = {};\n let noAnimateAttrs: Partial<T> | undefined;\n\n keys.forEach(key => {\n if (!noWorkAttrs[key]) {\n (animateAttrs as any)[key] =\n isClear && (attrs as any)[key] === undefined ? this.getDefaultAttribute(key) : (attrs as any)[key];\n } else {\n if (!noAnimateAttrs) {\n noAnimateAttrs = {};\n }\n (noAnimateAttrs as any)[key] = (attrs as any)[key];\n }\n });\n\n const animate = this.animate({ slience: true });\n (animate as any).stateNames = stateNames;\n animate.to(\n animateAttrs,\n this.stateAnimateConfig?.duration ?? DefaultStateAnimateConfig.duration,\n this.stateAnimateConfig?.easing ?? DefaultStateAnimateConfig.easing\n );\n noAnimateAttrs && this.setAttributes(noAnimateAttrs, false, { type: AttributeUpdateType.STATE });\n } else {\n this.stopStateAnimates();\n this.setAttributes(attrs, false, { type: AttributeUpdateType.STATE });\n }\n }\n\n updateNormalAttrs(stateAttrs: Partial<T>) {\n const newNormalAttrs = {};\n if (this.normalAttrs) {\n Object.keys(stateAttrs).forEach(key => {\n if (key in this.normalAttrs) {\n (newNormalAttrs as any)[key] = (this.normalAttrs as any)[key];\n delete (this.normalAttrs as any)[key];\n } else {\n (newNormalAttrs as any)[key] = this.getNormalAttribute(key);\n }\n });\n Object.keys(this.normalAttrs).forEach(key => {\n (stateAttrs as any)[key] = (this.normalAttrs as any)[key];\n });\n } else {\n Object.keys(stateAttrs).forEach(key => {\n (newNormalAttrs as any)[key] = this.getNormalAttribute(key);\n });\n }\n\n this.normalAttrs = newNormalAttrs;\n }\n\n protected stopStateAnimates(type: 'start' | 'end' = 'end') {\n if (this.animates) {\n this.animates.forEach(animate => {\n if ((animate as any).stateNames) {\n animate.stop(type);\n this.animates.delete(animate.id);\n }\n });\n }\n }\n\n private getNormalAttribute(key: string) {\n let value = (this.attribute as any)[key];\n\n if (this.animates) {\n this.animates.forEach(animate => {\n if ((animate as any).stateNames) {\n const endProps = animate.getEndProps();\n if (has(endProps, key)) {\n value = endProps[key];\n }\n }\n });\n }\n\n return value;\n }\n\n clearStates(hasAnimation?: boolean) {\n if (this.hasState() && this.normalAttrs) {\n this.currentStates = [];\n this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, true);\n } else {\n this.currentStates = [];\n }\n this.normalAttrs = null;\n }\n\n removeState(stateName: string | string[], hasAnimation?: boolean) {\n if (this.currentStates) {\n const filter = isArray(stateName) ? (s: string) => !stateName.includes(s) : (s: string) => s !== stateName;\n const newStates = this.currentStates.filter(filter);\n\n if (newStates.length !== this.currentStates.length) {\n this.useStates(newStates, hasAnimation);\n }\n }\n }\n\n toggleState(stateName: string, hasAnimation?: boolean) {\n if (this.hasState(stateName)) {\n this.removeState(stateName, hasAnimation);\n } else {\n const index = this.currentStates ? this.currentStates.indexOf(stateName) : -1;\n if (index < 0) {\n const nextStates = this.currentStates ? this.currentStates.slice() : [];\n nextStates.push(stateName);\n this.useStates(nextStates, hasAnimation);\n }\n }\n }\n\n addState(stateName: string, keepCurrentStates?: boolean, hasAnimation?: boolean) {\n if (\n this.currentStates &&\n this.currentStates.includes(stateName) &&\n (keepCurrentStates || this.currentStates.length === 1)\n ) {\n return;\n }\n\n const newStates =\n keepCurrentStates && this.currentStates?.length ? this.currentStates.concat([stateName]) : [stateName];\n\n this.useStates(newStates, hasAnimation);\n }\n\n useStates(states: string[], hasAnimation?: boolean) {\n if (!states.length) {\n this.clearStates(hasAnimation);\n return;\n }\n\n const isChange =\n this.currentStates?.length !== states.length ||\n states.some((stateName, index) => this.currentStates[index] !== stateName);\n\n if (!isChange) {\n return;\n }\n\n const stateAttrs = {};\n states.forEach(stateName => {\n const attrs = this.stateProxy ? this.stateProxy(stateName, states) : this.states?.[stateName];\n\n if (attrs) {\n Object.assign(stateAttrs, attrs);\n }\n });\n\n this.updateNormalAttrs(stateAttrs);\n\n this.currentStates = states;\n this.applyStateAttrs(stateAttrs, states, hasAnimation);\n }\n\n addUpdateBoundTag() {\n this._updateTag |= UpdateTag.UPDATE_BOUNDS; // for bounds\n if (this.parent) {\n this.parent.addChildUpdateBoundTag();\n }\n if (this.glyphHost) {\n this.glyphHost.addUpdateBoundTag();\n }\n }\n\n addUpdateShapeTag() {\n this._updateTag |= UpdateTag.UPDATE_SHAPE; // for shape\n }\n\n addUpdateShapeAndBoundsTag() {\n this._updateTag |= UpdateTag.UPDATE_SHAPE_AND_BOUNDS; // for shape&bounds\n if (this.parent) {\n this.parent.addChildUpdateBoundTag();\n }\n if (this.glyphHost) {\n this.glyphHost.addUpdateBoundTag();\n }\n }\n\n protected updateShapeAndBoundsTagSetted(): boolean {\n return (this._updateTag & UpdateTag.UPDATE_SHAPE_AND_BOUNDS) === UpdateTag.UPDATE_SHAPE_AND_BOUNDS;\n }\n\n protected clearUpdateBoundTag() {\n this._updateTag &= UpdateTag.CLEAR_BOUNDS;\n }\n /**\n * 更新位置tag,包括全局tag和局部tag\n */\n addUpdatePositionTag() {\n // 更新shadowRoot的全局位置\n this.shadowRoot && this.shadowRoot.addUpdateGlobalPositionTag();\n this._updateTag |= UpdateTag.UPDATE_GLOBAL_LOCAL_MATRIX;\n }\n /**\n * 更新全局位置tag\n */\n addUpdateGlobalPositionTag() {\n // 更新shadowRoot的全局位置\n this.shadowRoot && this.shadowRoot.addUpdateGlobalPositionTag();\n this._updateTag |= UpdateTag.UPDATE_GLOBAL_MATRIX;\n }\n /**\n * 清除局部位置tag\n */\n protected clearUpdateLocalPositionTag() {\n this._updateTag &= UpdateTag.CLEAR_LOCAL_MATRIX;\n }\n /**\n * 清除全局位置tag\n */\n protected clearUpdateGlobalPositionTag() {\n this._updateTag &= UpdateTag.CLEAR_GLOBAL_MATRIX;\n }\n\n addUpdateLayoutTag() {\n this._updateTag |= UpdateTag.UPDATE_LAYOUT;\n }\n\n protected clearUpdateLayoutTag() {\n this._updateTag &= UpdateTag.CLEAR_LAYOUT;\n }\n\n protected needUpdateLayout(): boolean {\n return !!(this._updateTag & UpdateTag.UPDATE_LAYOUT);\n }\n\n protected getAnchor(anchor: [string | number, string | number], params: { b?: IAABBBounds }) {\n const _anchor: [number, number] = [0, 0];\n const getBounds = () => {\n if (params.b) {\n return params.b;\n }\n const { scaleX, scaleY, angle } = this.attribute;\n // 拷贝一份,避免计算bounds的过程中计算matrix,然后matrix又修改了bounds\n tempBounds.copy(this._AABBBounds);\n // @ts-ignore\n this.setAttributes({ scaleX: 1, scaleY: 1, angle: 0 });\n params.b = this.AABBBounds.clone();\n this._AABBBounds.copy(tempBounds);\n // @ts-ignore\n this.setAttributes({ scaleX, scaleY, angle });\n return params.b;\n };\n if (typeof anchor[0] === 'string') {\n const ratio = parseFloat(anchor[0]) / 100;\n const bounds = getBounds();\n _anchor[0] = bounds.x1 + (bounds.x2 - bounds.x1) * ratio;\n } else {\n _anchor[0] = anchor[0];\n }\n if (typeof anchor[1] === 'string') {\n const ratio = parseFloat(anchor[1]) / 100;\n const bounds = getBounds();\n _anchor[1] = bounds.y1 + (bounds.y2 - bounds.y1) * ratio;\n } else {\n _anchor[1] = anchor[1];\n }\n\n return _anchor;\n }\n\n /**\n * 更新局部matrix的具体函数\n */\n protected doUpdateLocalMatrix() {\n const {\n x = DefaultTransform.x,\n y = DefaultTransform.y,\n scaleX = DefaultTransform.scaleX,\n scaleY = DefaultTransform.scaleY,\n angle = DefaultTransform.angle,\n scaleCenter,\n anchor,\n postMatrix\n } = this.attribute;\n let _anchor: [number, number] = [0, 0];\n const params = {};\n if (anchor) {\n _anchor = this.getAnchor(anchor, params);\n }\n if (scaleCenter && (scaleX !== 1 || scaleY !== 1)) {\n const m = this._transMatrix;\n m.reset();\n m.translate(_anchor[0], _anchor[1]);\n m.rotate(angle);\n m.translate(-_anchor[0], -_anchor[1]);\n\n m.translate(x, y);\n // m.translate(scaleCenter[0] * scaleX, scaleCenter[1] * scaleY);\n // 计算bounds\n _anchor = this.getAnchor(scaleCenter, params);\n application.transformUtil.fromMatrix(m, m).scale(scaleX, scaleY, { x: _anchor[0], y: _anchor[1] });\n // m.translate(-scaleCenter[0], -scaleCenter[1]);\n } else {\n normalTransform(this._transMatrix, this._transMatrix.reset(), x, y, scaleX, scaleY, angle, anchor && _anchor);\n }\n const p = this.getOffsetXY(DefaultTransform);\n this._transMatrix.e += p.x;\n this._transMatrix.f += p.y;\n\n if (postMatrix) {\n const m1 = tempMatrix.setValue(\n postMatrix.a,\n postMatrix.b,\n postMatrix.c,\n postMatrix.d,\n postMatrix.e,\n postMatrix.f\n );\n const m2 = this._transMatrix;\n m1.multiply(m2.a, m2.b, m2.c, m2.d, m2.e, m2.f);\n m2.setValue(m1.a, m1.b, m1.c, m1.d, m1.e, m1.f);\n }\n }\n /**\n * 更新全局matrix的具体函数\n */\n protected doUpdateGlobalMatrix() {\n // 基于parent的matrix修改\n if (this.parent) {\n this._globalTransMatrix.multiply(\n this.transMatrix.a,\n this.transMatrix.b,\n this.transMatrix.c,\n this.transMatrix.d,\n this.transMatrix.e,\n this.transMatrix.f\n );\n const { scrollX = 0, scrollY = 0 } = this.parent.attribute;\n this._globalTransMatrix.translate(scrollX, scrollY);\n }\n }\n\n setStage(stage?: IStage, layer?: ILayer) {\n if (this.stage !== stage) {\n this.stage = stage;\n this.layer = layer;\n this.setStageToShadowRoot(stage, layer);\n if (this.animates && this.animates.size) {\n // 设置timeline为所属的stage上的timeline,但如果timeline并不是默认的timeline,就不用覆盖\n const timeline = stage.getTimeline();\n this.animates.forEach(a => {\n if (a.timeline === defaultTimeline) {\n a.setTimeline(timeline);\n }\n });\n }\n this._onSetStage && this._onSetStage(this, stage, layer);\n application.graphicService.onSetStage(this, stage);\n }\n }\n\n setStageToShadowRoot(stage?: IStage, layer?: ILayer) {\n if (this.shadowRoot) {\n this.shadowRoot.setStage(stage, layer);\n }\n }\n\n onAddStep(step: IStep) {\n return;\n }\n onStop(props?: Partial<T>): void {\n if (props) {\n this.setAttributes(props, false, { type: AttributeUpdateType.ANIMATE_END });\n }\n }\n // step时调用\n onStep(subAnimate: ISubAnimate, animate: IAnimate, step: IStep, ratio: number, end: boolean) {\n const nextAttributes = {};\n if (step.customAnimate) {\n step.customAnimate.update(end, ratio, nextAttributes);\n } else {\n const nextProps = step.props;\n const nextParsedProps = step.parsedProps;\n const propKeys = step.propKeys;\n this.stepInterpolate(\n subAnimate,\n animate,\n nextAttributes,\n step,\n ratio,\n end,\n nextProps,\n undefined,\n nextParsedProps,\n propKeys\n );\n }\n this.setAttributes(nextAttributes, false, {\n type: AttributeUpdateType.ANIMATE_UPDATE,\n animationState: {\n ratio,\n end,\n step,\n isFirstFrameOfStep: subAnimate.getLastStep() !== step\n }\n });\n this.stage && this.stage.renderNextFrame();\n }\n\n stepInterpolate(\n subAnimate: ISubAnimate,\n animate: IAnimate,\n nextAttributes: Record<string, any>,\n step: IStep,\n ratio: number,\n end: boolean,\n nextProps: Record<string, any>,\n lastProps?: Record<string, any>,\n nextParsedProps?: any,\n propKeys?: string[]\n ) {\n if (!propKeys) {\n propKeys = Object.keys(nextProps);\n step.propKeys = propKeys;\n }\n if (end) {\n step.propKeys.forEach(key => {\n if (!animate.validAttr(key)) {\n return;\n }\n nextAttributes[key] = nextProps[key];\n });\n } else {\n propKeys.forEach(key => {\n // 如果属性不合法,那直接return\n if (!animate.validAttr(key)) {\n return;\n }\n const nextStepVal = nextProps[key];\n const lastStepVal = (lastProps && lastProps[key]) ?? subAnimate.getLastPropByName(key, step);\n if (nextStepVal == null || lastStepVal == null || nextStepVal === lastStepVal) {\n // 用户直接调用stepInterpolate可能会走进来,如果传入的参数出现null或者undefined,直接赋值最终的值\n nextAttributes[key] = nextStepVal;\n return;\n }\n let match: boolean;\n match =\n animate.interpolateFunc && animate.interpolateFunc(key, ratio, lastStepVal, nextStepVal, nextAttributes);\n if (match) {\n return;\n }\n match = animate.customInterpolate(key, ratio, lastStepVal, nextStepVal, this, nextAttributes);\n if (match) {\n return;\n }\n if (!this.defaultInterpolate(nextStepVal, lastStepVal, key, nextAttributes, nextParsedProps, ratio)) {\n this._interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes);\n }\n });\n }\n\n step.parsedProps = nextParsedProps;\n }\n\n defaultInterpolate(\n nextStepVal: any,\n lastStepVal: any,\n key: string,\n nextAttributes: Record<string, any>,\n nextParsedProps: any,\n ratio: number\n ) {\n if (Number.isFinite(nextStepVal) && Number.isFinite(lastStepVal)) {\n nextAttributes[key] = lastStepVal + (nextStepVal - lastStepVal) * ratio;\n return true;\n } else if (key === 'fill') {\n if (!nextParsedProps) {\n nextParsedProps = {};\n }\n // 保存解析的结果到step\n const fillColorArray: [number, number, number, number] = nextParsedProps.fillColorArray;\n const color = interpolateColor(lastStepVal, fillColorArray ?? nextStepVal, ratio, false, (fArray, tArray) => {\n nextParsedProps.fillColorArray = tArray;\n });\n if (color) {\n nextAttributes[key] = color;\n }\n return true;\n } else if (key === 'stroke') {\n if (!nextParsedProps) {\n nextParsedProps = {};\n }\n // 保存解析的结果到step\n const strokeColorArray: [number, number, number, number] = nextParsedProps.strokeColorArray;\n const color = interpolateColor(lastStepVal, strokeColorArray ?? nextStepVal, ratio, false, (fArray, tArray) => {\n nextParsedProps.strokeColorArray = tArray;\n });\n if (color) {\n nextAttributes[key] = color;\n }\n return true;\n } else if (key === 'shadowColor') {\n if (!nextParsedProps) {\n nextParsedProps = {};\n }\n // 保存解析的结果到step\n const shadowColorArray: [number, number, number, number] = nextParsedProps.shadowColorArray;\n const color = interpolateColor(lastStepVal, shadowColorArray ?? nextStepVal, ratio, true, (fArray, tArray) => {\n nextParsedProps.shadowColorArray = tArray;\n });\n if (color) {\n nextAttributes[key] = color;\n }\n\n return true;\n } else if (Array.isArray(nextStepVal) && nextStepVal.length === lastStepVal.length) {\n const nextList = [];\n let valid = true;\n for (let i = 0; i < nextStepVal.length; i++) {\n const v = lastStepVal[i];\n const val = v + (nextStepVal[i] - v) * ratio;\n if (!Number.isFinite(val)) {\n valid = false;\n break;\n }\n nextList.push(val);\n }\n if (valid) {\n nextAttributes[key] = nextList;\n }\n }\n\n return false;\n }\n\n protected _interpolate(key: string, ratio: number, lastStepVal: any, nextStepVal: any, nextAttributes: any) {\n return;\n }\n\n getDefaultAttribute(name: string) {\n return (this.getGraphicTheme() as any)[name];\n }\n\n // 获取属性\n getComputedAttribute(name: string) {\n return (this.attribute as any)[name] ?? this.getDefaultAttribute(name);\n }\n /**\n * 添加onSetStage钩子\n * @param cb 回调函数\n * @param immediate 是否立刻执行,如果在回调添加之前stage就已经绑定,那么如果第二个参数为true就立刻执行回调\n */\n onSetStage(cb: (g: IGraphic, stage: IStage) => void, immediate: boolean = false) {\n this._onSetStage = cb;\n if (immediate && this.stage) {\n cb(this, this.stage);\n }\n }\n\n /******************** shadow graphic *********************/\n attachShadow(shadowRoot?: IShadowRoot) {\n if (shadowRoot) {\n shadowRoot.shadowHost = this;\n }\n\n this.shadowRoot = shadowRoot ?? application.graphicService.creator.shadowRoot(this);\n this.addUpdateBoundTag();\n this.shadowRoot.setStage(this.stage, this.layer);\n return this.shadowRoot;\n }\n\n detachShadow() {\n if (this.shadowRoot) {\n this.addUpdateBoundTag();\n this.shadowRoot.release(true);\n this.shadowRoot = null;\n }\n }\n\n toJson(): IGraphicJson {\n return {\n attribute: this.attribute,\n _uid: this._uid,\n type: this.type,\n name: this.name,\n children: this.children.map((item: IGraphic) => item.toJson())\n };\n }\n\n createPathProxy(path?: string) {\n if (isString(path, true)) {\n this.pathProxy = new CustomPath2D().fromString(path as string);\n } else {\n this.pathProxy = new CustomPath2D();\n }\n\n return this.pathProxy;\n }\n\n loadImage(image: any, background: boolean = false) {\n if (!image || (background && backgroundNotImage(image))) {\n return;\n }\n const url = image;\n if (!this.resources) {\n this.resources = new Map();\n }\n const cache: {\n state: 'loading' | 'success' | 'init' | 'fail';\n data: any;\n } = {\n data: 'init',\n state: null\n };\n this.resources.set(url, cache);\n if (typeof image === 'string') {\n cache.state = 'loading';\n if (image.startsWith('<svg')) {\n // TODO 封装isSvg到@visactor/vutils\n ResourceLoader.GetSvg(image, this);\n this.backgroundImg = this.backgroundImg || background;\n } else if (isValidUrl(image) || image.includes('/') || isBase64(image)) {\n ResourceLoader.GetImage(image, this);\n this.backgroundImg = this.backgroundImg || background;\n }\n } else if (isObject(image)) {\n (cache.state = 'success'), (cache.data = image);\n this.backgroundImg = this.backgroundImg || background;\n } else {\n cache.state = 'fail';\n }\n }\n\n setShadowGraphic(graphic: IGraphic) {\n if (!graphic) {\n this.detachShadow();\n } else {\n const root = this.attachShadow();\n root.add(graphic);\n }\n }\n\n imageLoadSuccess(url: string, image: HTMLImageElement, cb?: () => void) {\n // 更新属性\n // this.resourceState = 'success';\n // this.resource = image;\n if (!this.resources) {\n return;\n }\n const res = this.resources.get(url);\n if (!res) {\n return;\n }\n res.state = 'success';\n res.data = image;\n\n cb && cb();\n\n // 触发重绘\n // 暂时全量,TODO 启动局部重绘\n // this.stage.enableDirtyBounds();\n // this.stage.dirty(this.AABBBounds);\n this.addUpdateBoundTag(); // 添加bounds更新tag重绘才会绘制这个mark\n this.stage && this.stage.renderNextFrame();\n }\n\n imageLoadFail(url: string, cb?: () => void) {\n if (!this.resources) {\n return;\n }\n const res = this.resources.get(url);\n if (!res) {\n return;\n }\n res.state = 'fail';\n\n cb && cb();\n }\n\n private _stopAnimates(animates: Map<string | number, IAnimate>) {\n if (animates) {\n animates.forEach(animate => {\n animate.stop();\n });\n }\n }\n\n stopAnimates(stopChildren: boolean = false) {\n this._stopAnimates(this.animates);\n\n if (this.shadowRoot) {\n // 停止所有影子节点的动画\n this.shadowRoot.stopAnimates(true);\n }\n if (this.isContainer && stopChildren) {\n this.forEachChildren((c: IGraphic) => {\n c.stopAnimates(stopChildren);\n });\n }\n }\n\n release(): void {\n this.releaseStatus = 'released';\n this.stopAnimates();\n application.graphicService.onRelease(this);\n }\n\n protected _emitCustomEvent(type: string, context?: any) {\n if (this._events && type in this._events) {\n const changeEvent = new CustomEvent(type, context);\n changeEvent.bubbles = false;\n\n (changeEvent as any).manager = (this.stage as any)?.eventSystem?.manager;\n this.dispatchEvent(changeEvent);\n }\n }\n\n abstract getNoWorkAnimateAttr(): Record<string, number>;\n\n abstract clone(): IGraphic<any>;\n}\n\nGraphic.mixin(EventTarget);\n\nfunction backgroundNotImage(image: any) {\n if (image.fill || image.stroke) {\n return true;\n }\n return false;\n}\n"]}
1
+ {"version":3,"sources":["../src/graphic/graphic.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EACL,UAAU,EACV,MAAM,EACN,eAAe,EACf,KAAK,EACL,KAAK,EACL,GAAG,EACH,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,QAAQ,EACT,MAAM,kBAAkB,CAAC;AAY1B,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAcnC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,YAAY,CAA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eAAwB,KAAK;QACxC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAElC,IAAI,IAAI,CAAC,UAAU,EAAE;YAEnB,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;SACpC;QACD,IAAI,IAAI,CAAC,WAAW,IAAI,YAAY,EAAE;YACpC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAW,EAAE,EAAE;gBACnC,CAAC,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;YAC/B,CAAC,CAAC,CAAC;SACJ;IACH,CAAC;IAED,OAAO;QACL,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC;QAChC,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,WAAW,CAAC,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAES,gBAAgB,CAAC,IAAY,EAAE,OAAa;;QACpD,IAAI,IAAI,CAAC,OAAO,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE;YACxC,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YACnD,WAAW,CAAC,OAAO,GAAG,KAAK,CAAC;YAE3B,WAAmB,CAAC,OAAO,GAAG,MAAA,MAAC,IAAI,CAAC,KAAa,0CAAE,WAAW,0CAAE,OAAO,CAAC;YACzE,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;SACjC;IACH,CAAC;;AAr9CM,qBAAa,GAAiC,EAAE,CAAC;AA49C1D,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;AAE3B,SAAS,kBAAkB,CAAC,KAAU;IACpC,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,MAAM,EAAE;QAC9B,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC","file":"graphic.js","sourcesContent":["import type { ICustomPath2D } from './../interface/path';\nimport type { Dict, IPointLike, IAABBBounds, IOBBBounds } from '@visactor/vutils';\nimport { isArray, max, OBBBounds } from '@visactor/vutils';\nimport {\n AABBBounds,\n Matrix,\n normalTransform,\n Point,\n isNil,\n has,\n isString,\n isValidUrl,\n isBase64,\n isObject\n} from '@visactor/vutils';\nimport type {\n GraphicType,\n IAnimateConfig,\n IGraphicAttribute,\n IGraphic,\n IGraphicAnimateParams,\n IGraphicJson,\n ISetAttributeContext,\n ITransform,\n GraphicReleaseStatus\n} from '../interface/graphic';\nimport { Node } from './node-tree';\nimport type {\n IAnimate,\n IAnimateTarget,\n IGlyphGraphicAttribute,\n IGroup,\n ILayer,\n IPickerService,\n IShadowRoot,\n IStage,\n IStep,\n ISubAnimate,\n ISymbolClass\n} from '../interface';\nimport { EventTarget, CustomEvent } from '../event';\nimport { DefaultTransform } from './config';\nimport { application } from '../application';\nimport { Animate, DefaultStateAnimateConfig, defaultTimeline } from '../animate';\nimport { interpolateColor } from '../color-string/interpolate';\nimport { CustomPath2D } from '../common/custom-path2d';\nimport { ResourceLoader } from '../resource-loader/loader';\nimport { AttributeUpdateType, IContainPointMode, UpdateTag } from '../common/enums';\nimport { BoundsContext } from '../common/bounds-context';\nimport { renderCommandList } from '../common/render-command-list';\nimport { parsePadding } from '../common/utils';\nimport { builtinSymbolsMap, builtInSymbolStrMap, CustomSymbolClass } from './builtin-symbol';\nimport { isSvg, XMLParser } from '../common/xml';\nimport { SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS } from './constants';\n\nconst _tempBounds = new AABBBounds();\n/**\n * pathProxy参考自zrender\n * BSD 3-Clause License\n\n Copyright (c) 2017, Baidu Inc.\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are met:\n\n * Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n * Neither the name of the copyright holder nor the names of its\n contributors may be used to endorse or promote products derived from\n this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\n FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\nconst tempMatrix = new Matrix();\nconst tempBounds = new AABBBounds();\n\nexport const PURE_STYLE_KEY = [\n 'stroke',\n 'opacity',\n 'strokeOpacity',\n 'lineDash',\n 'lineDashOffset',\n 'lineCap',\n 'lineJoin',\n 'miterLimit',\n 'fill',\n 'fillOpacity'\n];\n\nexport const GRAPHIC_UPDATE_TAG_KEY = [\n 'lineWidth',\n // 'lineCap',\n // 'lineJoin',\n // 'miterLimit',\n 'scaleX',\n 'scaleY',\n 'angle',\n 'anchor',\n 'visible'\n];\n\nconst tempConstantXYKey = ['x', 'y'];\nconst tempConstantScaleXYKey = ['scaleX', 'scaleY'];\nconst tempConstantAngleKey = ['angle'];\n\nconst point = new Point();\n\nexport const NOWORK_ANIMATE_ATTR = {\n strokeSeg: 1,\n boundsPadding: 2,\n pickMode: 1,\n boundsMode: 1,\n customPickShape: 1,\n pickable: 1,\n childrenPickable: 1,\n visible: 1,\n zIndex: 1,\n layout: 1,\n keepDirIn3d: 1,\n globalZIndex: 1,\n\n outerBorder: 1,\n innerBorder: 1,\n lineDash: 1,\n lineCap: 1,\n lineJoin: 1,\n miterLimit: 2,\n strokeBoundsBuffer: 2,\n\n scaleCenter: 1,\n anchor: 1,\n anchor3d: 1,\n postMatrix: 1,\n\n backgroundMode: 2,\n background: 1,\n texture: 1,\n cursor: 1,\n html: 1\n};\n\n/**\n * globalTransMatrix更新逻辑\n * 1. group的transform修改,会下发到所有下层group,将所有下层的tag修改\n * 2. 叶子graphic每次获取globalTransMatrix都重新计算\n * 3. 所有节点的transform修改,或者globalTransform修改,都会下发到自己的shadowRoot上\n */\n\nexport abstract class Graphic<T extends Partial<IGraphicAttribute> = Partial<IGraphicAttribute>>\n extends Node\n implements IGraphic<T>, IAnimateTarget\n{\n /**\n * Mixes all enumerable properties and methods from a source object to Element.\n * @param source - The source of properties and methods to mix in.\n */\n static mixin(source: Dict<any>): void {\n // in ES8/ES2017, this would be really easy:\n // Object.defineProperties(Element.prototype, Object.getOwnPropertyDescriptors(source));\n\n // get all the enumerable property keys\n const keys = Object.keys(source);\n\n // loop through properties\n for (let i = 0; i < keys.length; ++i) {\n const propertyName = keys[i];\n\n // Set the property using the property descriptor - this works for accessors and normal value properties\n Object.defineProperty(\n Graphic.prototype,\n propertyName,\n Object.getOwnPropertyDescriptor(source, propertyName) as PropertyDecorator\n );\n }\n }\n\n declare _events?: any;\n\n static userSymbolMap: Record<string, ISymbolClass> = {};\n\n declare onBeforeAttributeUpdate?: (\n val: any,\n attributes: Partial<T>,\n key: null | string | string[],\n context?: ISetAttributeContext\n ) => T | undefined;\n declare parent: any;\n\n declare resources?: Map<\n string | HTMLImageElement | HTMLCanvasElement,\n { state: 'init' | 'loading' | 'success' | 'fail'; data?: HTMLImageElement | HTMLCanvasElement }\n >;\n declare backgroundImg?: boolean;\n\n declare type: GraphicType;\n declare prefixed: string;\n declare numberType: number;\n declare isContainer?: boolean;\n declare valid: boolean;\n declare stage?: IStage;\n declare layer?: ILayer;\n declare incremental?: number;\n declare glyphHost?: IGraphic<IGlyphGraphicAttribute>;\n declare _onSetStage?: (g: IGraphic, stage: IStage, layer: ILayer) => void;\n // declare _beforeAttributeUpdate?: (key: string | string, value: any) => void;\n // 标记是否是在3d模式下\n declare in3dMode?: boolean;\n\n // 不考虑transform的宽高,特殊情况下会使用到\n declare widthWithoutTransform?: number;\n declare heightWithoutTransform?: number;\n\n // aabbBounds,所有图形都需要有,所以初始化即赋值\n protected declare _AABBBounds: IAABBBounds;\n get AABBBounds(): IAABBBounds {\n return this.tryUpdateAABBBounds();\n }\n // 具有旋转的包围盒,部分图元需要,动态初始化\n protected declare _OBBBounds?: IOBBBounds;\n get OBBBounds(): IOBBBounds {\n return this.tryUpdateOBBBounds();\n }\n protected declare _globalAABBBounds: IAABBBounds;\n // 全局包围盒,部分图元需要,动态初始化,建议使用AABBBounds\n get globalAABBBounds(): IAABBBounds {\n return this.tryUpdateGlobalAABBBounds();\n }\n protected declare _transMatrix: Matrix;\n get transMatrix(): Matrix {\n return this.tryUpdateLocalTransMatrix(true);\n }\n protected declare _globalTransMatrix: Matrix;\n get globalTransMatrix(): Matrix {\n return this.tryUpdateGlobalTransMatrix(true);\n }\n protected declare _updateTag: number;\n\n // 上次更新的stamp\n declare stamp?: number;\n\n declare attribute: T;\n\n declare shadowRoot?: IShadowRoot;\n\n declare releaseStatus?: GraphicReleaseStatus;\n\n /** 记录state对应的图形属性 */\n declare states?: Record<string, Partial<T>>;\n /** 当前state值 */\n declare currentStates?: string[];\n /** TODO: state更新对应的动画配置 */\n declare stateAnimateConfig?: IAnimateConfig;\n /** 记录应用state之前,attribute对应的原始图形属性 */\n declare normalAttrs?: Partial<T>;\n /** 获取state图形属性的方法 */\n declare stateProxy?: (stateName: string, targetStates?: string[]) => T;\n declare animates: Map<string | number, IAnimate>;\n\n declare nextAttrs?: T;\n declare prevAttrs?: T;\n declare finalAttrs?: T;\n\n declare pathProxy?: ICustomPath2D;\n // 依附于某个theme,如果该节点不存在parent,那么这个Theme就作为节点的Theme,避免添加到节点前计算属性\n declare attachedThemeGraphic?: IGraphic;\n protected updateAABBBoundsStamp: number;\n protected updateOBBBoundsStamp?: number;\n declare clipPathMap?: Map<string, ISymbolClass>;\n\n constructor(params: T = {} as T) {\n super();\n this._AABBBounds = new AABBBounds();\n this._updateTag = UpdateTag.INIT;\n this.attribute = params;\n this.valid = this.isValid();\n this.updateAABBBoundsStamp = 0;\n if (params.background) {\n this.loadImage((params.background as any).background ?? params.background, true);\n } else if (params.shadowGraphic) {\n this.setShadowGraphic(params.shadowGraphic);\n }\n }\n\n setMode(mode: '2d' | '3d') {\n mode === '3d' ? this.set3dMode() : this.set2dMode();\n }\n\n set3dMode() {\n this.in3dMode = true;\n }\n set2dMode() {\n this.in3dMode = false;\n }\n getOffsetXY(attr?: ITransform, includeScroll: boolean = false) {\n const { dx = attr.dx, dy = attr.dy } = this.attribute;\n if (includeScroll && this.parent) {\n // const groupTheme = getTheme(this.parent).group;\n const attribute = this.parent.attribute;\n point.x = dx + (attribute.scrollX ?? 0);\n point.y = dy + (attribute.scrollY ?? 0);\n } else {\n point.x = dx;\n point.y = dy;\n }\n return point;\n }\n\n onAnimateBind(animate: IAnimate | ISubAnimate) {\n this._emitCustomEvent('animate-bind', animate);\n }\n\n protected tryUpdateAABBBounds(): IAABBBounds {\n const full = this.attribute.boundsMode === 'imprecise';\n if (!this.shouldUpdateAABBBounds()) {\n return this._AABBBounds;\n }\n if (!this.valid) {\n this._AABBBounds.clear();\n return this._AABBBounds;\n }\n\n application.graphicService.beforeUpdateAABBBounds(this, this.stage, true, this._AABBBounds);\n const bounds = this.doUpdateAABBBounds(full);\n // this.addUpdateLayoutTag();\n application.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, true);\n\n // 直接返回空Bounds,但是前面的流程还是要走\n if (this.attribute.boundsMode === 'empty') {\n bounds.clear();\n }\n return bounds;\n }\n\n protected tryUpdateOBBBounds(): IOBBBounds {\n if (!this._OBBBounds) {\n this._OBBBounds = new OBBBounds();\n }\n // 尝试更新AABBBounds\n this.tryUpdateAABBBounds();\n // 如果AABBBounds和OBBBounds不一致,则重新计算OBBBounds\n if (this.updateOBBBoundsStamp === this.updateAABBBoundsStamp) {\n return this._OBBBounds;\n }\n this.updateOBBBoundsStamp = this.updateAABBBoundsStamp;\n if (!this.valid) {\n this._OBBBounds.clear();\n return this._OBBBounds;\n }\n\n const bounds = this.doUpdateOBBBounds();\n return bounds;\n }\n\n protected combindShadowAABBBounds(bounds: IAABBBounds) {\n // 合并shadowRoot的Bounds\n if (this.shadowRoot) {\n const b = this.shadowRoot.AABBBounds.clone();\n bounds.union(b);\n }\n }\n\n abstract getGraphicTheme(): T;\n\n protected doUpdateOBBBounds(): IOBBBounds {\n return this._OBBBounds;\n }\n\n protected abstract updateAABBBounds(\n attribute: T,\n symbolTheme: Required<T>,\n aabbBounds: IAABBBounds,\n full?: boolean\n ): IAABBBounds;\n\n getClipPath() {\n const { clipConfig } = this.attribute;\n if (!clipConfig) {\n return null;\n }\n if (!this.clipPathMap) {\n this.clipPathMap = new Map();\n }\n\n const { shape } = clipConfig;\n let path = this.clipPathMap.get(shape) || null;\n if (!path) {\n // 即使清理,避免内存溢出\n if (this.clipPathMap.size > 10) {\n this.clipPathMap.clear();\n }\n path = this.parsePath(shape);\n path && this.clipPathMap.set(shape, path);\n }\n return path;\n }\n\n parsePath(symbolType: string) {\n if (!symbolType) {\n return null;\n }\n let path = builtinSymbolsMap[symbolType];\n if (path) {\n return path;\n }\n path = Graphic.userSymbolMap[symbolType];\n if (path) {\n return path;\n }\n const _symbolType = builtInSymbolStrMap[symbolType];\n symbolType = _symbolType || symbolType;\n const valid = isSvg(symbolType);\n if (valid === true) {\n const parser = new XMLParser();\n const { svg } = parser.parse(symbolType);\n if (!svg) {\n return null;\n }\n const path = isArray(svg.path) ? svg.path : [svg.path];\n _tempBounds.clear();\n const cacheList: { path: CustomPath2D; attribute: Record<string, any> }[] = [];\n path.forEach((item: any) => {\n const cache = new CustomPath2D().fromString(item.d);\n const attribute: any = {};\n SVG_PARSE_ATTRIBUTE_MAP_KEYS.forEach(k => {\n if (item[k]) {\n (attribute as any)[(SVG_PARSE_ATTRIBUTE_MAP as any)[k]] = item[k];\n }\n });\n // 查找\n cacheList.push({\n path: cache,\n attribute\n });\n _tempBounds.union(cache.bounds);\n });\n const width = _tempBounds.width();\n const height = _tempBounds.height();\n // 规范化到1\n const maxWH = max(width, height);\n const scale = 1 / maxWH;\n cacheList.forEach(cache => cache.path.transform(0, 0, scale, scale));\n\n const _parsedPath = new CustomSymbolClass(symbolType, cacheList, true);\n Graphic.userSymbolMap[symbolType] = _parsedPath;\n return _parsedPath;\n }\n\n const cache = new CustomPath2D().fromString(symbolType);\n const width = cache.bounds.width();\n const height = cache.bounds.height();\n // 规范化到1\n const maxWH = max(width, height);\n const scale = 1 / maxWH;\n cache.transform(0, 0, scale, scale);\n const _parsedPath = new CustomSymbolClass(symbolType, cache);\n Graphic.userSymbolMap[symbolType] = _parsedPath;\n return _parsedPath;\n }\n\n protected doUpdateAABBBounds(full?: boolean): IAABBBounds {\n this.updateAABBBoundsStamp++;\n const graphicTheme = this.getGraphicTheme();\n this._AABBBounds.clear();\n const attribute = this.attribute;\n const bounds = this.updateAABBBounds(attribute, graphicTheme as Required<T>, this._AABBBounds, full) as AABBBounds;\n\n const { boundsPadding = graphicTheme.boundsPadding } = attribute;\n const paddingArray = parsePadding(boundsPadding);\n if (paddingArray) {\n bounds.expand(paddingArray);\n }\n\n this.clearUpdateBoundTag();\n return bounds;\n }\n\n updatePathProxyAABBBounds(aabbBounds: IAABBBounds): boolean {\n const path = typeof this.pathProxy === 'function' ? (this.pathProxy as any)(this.attribute) : this.pathProxy;\n if (!path) {\n return false;\n }\n const boundsContext = new BoundsContext(aabbBounds);\n renderCommandList(path.commandList, boundsContext, 0, 0);\n return true;\n }\n\n protected tryUpdateGlobalAABBBounds(): IAABBBounds {\n const b = this.AABBBounds;\n if (!this._globalAABBBounds) {\n this._globalAABBBounds = b.clone();\n } else {\n this._globalAABBBounds.setValue(b.x1, b.y1, b.x2, b.y2);\n }\n if (this._globalAABBBounds.empty()) {\n return this._globalAABBBounds;\n }\n // 使用parent的grloalAABBBounds\n // todo: 考虑是否需要性能优化\n if (this.parent) {\n this._globalAABBBounds.transformWithMatrix((this.parent as IGroup).globalTransMatrix);\n }\n return this._globalAABBBounds;\n }\n\n /**\n * 这里都是叶子节点的UpdateGlobalTransMatrix函数,只要走进来就直接计算\n * @param clearTag\n * @returns\n */\n protected tryUpdateGlobalTransMatrix(clearTag: boolean = true): Matrix {\n if (!this._globalTransMatrix) {\n this._globalTransMatrix = this.parent\n ? (this.parent as IGroup).globalTransMatrix.clone()\n : this.transMatrix.clone();\n } else if (this.parent) {\n const m = (this.parent as IGroup).globalTransMatrix;\n this._globalTransMatrix.setValue(m.a, m.b, m.c, m.d, m.e, m.f);\n }\n if (this.shouldUpdateGlobalMatrix()) {\n this.doUpdateGlobalMatrix();\n }\n return this._globalTransMatrix;\n }\n\n shouldUpdateGlobalMatrix(): boolean {\n return true;\n }\n\n protected tryUpdateLocalTransMatrix(clearTag: boolean = true) {\n if (!this._transMatrix) {\n this._transMatrix = new Matrix();\n }\n if (this.shouldUpdateLocalMatrix()) {\n this.doUpdateLocalMatrix();\n clearTag && this.clearUpdateLocalPositionTag();\n }\n return this._transMatrix;\n }\n\n shouldUpdateAABBBounds(): boolean {\n // 如果存在shadowRoot,那么判断shadowRoot是否需要更新\n if (this.shadowRoot) {\n return (\n (!!(this._updateTag & UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds()) &&\n application.graphicService.validCheck(\n this.attribute,\n this.getGraphicTheme() as Required<T>,\n this._AABBBounds,\n this\n )\n );\n }\n return (\n !!(this._updateTag & UpdateTag.UPDATE_BOUNDS) &&\n application.graphicService.validCheck(\n this.attribute,\n this.getGraphicTheme() as Required<T>,\n this._AABBBounds,\n this\n )\n );\n }\n\n // 自身变化导致的AABBBounds的变化\n shouldSelfChangeUpdateAABBBounds(): boolean {\n // 如果存在shadowRoot,那么判断shadowRoot是否需要更新\n if (this.shadowRoot) {\n return !!(this._updateTag & UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds();\n }\n return !!(this._updateTag & UpdateTag.UPDATE_BOUNDS);\n }\n\n protected shouldUpdateLocalMatrix(): boolean {\n return !!(this._updateTag & UpdateTag.UPDATE_LOCAL_MATRIX);\n }\n\n isValid(): boolean {\n const attribute = this.attribute;\n return Number.isFinite((attribute.x ?? 0) + (attribute.y ?? 0));\n }\n\n protected _validNumber(num?: number) {\n return num == null || Number.isFinite(num);\n }\n\n shouldUpdateShape(): boolean {\n return !!(this._updateTag & UpdateTag.UPDATE_SHAPE);\n }\n clearUpdateShapeTag() {\n this._updateTag &= UpdateTag.CLEAR_SHAPE;\n }\n\n /**\n * 是否包含某个点(点需要是全局坐标系)\n * @param x\n * @param y\n * @param mode\n * @returns\n */\n containsPoint(x: number, y: number, mode: IContainPointMode, picker?: IPickerService): boolean {\n if (!picker) {\n return false;\n }\n if (mode === IContainPointMode.GLOBAL) {\n // 转换x,y更精准\n const point = new Point(x, y);\n if (this.parent) {\n this.parent.globalTransMatrix.transformPoint(point, point);\n }\n x = point.x;\n y = point.y;\n }\n return picker.containsPoint(this, { x, y });\n }\n\n protected setWidthHeightWithoutTransform(aabbBounds: IAABBBounds) {\n this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1;\n this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1;\n }\n\n setAttributes(params: Partial<T>, forceUpdateTag: boolean = false, context?: ISetAttributeContext) {\n params =\n (this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context)) || params;\n\n if (params.background) {\n this.loadImage(params.background, true);\n } else if (params.shadowGraphic) {\n this.setShadowGraphic(params.shadowGraphic);\n }\n this._setAttributes(params, forceUpdateTag, context);\n }\n\n _setAttributes(params: Partial<T>, forceUpdateTag: boolean = false, context?: ISetAttributeContext) {\n const keys = Object.keys(params);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n\n (this.attribute as any)[key] = (params as any)[key];\n }\n this.valid = this.isValid();\n // 没有设置shape&bounds的tag\n if (!this.updateShapeAndBoundsTagSetted() && (forceUpdateTag || this.needUpdateTags(keys))) {\n this.addUpdateShapeAndBoundsTag();\n } else {\n this.addUpdateBoundTag();\n }\n this.addUpdatePositionTag();\n this.addUpdateLayoutTag();\n this.onAttributeUpdate(context);\n }\n\n setAttribute(key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext) {\n const params =\n this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate({ [key]: value }, this.attribute, key, context);\n if (!params) {\n if (!isNil((this.normalAttrs as any)?.[key])) {\n (this.normalAttrs as any)[key] = value;\n } else {\n (this.attribute as any)[key] = value;\n this.valid = this.isValid();\n if (!this.updateShapeAndBoundsTagSetted() && (forceUpdateTag || this.needUpdateTag(key))) {\n this.addUpdateShapeAndBoundsTag();\n } else {\n this.addUpdateBoundTag();\n }\n this.addUpdatePositionTag();\n this.addUpdateLayoutTag();\n this.onAttributeUpdate(context);\n }\n } else {\n this._setAttributes(params, forceUpdateTag, context);\n }\n if (key === 'background') {\n this.loadImage(value, true);\n } else if (key === 'shadowGraphic') {\n this.setShadowGraphic(value);\n }\n }\n\n protected needUpdateTags(keys: string[], k: string[] = GRAPHIC_UPDATE_TAG_KEY): boolean {\n for (let i = 0; i < k.length; i++) {\n const attrKey = k[i];\n if (keys.indexOf(attrKey) !== -1) {\n return true;\n }\n }\n return false;\n }\n\n protected needUpdateTag(key: string, k: string[] = GRAPHIC_UPDATE_TAG_KEY): boolean {\n for (let i = 0; i < k.length; i++) {\n const attrKey = k[i];\n if (key === attrKey) {\n return true;\n }\n }\n return false;\n }\n\n initAttributes(params: T) {\n // this.setAttributes(params, true);\n const context = { type: AttributeUpdateType.INIT };\n params =\n (this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context)) || params;\n this.attribute = params;\n if (params.background) {\n this.loadImage(params.background, true);\n } else if (params.shadowGraphic) {\n this.setShadowGraphic(params.shadowGraphic);\n }\n this._updateTag = UpdateTag.INIT;\n this.valid = this.isValid();\n this.onAttributeUpdate(context);\n }\n\n translate(x: number, y: number) {\n if (x === 0 && y === 0) {\n return this;\n }\n const context = {\n type: AttributeUpdateType.TRANSLATE\n };\n const params =\n this.onBeforeAttributeUpdate &&\n this.onBeforeAttributeUpdate({ x, y }, this.attribute, tempConstantXYKey, context);\n if (params) {\n x = params.x;\n y = params.y;\n delete params.x;\n delete params.y;\n this._setAttributes(params);\n }\n const attribute = this.attribute;\n const postMatrix = attribute.postMatrix;\n if (!postMatrix) {\n attribute.x = (attribute.x ?? DefaultTransform.x) + x;\n attribute.y = (attribute.y ?? DefaultTransform.y) + y;\n } else {\n application.transformUtil.fromMatrix(postMatrix, postMatrix).translate(x, y);\n }\n\n this.addUpdatePositionTag();\n this.addUpdateBoundTag();\n this.addUpdateLayoutTag();\n this.onAttributeUpdate(context);\n return this;\n }\n\n translateTo(x: number, y: number) {\n const attribute = this.attribute;\n if (attribute.x === x && attribute.y === y) {\n return this;\n }\n const context = {\n type: AttributeUpdateType.TRANSLATE_TO\n };\n const params =\n this.onBeforeAttributeUpdate &&\n this.onBeforeAttributeUpdate({ x, y }, this.attribute, tempConstantXYKey, context);\n if (params) {\n this._setAttributes(params, false, context);\n return this;\n }\n attribute.x = x;\n attribute.y = y;\n this.addUpdatePositionTag();\n this.addUpdateBoundTag();\n this.addUpdateLayoutTag();\n this.onAttributeUpdate(context);\n return this;\n }\n\n scale(scaleX: number, scaleY: number, scaleCenter?: IPointLike) {\n if (scaleX === 1 && scaleY === 1) {\n return this;\n }\n const context = {\n type: AttributeUpdateType.SCALE\n };\n const params =\n this.onBeforeAttributeUpdate &&\n this.onBeforeAttributeUpdate({ scaleX, scaleY, scaleCenter }, this.attribute, tempConstantScaleXYKey, context);\n if (params) {\n scaleX = params.scaleX;\n scaleY = params.scaleY;\n delete params.scaleX;\n delete params.scaleY;\n this._setAttributes(params);\n }\n const attribute = this.attribute;\n if (!scaleCenter) {\n attribute.scaleX = (attribute.scaleX ?? DefaultTransform.scaleX) * scaleX;\n attribute.scaleY = (attribute.scaleY ?? DefaultTransform.scaleY) * scaleY;\n } else {\n let { postMatrix } = this.attribute;\n if (!postMatrix) {\n postMatrix = new Matrix();\n attribute.postMatrix = postMatrix;\n }\n application.transformUtil.fromMatrix(postMatrix, postMatrix).scale(scaleX, scaleY, scaleCenter);\n }\n this.addUpdatePositionTag();\n this.addUpdateBoundTag();\n this.addUpdateLayoutTag();\n this.onAttributeUpdate(context);\n return this;\n }\n\n scaleTo(scaleX: number, scaleY: number) {\n const attribute = this.attribute;\n if (attribute.scaleX === scaleX && attribute.scaleY === scaleY) {\n return this;\n }\n const context = {\n type: AttributeUpdateType.SCALE_TO\n };\n const params =\n this.onBeforeAttributeUpdate &&\n this.onBeforeAttributeUpdate({ scaleX, scaleY }, this.attribute, tempConstantScaleXYKey, context);\n if (params) {\n this._setAttributes(params, false, context);\n return this;\n }\n attribute.scaleX = scaleX;\n attribute.scaleY = scaleY;\n this.addUpdatePositionTag();\n this.addUpdateBoundTag();\n this.addUpdateLayoutTag();\n this.onAttributeUpdate(context);\n return this;\n }\n\n rotate(angle: number, rotateCenter?: IPointLike) {\n if (angle === 0) {\n return this;\n }\n const context = { type: AttributeUpdateType.ROTATE };\n const params =\n this.onBeforeAttributeUpdate &&\n this.onBeforeAttributeUpdate({ angle, rotateCenter }, this.attribute, tempConstantAngleKey, context);\n if (params) {\n delete params.angle;\n this._setAttributes(params, false, context);\n // return this;\n }\n const attribute = this.attribute;\n if (!rotateCenter) {\n attribute.angle = (attribute.angle ?? DefaultTransform.angle) + angle;\n } else {\n let { postMatrix } = this.attribute;\n if (!postMatrix) {\n postMatrix = new Matrix();\n attribute.postMatrix = postMatrix;\n }\n application.transformUtil.fromMatrix(postMatrix, postMatrix).rotate(angle, rotateCenter);\n }\n this.addUpdatePositionTag();\n this.addUpdateBoundTag();\n this.addUpdateLayoutTag();\n this.onAttributeUpdate(context);\n return this;\n }\n\n rotateTo(angle: number) {\n const attribute = this.attribute;\n if (attribute.angle === angle) {\n return this;\n }\n const context = {\n type: AttributeUpdateType.ROTATE_TO\n };\n const params =\n this.onBeforeAttributeUpdate &&\n this.onBeforeAttributeUpdate(angle, this.attribute, tempConstantAngleKey, context);\n if (params) {\n this._setAttributes(params, false, context);\n return this;\n }\n attribute.angle = angle;\n this.addUpdatePositionTag();\n this.addUpdateBoundTag();\n this.addUpdateLayoutTag();\n this.onAttributeUpdate(context);\n return this;\n }\n\n skewTo(b: number, c: number) {\n return this;\n }\n\n animate(params?: IGraphicAnimateParams) {\n if (!this.animates) {\n this.animates = new Map();\n }\n const animate = new Animate(\n params?.id,\n params?.timeline ?? (this.stage && this.stage.getTimeline()),\n params?.slience\n );\n\n animate.bind(this);\n if (params) {\n const { onStart, onFrame, onEnd, onRemove } = params;\n onStart != null && animate.onStart(onStart);\n onFrame != null && animate.onFrame(onFrame);\n onEnd != null && animate.onEnd(onEnd);\n onRemove != null && animate.onRemove(onRemove);\n animate.interpolateFunc = params.interpolate;\n }\n this.animates.set(animate.id, animate);\n animate.onRemove(() => {\n animate.stop();\n this.animates.delete(animate.id);\n });\n\n return animate;\n }\n\n onAttributeUpdate(context?: ISetAttributeContext) {\n if (context && context.skipUpdateCallback) {\n return;\n }\n application.graphicService.onAttributeUpdate(this);\n this._emitCustomEvent('afterAttributeUpdate', context);\n }\n\n // hasListener(event: string) {\n // const prefix = this.prefixed;\n // var evt = prefix ? prefix + event : event;\n // return this._events[evt];\n // }\n\n update(d?: { bounds: boolean; trans: boolean }) {\n if (d) {\n d.bounds && this.tryUpdateAABBBounds();\n d.trans && this.tryUpdateLocalTransMatrix();\n } else {\n this.tryUpdateAABBBounds();\n this.tryUpdateLocalTransMatrix();\n }\n }\n\n hasState(stateName?: string) {\n if (!this.currentStates || !this.currentStates.length) {\n return false;\n }\n\n if (!isNil(stateName)) {\n return this.currentStates.includes(stateName);\n }\n\n return true;\n }\n getState(stateName: string) {\n return this.states?.[stateName];\n }\n\n applyStateAttrs(attrs: Partial<T>, stateNames: string[], hasAnimation?: boolean, isClear?: boolean) {\n if (hasAnimation) {\n const keys = Object.keys(attrs);\n const noWorkAttrs = this.getNoWorkAnimateAttr();\n const animateAttrs: Partial<T> = {};\n let noAnimateAttrs: Partial<T> | undefined;\n\n keys.forEach(key => {\n if (!noWorkAttrs[key]) {\n (animateAttrs as any)[key] =\n isClear && (attrs as any)[key] === undefined ? this.getDefaultAttribute(key) : (attrs as any)[key];\n } else {\n if (!noAnimateAttrs) {\n noAnimateAttrs = {};\n }\n (noAnimateAttrs as any)[key] = (attrs as any)[key];\n }\n });\n\n const animate = this.animate({ slience: true });\n (animate as any).stateNames = stateNames;\n animate.to(\n animateAttrs,\n this.stateAnimateConfig?.duration ?? DefaultStateAnimateConfig.duration,\n this.stateAnimateConfig?.easing ?? DefaultStateAnimateConfig.easing\n );\n noAnimateAttrs && this.setAttributes(noAnimateAttrs, false, { type: AttributeUpdateType.STATE });\n } else {\n this.stopStateAnimates();\n this.setAttributes(attrs, false, { type: AttributeUpdateType.STATE });\n }\n }\n\n updateNormalAttrs(stateAttrs: Partial<T>) {\n const newNormalAttrs = {};\n if (this.normalAttrs) {\n Object.keys(stateAttrs).forEach(key => {\n if (key in this.normalAttrs) {\n (newNormalAttrs as any)[key] = (this.normalAttrs as any)[key];\n delete (this.normalAttrs as any)[key];\n } else {\n (newNormalAttrs as any)[key] = this.getNormalAttribute(key);\n }\n });\n Object.keys(this.normalAttrs).forEach(key => {\n (stateAttrs as any)[key] = (this.normalAttrs as any)[key];\n });\n } else {\n Object.keys(stateAttrs).forEach(key => {\n (newNormalAttrs as any)[key] = this.getNormalAttribute(key);\n });\n }\n\n this.normalAttrs = newNormalAttrs;\n }\n\n protected stopStateAnimates(type: 'start' | 'end' = 'end') {\n if (this.animates) {\n this.animates.forEach(animate => {\n if ((animate as any).stateNames) {\n animate.stop(type);\n this.animates.delete(animate.id);\n }\n });\n }\n }\n\n private getNormalAttribute(key: string) {\n let value = (this.attribute as any)[key];\n\n if (this.animates) {\n this.animates.forEach(animate => {\n if ((animate as any).stateNames) {\n const endProps = animate.getEndProps();\n if (has(endProps, key)) {\n value = endProps[key];\n }\n }\n });\n }\n\n return value;\n }\n\n clearStates(hasAnimation?: boolean) {\n if (this.hasState() && this.normalAttrs) {\n this.currentStates = [];\n this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, true);\n } else {\n this.currentStates = [];\n }\n this.normalAttrs = null;\n }\n\n removeState(stateName: string | string[], hasAnimation?: boolean) {\n if (this.currentStates) {\n const filter = isArray(stateName) ? (s: string) => !stateName.includes(s) : (s: string) => s !== stateName;\n const newStates = this.currentStates.filter(filter);\n\n if (newStates.length !== this.currentStates.length) {\n this.useStates(newStates, hasAnimation);\n }\n }\n }\n\n toggleState(stateName: string, hasAnimation?: boolean) {\n if (this.hasState(stateName)) {\n this.removeState(stateName, hasAnimation);\n } else {\n const index = this.currentStates ? this.currentStates.indexOf(stateName) : -1;\n if (index < 0) {\n const nextStates = this.currentStates ? this.currentStates.slice() : [];\n nextStates.push(stateName);\n this.useStates(nextStates, hasAnimation);\n }\n }\n }\n\n addState(stateName: string, keepCurrentStates?: boolean, hasAnimation?: boolean) {\n if (\n this.currentStates &&\n this.currentStates.includes(stateName) &&\n (keepCurrentStates || this.currentStates.length === 1)\n ) {\n return;\n }\n\n const newStates =\n keepCurrentStates && this.currentStates?.length ? this.currentStates.concat([stateName]) : [stateName];\n\n this.useStates(newStates, hasAnimation);\n }\n\n useStates(states: string[], hasAnimation?: boolean) {\n if (!states.length) {\n this.clearStates(hasAnimation);\n return;\n }\n\n const isChange =\n this.currentStates?.length !== states.length ||\n states.some((stateName, index) => this.currentStates[index] !== stateName);\n\n if (!isChange) {\n return;\n }\n\n const stateAttrs = {};\n states.forEach(stateName => {\n const attrs = this.stateProxy ? this.stateProxy(stateName, states) : this.states?.[stateName];\n\n if (attrs) {\n Object.assign(stateAttrs, attrs);\n }\n });\n\n this.updateNormalAttrs(stateAttrs);\n\n this.currentStates = states;\n this.applyStateAttrs(stateAttrs, states, hasAnimation);\n }\n\n addUpdateBoundTag() {\n this._updateTag |= UpdateTag.UPDATE_BOUNDS; // for bounds\n if (this.parent) {\n this.parent.addChildUpdateBoundTag();\n }\n if (this.glyphHost) {\n this.glyphHost.addUpdateBoundTag();\n }\n }\n\n addUpdateShapeTag() {\n this._updateTag |= UpdateTag.UPDATE_SHAPE; // for shape\n }\n\n addUpdateShapeAndBoundsTag() {\n this._updateTag |= UpdateTag.UPDATE_SHAPE_AND_BOUNDS; // for shape&bounds\n if (this.parent) {\n this.parent.addChildUpdateBoundTag();\n }\n if (this.glyphHost) {\n this.glyphHost.addUpdateBoundTag();\n }\n }\n\n protected updateShapeAndBoundsTagSetted(): boolean {\n return (this._updateTag & UpdateTag.UPDATE_SHAPE_AND_BOUNDS) === UpdateTag.UPDATE_SHAPE_AND_BOUNDS;\n }\n\n protected clearUpdateBoundTag() {\n this._updateTag &= UpdateTag.CLEAR_BOUNDS;\n }\n /**\n * 更新位置tag,包括全局tag和局部tag\n */\n addUpdatePositionTag() {\n // 更新shadowRoot的全局位置\n this.shadowRoot && this.shadowRoot.addUpdateGlobalPositionTag();\n this._updateTag |= UpdateTag.UPDATE_GLOBAL_LOCAL_MATRIX;\n }\n /**\n * 更新全局位置tag\n */\n addUpdateGlobalPositionTag() {\n // 更新shadowRoot的全局位置\n this.shadowRoot && this.shadowRoot.addUpdateGlobalPositionTag();\n this._updateTag |= UpdateTag.UPDATE_GLOBAL_MATRIX;\n }\n /**\n * 清除局部位置tag\n */\n protected clearUpdateLocalPositionTag() {\n this._updateTag &= UpdateTag.CLEAR_LOCAL_MATRIX;\n }\n /**\n * 清除全局位置tag\n */\n protected clearUpdateGlobalPositionTag() {\n this._updateTag &= UpdateTag.CLEAR_GLOBAL_MATRIX;\n }\n\n addUpdateLayoutTag() {\n this._updateTag |= UpdateTag.UPDATE_LAYOUT;\n }\n\n protected clearUpdateLayoutTag() {\n this._updateTag &= UpdateTag.CLEAR_LAYOUT;\n }\n\n protected needUpdateLayout(): boolean {\n return !!(this._updateTag & UpdateTag.UPDATE_LAYOUT);\n }\n\n protected getAnchor(anchor: [string | number, string | number], params: { b?: IAABBBounds }) {\n const _anchor: [number, number] = [0, 0];\n const getBounds = () => {\n if (params.b) {\n return params.b;\n }\n const { scaleX, scaleY, angle, scaleCenter } = this.attribute;\n // 拷贝一份,避免计算bounds的过程中计算matrix,然后matrix又修改了bounds\n tempBounds.copy(this._AABBBounds);\n // @ts-ignore\n this.setAttributes({ angle: 0, scaleCenter: null });\n params.b = this.AABBBounds.clone();\n this._AABBBounds.copy(tempBounds);\n // @ts-ignore\n this.setAttributes({ scaleX, scaleY, angle, scaleCenter });\n return params.b;\n };\n if (typeof anchor[0] === 'string') {\n const ratio = parseFloat(anchor[0]) / 100;\n const bounds = getBounds();\n _anchor[0] = bounds.x1 + (bounds.x2 - bounds.x1) * ratio;\n } else {\n _anchor[0] = anchor[0];\n }\n if (typeof anchor[1] === 'string') {\n const ratio = parseFloat(anchor[1]) / 100;\n const bounds = getBounds();\n _anchor[1] = bounds.y1 + (bounds.y2 - bounds.y1) * ratio;\n } else {\n _anchor[1] = anchor[1];\n }\n\n return _anchor;\n }\n\n /**\n * 更新局部matrix的具体函数\n */\n protected doUpdateLocalMatrix() {\n const {\n x = DefaultTransform.x,\n y = DefaultTransform.y,\n scaleX = DefaultTransform.scaleX,\n scaleY = DefaultTransform.scaleY,\n angle = DefaultTransform.angle,\n scaleCenter,\n anchor,\n postMatrix\n } = this.attribute;\n let _anchor: [number, number] = [0, 0];\n const params = {};\n if (anchor && angle) {\n _anchor = this.getAnchor(anchor, params);\n }\n if (scaleCenter && (scaleX !== 1 || scaleY !== 1)) {\n const m = this._transMatrix;\n m.reset();\n m.translate(_anchor[0], _anchor[1]);\n m.rotate(angle);\n m.translate(-_anchor[0], -_anchor[1]);\n\n m.translate(x, y);\n // m.translate(scaleCenter[0] * scaleX, scaleCenter[1] * scaleY);\n // 计算bounds\n _anchor = this.getAnchor(scaleCenter, params);\n application.transformUtil.fromMatrix(m, m).scale(scaleX, scaleY, { x: _anchor[0], y: _anchor[1] });\n // m.translate(-scaleCenter[0], -scaleCenter[1]);\n } else {\n normalTransform(this._transMatrix, this._transMatrix.reset(), x, y, scaleX, scaleY, angle, anchor && _anchor);\n }\n const p = this.getOffsetXY(DefaultTransform);\n this._transMatrix.e += p.x;\n this._transMatrix.f += p.y;\n\n if (postMatrix) {\n const m1 = tempMatrix.setValue(\n postMatrix.a,\n postMatrix.b,\n postMatrix.c,\n postMatrix.d,\n postMatrix.e,\n postMatrix.f\n );\n const m2 = this._transMatrix;\n m1.multiply(m2.a, m2.b, m2.c, m2.d, m2.e, m2.f);\n m2.setValue(m1.a, m1.b, m1.c, m1.d, m1.e, m1.f);\n }\n }\n /**\n * 更新全局matrix的具体函数\n */\n protected doUpdateGlobalMatrix() {\n // 基于parent的matrix修改\n if (this.parent) {\n this._globalTransMatrix.multiply(\n this.transMatrix.a,\n this.transMatrix.b,\n this.transMatrix.c,\n this.transMatrix.d,\n this.transMatrix.e,\n this.transMatrix.f\n );\n const { scrollX = 0, scrollY = 0 } = this.parent.attribute;\n this._globalTransMatrix.translate(scrollX, scrollY);\n }\n }\n\n setStage(stage?: IStage, layer?: ILayer) {\n if (this.stage !== stage) {\n this.stage = stage;\n this.layer = layer;\n this.setStageToShadowRoot(stage, layer);\n if (this.animates && this.animates.size) {\n // 设置timeline为所属的stage上的timeline,但如果timeline并不是默认的timeline,就不用覆盖\n const timeline = stage.getTimeline();\n this.animates.forEach(a => {\n if (a.timeline === defaultTimeline) {\n a.setTimeline(timeline);\n }\n });\n }\n this._onSetStage && this._onSetStage(this, stage, layer);\n application.graphicService.onSetStage(this, stage);\n }\n }\n\n setStageToShadowRoot(stage?: IStage, layer?: ILayer) {\n if (this.shadowRoot) {\n this.shadowRoot.setStage(stage, layer);\n }\n }\n\n onAddStep(step: IStep) {\n return;\n }\n onStop(props?: Partial<T>): void {\n if (props) {\n this.setAttributes(props, false, { type: AttributeUpdateType.ANIMATE_END });\n }\n }\n // step时调用\n onStep(subAnimate: ISubAnimate, animate: IAnimate, step: IStep, ratio: number, end: boolean) {\n const nextAttributes = {};\n if (step.customAnimate) {\n step.customAnimate.update(end, ratio, nextAttributes);\n } else {\n const nextProps = step.props;\n const nextParsedProps = step.parsedProps;\n const propKeys = step.propKeys;\n this.stepInterpolate(\n subAnimate,\n animate,\n nextAttributes,\n step,\n ratio,\n end,\n nextProps,\n undefined,\n nextParsedProps,\n propKeys\n );\n }\n this.setAttributes(nextAttributes, false, {\n type: AttributeUpdateType.ANIMATE_UPDATE,\n animationState: {\n ratio,\n end,\n step,\n isFirstFrameOfStep: subAnimate.getLastStep() !== step\n }\n });\n this.stage && this.stage.renderNextFrame();\n }\n\n stepInterpolate(\n subAnimate: ISubAnimate,\n animate: IAnimate,\n nextAttributes: Record<string, any>,\n step: IStep,\n ratio: number,\n end: boolean,\n nextProps: Record<string, any>,\n lastProps?: Record<string, any>,\n nextParsedProps?: any,\n propKeys?: string[]\n ) {\n if (!propKeys) {\n propKeys = Object.keys(nextProps);\n step.propKeys = propKeys;\n }\n if (end) {\n step.propKeys.forEach(key => {\n if (!animate.validAttr(key)) {\n return;\n }\n nextAttributes[key] = nextProps[key];\n });\n } else {\n propKeys.forEach(key => {\n // 如果属性不合法,那直接return\n if (!animate.validAttr(key)) {\n return;\n }\n const nextStepVal = nextProps[key];\n const lastStepVal = (lastProps && lastProps[key]) ?? subAnimate.getLastPropByName(key, step);\n if (nextStepVal == null || lastStepVal == null || nextStepVal === lastStepVal) {\n // 用户直接调用stepInterpolate可能会走进来,如果传入的参数出现null或者undefined,直接赋值最终的值\n nextAttributes[key] = nextStepVal;\n return;\n }\n let match: boolean;\n match =\n animate.interpolateFunc && animate.interpolateFunc(key, ratio, lastStepVal, nextStepVal, nextAttributes);\n if (match) {\n return;\n }\n match = animate.customInterpolate(key, ratio, lastStepVal, nextStepVal, this, nextAttributes);\n if (match) {\n return;\n }\n if (!this.defaultInterpolate(nextStepVal, lastStepVal, key, nextAttributes, nextParsedProps, ratio)) {\n this._interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes);\n }\n });\n }\n\n step.parsedProps = nextParsedProps;\n }\n\n defaultInterpolate(\n nextStepVal: any,\n lastStepVal: any,\n key: string,\n nextAttributes: Record<string, any>,\n nextParsedProps: any,\n ratio: number\n ) {\n if (Number.isFinite(nextStepVal) && Number.isFinite(lastStepVal)) {\n nextAttributes[key] = lastStepVal + (nextStepVal - lastStepVal) * ratio;\n return true;\n } else if (key === 'fill') {\n if (!nextParsedProps) {\n nextParsedProps = {};\n }\n // 保存解析的结果到step\n const fillColorArray: [number, number, number, number] = nextParsedProps.fillColorArray;\n const color = interpolateColor(lastStepVal, fillColorArray ?? nextStepVal, ratio, false, (fArray, tArray) => {\n nextParsedProps.fillColorArray = tArray;\n });\n if (color) {\n nextAttributes[key] = color;\n }\n return true;\n } else if (key === 'stroke') {\n if (!nextParsedProps) {\n nextParsedProps = {};\n }\n // 保存解析的结果到step\n const strokeColorArray: [number, number, number, number] = nextParsedProps.strokeColorArray;\n const color = interpolateColor(lastStepVal, strokeColorArray ?? nextStepVal, ratio, false, (fArray, tArray) => {\n nextParsedProps.strokeColorArray = tArray;\n });\n if (color) {\n nextAttributes[key] = color;\n }\n return true;\n } else if (key === 'shadowColor') {\n if (!nextParsedProps) {\n nextParsedProps = {};\n }\n // 保存解析的结果到step\n const shadowColorArray: [number, number, number, number] = nextParsedProps.shadowColorArray;\n const color = interpolateColor(lastStepVal, shadowColorArray ?? nextStepVal, ratio, true, (fArray, tArray) => {\n nextParsedProps.shadowColorArray = tArray;\n });\n if (color) {\n nextAttributes[key] = color;\n }\n\n return true;\n } else if (Array.isArray(nextStepVal) && nextStepVal.length === lastStepVal.length) {\n const nextList = [];\n let valid = true;\n for (let i = 0; i < nextStepVal.length; i++) {\n const v = lastStepVal[i];\n const val = v + (nextStepVal[i] - v) * ratio;\n if (!Number.isFinite(val)) {\n valid = false;\n break;\n }\n nextList.push(val);\n }\n if (valid) {\n nextAttributes[key] = nextList;\n }\n }\n\n return false;\n }\n\n protected _interpolate(key: string, ratio: number, lastStepVal: any, nextStepVal: any, nextAttributes: any) {\n return;\n }\n\n getDefaultAttribute(name: string) {\n return (this.getGraphicTheme() as any)[name];\n }\n\n // 获取属性\n getComputedAttribute(name: string) {\n return (this.attribute as any)[name] ?? this.getDefaultAttribute(name);\n }\n /**\n * 添加onSetStage钩子\n * @param cb 回调函数\n * @param immediate 是否立刻执行,如果在回调添加之前stage就已经绑定,那么如果第二个参数为true就立刻执行回调\n */\n onSetStage(cb: (g: IGraphic, stage: IStage) => void, immediate: boolean = false) {\n this._onSetStage = cb;\n if (immediate && this.stage) {\n cb(this, this.stage);\n }\n }\n\n /******************** shadow graphic *********************/\n attachShadow(shadowRoot?: IShadowRoot) {\n if (shadowRoot) {\n shadowRoot.shadowHost = this;\n }\n\n this.shadowRoot = shadowRoot ?? application.graphicService.creator.shadowRoot(this);\n this.addUpdateBoundTag();\n this.shadowRoot.setStage(this.stage, this.layer);\n return this.shadowRoot;\n }\n\n detachShadow() {\n if (this.shadowRoot) {\n this.addUpdateBoundTag();\n this.shadowRoot.release(true);\n this.shadowRoot = null;\n }\n }\n\n toJson(): IGraphicJson {\n return {\n attribute: this.attribute,\n _uid: this._uid,\n type: this.type,\n name: this.name,\n children: this.children.map((item: IGraphic) => item.toJson())\n };\n }\n\n createPathProxy(path?: string) {\n if (isString(path, true)) {\n this.pathProxy = new CustomPath2D().fromString(path as string);\n } else {\n this.pathProxy = new CustomPath2D();\n }\n\n return this.pathProxy;\n }\n\n loadImage(image: any, background: boolean = false) {\n if (!image || (background && backgroundNotImage(image))) {\n return;\n }\n const url = image;\n if (!this.resources) {\n this.resources = new Map();\n }\n const cache: {\n state: 'loading' | 'success' | 'init' | 'fail';\n data: any;\n } = {\n data: 'init',\n state: null\n };\n this.resources.set(url, cache);\n if (typeof image === 'string') {\n cache.state = 'loading';\n if (image.startsWith('<svg')) {\n // TODO 封装isSvg到@visactor/vutils\n ResourceLoader.GetSvg(image, this);\n this.backgroundImg = this.backgroundImg || background;\n } else if (isValidUrl(image) || image.includes('/') || isBase64(image)) {\n ResourceLoader.GetImage(image, this);\n this.backgroundImg = this.backgroundImg || background;\n }\n } else if (isObject(image)) {\n (cache.state = 'success'), (cache.data = image);\n this.backgroundImg = this.backgroundImg || background;\n } else {\n cache.state = 'fail';\n }\n }\n\n setShadowGraphic(graphic: IGraphic) {\n if (!graphic) {\n this.detachShadow();\n } else {\n const root = this.attachShadow();\n root.add(graphic);\n }\n }\n\n imageLoadSuccess(url: string, image: HTMLImageElement, cb?: () => void) {\n // 更新属性\n // this.resourceState = 'success';\n // this.resource = image;\n if (!this.resources) {\n return;\n }\n const res = this.resources.get(url);\n if (!res) {\n return;\n }\n res.state = 'success';\n res.data = image;\n\n cb && cb();\n\n // 触发重绘\n // 暂时全量,TODO 启动局部重绘\n // this.stage.enableDirtyBounds();\n // this.stage.dirty(this.AABBBounds);\n this.addUpdateBoundTag(); // 添加bounds更新tag重绘才会绘制这个mark\n this.stage && this.stage.renderNextFrame();\n }\n\n imageLoadFail(url: string, cb?: () => void) {\n if (!this.resources) {\n return;\n }\n const res = this.resources.get(url);\n if (!res) {\n return;\n }\n res.state = 'fail';\n\n cb && cb();\n }\n\n private _stopAnimates(animates: Map<string | number, IAnimate>) {\n if (animates) {\n animates.forEach(animate => {\n animate.stop();\n });\n }\n }\n\n stopAnimates(stopChildren: boolean = false) {\n this._stopAnimates(this.animates);\n\n if (this.shadowRoot) {\n // 停止所有影子节点的动画\n this.shadowRoot.stopAnimates(true);\n }\n if (this.isContainer && stopChildren) {\n this.forEachChildren((c: IGraphic) => {\n c.stopAnimates(stopChildren);\n });\n }\n }\n\n release(): void {\n this.releaseStatus = 'released';\n this.stopAnimates();\n application.graphicService.onRelease(this);\n }\n\n protected _emitCustomEvent(type: string, context?: any) {\n if (this._events && type in this._events) {\n const changeEvent = new CustomEvent(type, context);\n changeEvent.bubbles = false;\n\n (changeEvent as any).manager = (this.stage as any)?.eventSystem?.manager;\n this.dispatchEvent(changeEvent);\n }\n }\n\n abstract getNoWorkAnimateAttr(): Record<string, number>;\n\n abstract clone(): IGraphic<any>;\n}\n\nGraphic.mixin(EventTarget);\n\nfunction backgroundNotImage(image: any) {\n if (image.fill || image.stroke) {\n return true;\n }\n return false;\n}\n"]}
@@ -86,7 +86,8 @@ export class Image extends Graphic {
86
86
  }
87
87
  const {tb1: tb1, tb2: tb2} = application.graphicService.updateTempAABBBounds(aabbBounds);
88
88
  return updateBoundsOfCommonOuterBorder(attribute, imageTheme, tb1), aabbBounds.union(tb1),
89
- tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2), application.graphicService.transformAABBBounds(attribute, aabbBounds, imageTheme, !1, this),
89
+ tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2), this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1,
90
+ this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1, application.graphicService.transformAABBBounds(attribute, aabbBounds, imageTheme, !1, this),
90
91
  aabbBounds;
91
92
  }
92
93
  getDefaultAttribute(name) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/image.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,gB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EAAE,oBAAoB,CAAC,CAAC;IAC1D,CAAC;IACS,aAAa,CAAC,GAAW;QACjC,OAAO,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC;IACxD,CAAC;IAED,KAAK;QACH,OAAO,IAAI,KAAK,mBAAM,IAAI,CAAC,SAAS,EAAG,CAAC;IAC1C,CAAC;IAED,oBAAoB;QAClB,OAAO,KAAK,CAAC,mBAAmB,CAAC;IACnC,CAAC;;AApLM,yBAAmB,mBACxB,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,CAAC,EACV,OAAO,EAAE,CAAC,IACP,mBAAmB,EACtB;AAkLJ,MAAM,UAAU,WAAW,CAAC,UAAkC;IAC5D,OAAO,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;AAC/B,CAAC","file":"image.js","sourcesContent":["import type { IAABBBounds } from '@visactor/vutils';\nimport type { IImage, IImageGraphicAttribute, IRepeatType, ISetAttributeContext } from '../interface';\nimport { Graphic, GRAPHIC_UPDATE_TAG_KEY, NOWORK_ANIMATE_ATTR } from './graphic';\nimport { DefaultImageAttribute } from './config';\nimport { getTheme } from './theme';\nimport { application } from '../application';\nimport { IMAGE_NUMBER_TYPE } from './constants';\nimport { updateBoundsOfCommonOuterBorder } from './graphic-service/common-outer-boder-bounds';\n\nconst IMAGE_UPDATE_TAG_KEY = ['width', 'height', 'image', ...GRAPHIC_UPDATE_TAG_KEY];\n\n/**\n * TODO image 需要考虑加载问题 等load模块\n * 同时需要在Graphic增加 图片填充 or 图片按形状clip功能\n */\nexport class Image extends Graphic<IImageGraphicAttribute> implements IImage {\n type: 'image' = 'image';\n // 资源加载完成后回调,外部通过回调获取图片资源尺寸\n successCallback?: () => void;\n failCallback?: () => void;\n declare _actualWidth?: number;\n declare _actualHeight?: number;\n\n static NOWORK_ANIMATE_ATTR = {\n image: 1,\n repeatX: 1,\n repeatY: 1,\n ...NOWORK_ANIMATE_ATTR\n };\n\n constructor(params: IImageGraphicAttribute) {\n super(params);\n this.numberType = IMAGE_NUMBER_TYPE;\n\n this.loadImage(this.attribute.image);\n }\n\n getImageElement(): HTMLImageElement | HTMLCanvasElement | null {\n const { image } = this.attribute;\n if (!image || !this.resources) {\n return null;\n }\n const res = this.resources.get(image);\n if (res.state !== 'success') {\n return null;\n }\n return res.data;\n }\n\n get width(): number {\n this.tryUpdateAABBBounds();\n return this._actualWidth;\n }\n // set width(width: number) {\n // if (this.attribute.width === width) {\n // this.attribute.width = width;\n // this.addUpdateShapeAndBoundsTag();\n // }\n // }\n\n get height(): number {\n this.tryUpdateAABBBounds();\n return this._actualHeight;\n }\n // set height(height: number) {\n // if (this.attribute.height === height) {\n // this.attribute.height = height;\n // this.addUpdateShapeAndBoundsTag();\n // }\n // }\n get repeatX(): IRepeatType {\n return this.attribute.repeatX ?? 'no-repeat';\n }\n set repeatX(repeatX: IRepeatType) {\n if (this.attribute.repeatX === repeatX) {\n this.attribute.repeatX = repeatX;\n }\n }\n get repeatY(): IRepeatType {\n return this.attribute.repeatY ?? 'no-repeat';\n }\n set repeatY(repeatY: IRepeatType) {\n if (this.attribute.repeatY === repeatY) {\n this.attribute.repeatY = repeatY;\n }\n }\n get image(): string | HTMLImageElement | HTMLCanvasElement {\n return this.attribute.image;\n }\n set image(image: string | HTMLImageElement | HTMLCanvasElement) {\n if (image !== this.attribute.image) {\n this.attribute.image = image;\n this.loadImage(this.attribute.image);\n // this.addUpdateShapeAndBoundsTag();\n }\n }\n\n imageLoadSuccess(url: string, image: HTMLImageElement, cb?: () => void): void {\n super.imageLoadSuccess(url, image, () => {\n if (this.successCallback) {\n this.successCallback();\n }\n });\n this.addUpdateBoundTag();\n }\n\n imageLoadFail(url: string, cb?: () => void): void {\n super.imageLoadFail(url, () => {\n if (this.failCallback) {\n this.failCallback();\n }\n });\n }\n\n setAttributes(\n params: Partial<IImageGraphicAttribute>,\n forceUpdateTag?: boolean,\n context?: ISetAttributeContext\n ): void {\n if (params.image) {\n this.loadImage(params.image);\n }\n return super.setAttributes(params, forceUpdateTag, context);\n }\n\n setAttribute(key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext): void {\n if (key === 'image') {\n this.loadImage(value);\n }\n return super.setAttribute(key, value, forceUpdateTag, context);\n }\n\n getGraphicTheme(): Required<IImageGraphicAttribute> {\n return getTheme(this).image;\n }\n\n protected updateAABBBounds(\n attribute: IImageGraphicAttribute,\n imageTheme: Required<IImageGraphicAttribute>,\n aabbBounds: IAABBBounds\n ) {\n if (!this.updatePathProxyAABBBounds(aabbBounds)) {\n const { maxWidth = imageTheme.maxWidth, maxHeight = imageTheme.maxHeight } = attribute;\n let { width, height } = attribute;\n if (width == null || height == null) {\n const imageElement = this.getImageElement();\n if (imageElement) {\n // 如果给了width或者height,那就使用已给的width或者height来按比例缩放,否则就在maxWidth和maxHeight之间按比例缩放\n const imageWidth = imageElement.width;\n const imageHeight = imageElement.height;\n if (width != null) {\n height = width * (imageHeight / imageWidth);\n } else if (height != null) {\n width = height * (imageWidth / imageHeight);\n } else {\n // 如果width和height都没有给,那就使用maxWidth和maxHeight来按比例缩放\n const imageRatio = imageWidth / imageHeight;\n const maxWHRatio = maxWidth / maxHeight;\n if (imageRatio > maxWHRatio) {\n width = maxWidth;\n height = maxWidth / imageRatio;\n } else {\n height = maxHeight;\n width = maxHeight * imageRatio;\n }\n }\n } else {\n width = maxWidth;\n height = maxHeight;\n }\n }\n this._actualWidth = width;\n this._actualHeight = height;\n aabbBounds.set(0, 0, width, height);\n }\n\n const { tb1, tb2 } = application.graphicService.updateTempAABBBounds(aabbBounds);\n\n updateBoundsOfCommonOuterBorder(attribute, imageTheme, tb1);\n aabbBounds.union(tb1);\n tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);\n\n application.graphicService.transformAABBBounds(attribute, aabbBounds, imageTheme, false, this);\n return aabbBounds;\n }\n\n getDefaultAttribute(name: string) {\n return (DefaultImageAttribute as any)[name];\n }\n\n protected needUpdateTags(keys: string[]): boolean {\n return super.needUpdateTags(keys, IMAGE_UPDATE_TAG_KEY);\n }\n protected needUpdateTag(key: string): boolean {\n return super.needUpdateTag(key, IMAGE_UPDATE_TAG_KEY);\n }\n\n clone() {\n return new Image({ ...this.attribute });\n }\n\n getNoWorkAnimateAttr(): Record<string, number> {\n return Image.NOWORK_ANIMATE_ATTR;\n }\n}\n\nexport function createImage(attributes: IImageGraphicAttribute): IImage {\n return new Image(attributes);\n}\n"]}
1
+ {"version":3,"sources":["../src/graphic/image.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,+BAA+B,EAAE,MAAM,6CAA6C,CAAC;AAE9F,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,sBAAsB,CAAC,CAAC;AAMrF,MAAM,OAAO,KAAM,SAAQ,OAA+B;IAexD,YAAY,MAA8B;QACxC,KAAK,CAAC,MAAM,CAAC,CAAC;QAfhB,SAAI,GAAY,OAAO,CAAC;QAgBtB,IAAI,CAAC,UAAU,GAAG,iBAAiB,CAAC;QAEpC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAED,eAAe;QACb,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC;QACjC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YAC7B,OAAO,IAAI,CAAC;SACb;QACD,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,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vutils';\nimport type { IImage, IImageGraphicAttribute, IRepeatType, ISetAttributeContext } from '../interface';\nimport { Graphic, GRAPHIC_UPDATE_TAG_KEY, NOWORK_ANIMATE_ATTR } from './graphic';\nimport { DefaultImageAttribute } from './config';\nimport { getTheme } from './theme';\nimport { application } from '../application';\nimport { IMAGE_NUMBER_TYPE } from './constants';\nimport { updateBoundsOfCommonOuterBorder } from './graphic-service/common-outer-boder-bounds';\n\nconst IMAGE_UPDATE_TAG_KEY = ['width', 'height', 'image', ...GRAPHIC_UPDATE_TAG_KEY];\n\n/**\n * TODO image 需要考虑加载问题 等load模块\n * 同时需要在Graphic增加 图片填充 or 图片按形状clip功能\n */\nexport class Image extends Graphic<IImageGraphicAttribute> implements IImage {\n type: 'image' = 'image';\n // 资源加载完成后回调,外部通过回调获取图片资源尺寸\n successCallback?: () => void;\n failCallback?: () => void;\n declare _actualWidth?: number;\n declare _actualHeight?: number;\n\n static NOWORK_ANIMATE_ATTR = {\n image: 1,\n repeatX: 1,\n repeatY: 1,\n ...NOWORK_ANIMATE_ATTR\n };\n\n constructor(params: IImageGraphicAttribute) {\n super(params);\n this.numberType = IMAGE_NUMBER_TYPE;\n\n this.loadImage(this.attribute.image);\n }\n\n getImageElement(): HTMLImageElement | HTMLCanvasElement | null {\n const { image } = this.attribute;\n if (!image || !this.resources) {\n return null;\n }\n const res = this.resources.get(image);\n if (res.state !== 'success') {\n return null;\n }\n return res.data;\n }\n\n get width(): number {\n this.tryUpdateAABBBounds();\n return this._actualWidth;\n }\n // set width(width: number) {\n // if (this.attribute.width === width) {\n // this.attribute.width = width;\n // this.addUpdateShapeAndBoundsTag();\n // }\n // }\n\n get height(): number {\n this.tryUpdateAABBBounds();\n return this._actualHeight;\n }\n // set height(height: number) {\n // if (this.attribute.height === height) {\n // this.attribute.height = height;\n // this.addUpdateShapeAndBoundsTag();\n // }\n // }\n get repeatX(): IRepeatType {\n return this.attribute.repeatX ?? 'no-repeat';\n }\n set repeatX(repeatX: IRepeatType) {\n if (this.attribute.repeatX === repeatX) {\n this.attribute.repeatX = repeatX;\n }\n }\n get repeatY(): IRepeatType {\n return this.attribute.repeatY ?? 'no-repeat';\n }\n set repeatY(repeatY: IRepeatType) {\n if (this.attribute.repeatY === repeatY) {\n this.attribute.repeatY = repeatY;\n }\n }\n get image(): string | HTMLImageElement | HTMLCanvasElement {\n return this.attribute.image;\n }\n set image(image: string | HTMLImageElement | HTMLCanvasElement) {\n if (image !== this.attribute.image) {\n this.attribute.image = image;\n this.loadImage(this.attribute.image);\n // this.addUpdateShapeAndBoundsTag();\n }\n }\n\n imageLoadSuccess(url: string, image: HTMLImageElement, cb?: () => void): void {\n super.imageLoadSuccess(url, image, () => {\n if (this.successCallback) {\n this.successCallback();\n }\n });\n this.addUpdateBoundTag();\n }\n\n imageLoadFail(url: string, cb?: () => void): void {\n super.imageLoadFail(url, () => {\n if (this.failCallback) {\n this.failCallback();\n }\n });\n }\n\n setAttributes(\n params: Partial<IImageGraphicAttribute>,\n forceUpdateTag?: boolean,\n context?: ISetAttributeContext\n ): void {\n if (params.image) {\n this.loadImage(params.image);\n }\n return super.setAttributes(params, forceUpdateTag, context);\n }\n\n setAttribute(key: string, value: any, forceUpdateTag?: boolean, context?: ISetAttributeContext): void {\n if (key === 'image') {\n this.loadImage(value);\n }\n return super.setAttribute(key, value, forceUpdateTag, context);\n }\n\n getGraphicTheme(): Required<IImageGraphicAttribute> {\n return getTheme(this).image;\n }\n\n protected updateAABBBounds(\n attribute: IImageGraphicAttribute,\n imageTheme: Required<IImageGraphicAttribute>,\n aabbBounds: IAABBBounds\n ) {\n if (!this.updatePathProxyAABBBounds(aabbBounds)) {\n const { maxWidth = imageTheme.maxWidth, maxHeight = imageTheme.maxHeight } = attribute;\n let { width, height } = attribute;\n if (width == null || height == null) {\n const imageElement = this.getImageElement();\n if (imageElement) {\n // 如果给了width或者height,那就使用已给的width或者height来按比例缩放,否则就在maxWidth和maxHeight之间按比例缩放\n const imageWidth = imageElement.width;\n const imageHeight = imageElement.height;\n if (width != null) {\n height = width * (imageHeight / imageWidth);\n } else if (height != null) {\n width = height * (imageWidth / imageHeight);\n } else {\n // 如果width和height都没有给,那就使用maxWidth和maxHeight来按比例缩放\n const imageRatio = imageWidth / imageHeight;\n const maxWHRatio = maxWidth / maxHeight;\n if (imageRatio > maxWHRatio) {\n width = maxWidth;\n height = maxWidth / imageRatio;\n } else {\n height = maxHeight;\n width = maxHeight * imageRatio;\n }\n }\n } else {\n width = maxWidth;\n height = maxHeight;\n }\n }\n this._actualWidth = width;\n this._actualHeight = height;\n aabbBounds.set(0, 0, width, height);\n }\n\n const { tb1, tb2 } = application.graphicService.updateTempAABBBounds(aabbBounds);\n\n updateBoundsOfCommonOuterBorder(attribute, imageTheme, tb1);\n aabbBounds.union(tb1);\n tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);\n\n this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1;\n this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1;\n\n application.graphicService.transformAABBBounds(attribute, aabbBounds, imageTheme, false, this);\n return aabbBounds;\n }\n\n getDefaultAttribute(name: string) {\n return (DefaultImageAttribute as any)[name];\n }\n\n protected needUpdateTags(keys: string[]): boolean {\n return super.needUpdateTags(keys, IMAGE_UPDATE_TAG_KEY);\n }\n protected needUpdateTag(key: string): boolean {\n return super.needUpdateTag(key, IMAGE_UPDATE_TAG_KEY);\n }\n\n clone() {\n return new Image({ ...this.attribute });\n }\n\n getNoWorkAnimateAttr(): Record<string, number> {\n return Image.NOWORK_ANIMATE_ATTR;\n }\n}\n\nexport function createImage(attributes: IImageGraphicAttribute): IImage {\n return new Image(attributes);\n}\n"]}
@@ -13,6 +13,7 @@ export * from './path';
13
13
  export * from './area';
14
14
  export * from './image';
15
15
  export * from './arc';
16
+ export * from './star';
16
17
  export * from './arc3d';
17
18
  export * from './group';
18
19
  export * from './polygon';
@@ -28,6 +28,8 @@ export * from "./image";
28
28
 
29
29
  export * from "./arc";
30
30
 
31
+ export * from "./star";
32
+
31
33
  export * from "./arc3d";
32
34
 
33
35
  export * from "./group";
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/graphic/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,mCAAmC,CAAC;AAClD,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC","file":"index.js","sourcesContent":["export * from './node-tree';\nexport * from './circle';\nexport * from './text';\nexport * from './wrap-text';\nexport * from './symbol';\nexport * from './builtin-symbol';\nexport * from './line';\nexport * from './rect';\nexport * from './rect3d';\nexport * from './glyph';\nexport * from './richtext';\nexport * from './path';\nexport * from './area';\nexport * from './image';\nexport * from './arc';\nexport * from './arc3d';\nexport * from './group';\nexport * from './polygon';\nexport * from './pyramid3d';\nexport * from './shadow-root';\nexport * from './config';\nexport * from './graphic-service/graphic-service';\nexport * from './graphic-creator';\nexport * from './builtin-symbol';\nexport * from './graphic';\nexport * from './bounds';\nexport * from './theme';\nexport * from './tools';\nexport * from './constants';\n"]}
1
+ {"version":3,"sources":["../src/graphic/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,mCAAmC,CAAC;AAClD,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC","file":"index.js","sourcesContent":["export * from './node-tree';\nexport * from './circle';\nexport * from './text';\nexport * from './wrap-text';\nexport * from './symbol';\nexport * from './builtin-symbol';\nexport * from './line';\nexport * from './rect';\nexport * from './rect3d';\nexport * from './glyph';\nexport * from './richtext';\nexport * from './path';\nexport * from './area';\nexport * from './image';\nexport * from './arc';\nexport * from './star';\nexport * from './arc3d';\nexport * from './group';\nexport * from './polygon';\nexport * from './pyramid3d';\nexport * from './shadow-root';\nexport * from './config';\nexport * from './graphic-service/graphic-service';\nexport * from './graphic-creator';\nexport * from './builtin-symbol';\nexport * from './graphic';\nexport * from './bounds';\nexport * from './theme';\nexport * from './tools';\nexport * from './constants';\n"]}