@visactor/vrender 0.15.1 → 0.15.2

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 (153) hide show
  1. package/cjs/common/polygon.d.ts +3 -3
  2. package/cjs/common/polygon.js +8 -4
  3. package/cjs/common/polygon.js.map +1 -1
  4. package/cjs/core/contributions/env/wx-contribution.d.ts +1 -1
  5. package/cjs/core/contributions/env/wx-contribution.js +3 -3
  6. package/cjs/core/contributions/env/wx-contribution.js.map +1 -1
  7. package/cjs/graphic/arc.d.ts +31 -0
  8. package/cjs/graphic/arc.js +6 -1
  9. package/cjs/graphic/arc.js.map +1 -1
  10. package/cjs/graphic/arc3d.d.ts +31 -0
  11. package/cjs/graphic/arc3d.js +7 -2
  12. package/cjs/graphic/arc3d.js.map +1 -1
  13. package/cjs/graphic/area.d.ts +32 -0
  14. package/cjs/graphic/area.js +7 -1
  15. package/cjs/graphic/area.js.map +1 -1
  16. package/cjs/graphic/circle.d.ts +30 -0
  17. package/cjs/graphic/circle.js +4 -1
  18. package/cjs/graphic/circle.js.map +1 -1
  19. package/cjs/graphic/config.js +2 -1
  20. package/cjs/graphic/config.js.map +1 -1
  21. package/cjs/graphic/glyph.d.ts +30 -0
  22. package/cjs/graphic/glyph.js +4 -1
  23. package/cjs/graphic/glyph.js.map +1 -1
  24. package/cjs/graphic/graphic.d.ts +30 -0
  25. package/cjs/graphic/graphic.js +31 -1
  26. package/cjs/graphic/graphic.js.map +1 -1
  27. package/cjs/graphic/group.d.ts +30 -0
  28. package/cjs/graphic/group.js +4 -1
  29. package/cjs/graphic/group.js.map +1 -1
  30. package/cjs/graphic/image.d.ts +33 -0
  31. package/cjs/graphic/image.js +8 -1
  32. package/cjs/graphic/image.js.map +1 -1
  33. package/cjs/graphic/line.d.ts +32 -0
  34. package/cjs/graphic/line.js +7 -1
  35. package/cjs/graphic/line.js.map +1 -1
  36. package/cjs/graphic/path.d.ts +32 -0
  37. package/cjs/graphic/path.js +7 -1
  38. package/cjs/graphic/path.js.map +1 -1
  39. package/cjs/graphic/polygon.d.ts +30 -0
  40. package/cjs/graphic/polygon.js +4 -1
  41. package/cjs/graphic/polygon.js.map +1 -1
  42. package/cjs/graphic/pyramid3d.d.ts +30 -0
  43. package/cjs/graphic/pyramid3d.js +5 -2
  44. package/cjs/graphic/pyramid3d.js.map +1 -1
  45. package/cjs/graphic/rect.d.ts +30 -0
  46. package/cjs/graphic/rect.js +4 -1
  47. package/cjs/graphic/rect.js.map +1 -1
  48. package/cjs/graphic/rect3d.d.ts +30 -0
  49. package/cjs/graphic/rect3d.js +5 -2
  50. package/cjs/graphic/rect3d.js.map +1 -1
  51. package/cjs/graphic/richtext.d.ts +37 -0
  52. package/cjs/graphic/richtext.js +12 -1
  53. package/cjs/graphic/richtext.js.map +1 -1
  54. package/cjs/graphic/symbol.d.ts +31 -0
  55. package/cjs/graphic/symbol.js +6 -1
  56. package/cjs/graphic/symbol.js.map +1 -1
  57. package/cjs/graphic/text.d.ts +37 -0
  58. package/cjs/graphic/text.js +13 -2
  59. package/cjs/graphic/text.js.map +1 -1
  60. package/cjs/graphic/wrap-text.d.ts +1 -0
  61. package/cjs/graphic/wrap-text.js +3 -0
  62. package/cjs/graphic/wrap-text.js.map +1 -1
  63. package/cjs/index.d.ts +1 -1
  64. package/cjs/index.js +1 -1
  65. package/cjs/index.js.map +1 -1
  66. package/cjs/interface/graphic/polygon.d.ts +1 -0
  67. package/cjs/interface/graphic/polygon.js.map +1 -1
  68. package/cjs/interface/graphic.d.ts +1 -0
  69. package/cjs/interface/graphic.js.map +1 -1
  70. package/cjs/render/contributions/render/line-render.js +1 -1
  71. package/cjs/render/contributions/render/line-render.js.map +1 -1
  72. package/cjs/render/contributions/render/polygon-render.js +3 -3
  73. package/cjs/render/contributions/render/polygon-render.js.map +1 -1
  74. package/cjs/render/contributions/render/utils.js +4 -3
  75. package/cjs/render/contributions/render/utils.js.map +1 -1
  76. package/dist/index.js +133 -17
  77. package/dist/index.min.js +1 -1
  78. package/es/common/polygon.d.ts +3 -3
  79. package/es/common/polygon.js +8 -4
  80. package/es/common/polygon.js.map +1 -1
  81. package/es/core/contributions/env/wx-contribution.d.ts +1 -1
  82. package/es/core/contributions/env/wx-contribution.js +3 -3
  83. package/es/core/contributions/env/wx-contribution.js.map +1 -1
  84. package/es/graphic/arc.d.ts +31 -0
  85. package/es/graphic/arc.js +8 -1
  86. package/es/graphic/arc.js.map +1 -1
  87. package/es/graphic/arc3d.d.ts +31 -0
  88. package/es/graphic/arc3d.js +9 -0
  89. package/es/graphic/arc3d.js.map +1 -1
  90. package/es/graphic/area.d.ts +32 -0
  91. package/es/graphic/area.js +9 -1
  92. package/es/graphic/area.js.map +1 -1
  93. package/es/graphic/circle.d.ts +30 -0
  94. package/es/graphic/circle.js +6 -1
  95. package/es/graphic/circle.js.map +1 -1
  96. package/es/graphic/config.js +2 -1
  97. package/es/graphic/config.js.map +1 -1
  98. package/es/graphic/glyph.d.ts +30 -0
  99. package/es/graphic/glyph.js +6 -1
  100. package/es/graphic/glyph.js.map +1 -1
  101. package/es/graphic/graphic.d.ts +30 -0
  102. package/es/graphic/graphic.js +30 -0
  103. package/es/graphic/graphic.js.map +1 -1
  104. package/es/graphic/group.d.ts +30 -0
  105. package/es/graphic/group.js +6 -1
  106. package/es/graphic/group.js.map +1 -1
  107. package/es/graphic/image.d.ts +33 -0
  108. package/es/graphic/image.js +10 -1
  109. package/es/graphic/image.js.map +1 -1
  110. package/es/graphic/line.d.ts +32 -0
  111. package/es/graphic/line.js +9 -1
  112. package/es/graphic/line.js.map +1 -1
  113. package/es/graphic/path.d.ts +32 -0
  114. package/es/graphic/path.js +9 -1
  115. package/es/graphic/path.js.map +1 -1
  116. package/es/graphic/polygon.d.ts +30 -0
  117. package/es/graphic/polygon.js +6 -1
  118. package/es/graphic/polygon.js.map +1 -1
  119. package/es/graphic/pyramid3d.d.ts +30 -0
  120. package/es/graphic/pyramid3d.js +7 -0
  121. package/es/graphic/pyramid3d.js.map +1 -1
  122. package/es/graphic/rect.d.ts +30 -0
  123. package/es/graphic/rect.js +6 -1
  124. package/es/graphic/rect.js.map +1 -1
  125. package/es/graphic/rect3d.d.ts +30 -0
  126. package/es/graphic/rect3d.js +7 -0
  127. package/es/graphic/rect3d.js.map +1 -1
  128. package/es/graphic/richtext.d.ts +37 -0
  129. package/es/graphic/richtext.js +14 -1
  130. package/es/graphic/richtext.js.map +1 -1
  131. package/es/graphic/symbol.d.ts +31 -0
  132. package/es/graphic/symbol.js +7 -2
  133. package/es/graphic/symbol.js.map +1 -1
  134. package/es/graphic/text.d.ts +37 -0
  135. package/es/graphic/text.js +15 -2
  136. package/es/graphic/text.js.map +1 -1
  137. package/es/graphic/wrap-text.d.ts +1 -0
  138. package/es/graphic/wrap-text.js +3 -0
  139. package/es/graphic/wrap-text.js.map +1 -1
  140. package/es/index.d.ts +1 -1
  141. package/es/index.js +1 -1
  142. package/es/index.js.map +1 -1
  143. package/es/interface/graphic/polygon.d.ts +1 -0
  144. package/es/interface/graphic/polygon.js.map +1 -1
  145. package/es/interface/graphic.d.ts +1 -0
  146. package/es/interface/graphic.js.map +1 -1
  147. package/es/render/contributions/render/line-render.js +1 -1
  148. package/es/render/contributions/render/line-render.js.map +1 -1
  149. package/es/render/contributions/render/polygon-render.js +3 -3
  150. package/es/render/contributions/render/polygon-render.js.map +1 -1
  151. package/es/render/contributions/render/utils.js +2 -2
  152. package/es/render/contributions/render/utils.js.map +1 -1
  153. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -9398,7 +9398,7 @@
9398
9398
  const DefaultPathAttribute = Object.assign(Object.assign({}, DefaultAttribute), { path: new CustomPath2D(), customPath: () => {
9399
9399
  console.warn('空函数');
9400
9400
  } });
9401
- const DefaultPolygonAttribute = Object.assign(Object.assign({}, DefaultAttribute), { points: [], cornerRadius: 0 });
9401
+ const DefaultPolygonAttribute = Object.assign(Object.assign({}, DefaultAttribute), { points: [], cornerRadius: 0, closePath: true });
9402
9402
  const DefaultRectAttribute = Object.assign(Object.assign({}, DefaultAttribute), { width: 0, height: 0, strokeBoundsBuffer: 0, cornerRadius: 0 });
9403
9403
  const DefaultRect3dAttribute = Object.assign(Object.assign({}, DefaultAttribute), { width: 0, height: 0, cornerRadius: 0, length: 0 });
9404
9404
  const DefaultSymbolAttribute = Object.assign(Object.assign({}, DefaultAttribute), { symbolType: 'circle', size: 10, keepDirIn3d: true });
@@ -17130,6 +17130,35 @@
17130
17130
  const tempConstantScaleXYKey = ['scaleX', 'scaleY'];
17131
17131
  const tempConstantAngleKey = ['angle'];
17132
17132
  const point = new Point();
17133
+ const NOWORK_ANIMATE_ATTR = {
17134
+ strokeSeg: 1,
17135
+ boundsPadding: 2,
17136
+ pickMode: 1,
17137
+ boundsMode: 1,
17138
+ customPickShape: 1,
17139
+ pickable: 1,
17140
+ childrenPickable: 1,
17141
+ visible: 1,
17142
+ zIndex: 1,
17143
+ layout: 1,
17144
+ keepDirIn3d: 1,
17145
+ outerBorder: 1,
17146
+ innerBorder: 1,
17147
+ lineDash: 1,
17148
+ lineCap: 1,
17149
+ lineJoin: 1,
17150
+ miterLimit: 2,
17151
+ strokeBoundsBuffer: 2,
17152
+ scaleCenter: 1,
17153
+ anchor: 1,
17154
+ anchor3d: 1,
17155
+ postMatrix: 1,
17156
+ backgroundMode: 2,
17157
+ background: 1,
17158
+ texture: 1,
17159
+ cursor: 1,
17160
+ html: 1
17161
+ };
17133
17162
  class Graphic extends Node {
17134
17163
  static mixin(source) {
17135
17164
  const keys = Object.keys(source);
@@ -20417,7 +20446,11 @@
20417
20446
  clone() {
20418
20447
  return new Group(Object.assign({}, this.attribute));
20419
20448
  }
20449
+ getNoWorkAnimateAttr() {
20450
+ return Group.NOWORK_ANIMATE_ATTR;
20451
+ }
20420
20452
  }
20453
+ Group.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
20421
20454
 
20422
20455
  const LayerHandlerContribution = Symbol.for('LayerHandlerContribution');
20423
20456
  class Layer extends Group {
@@ -20972,6 +21005,9 @@
20972
21005
  context.moveTo(cx + xors, cy + yors);
20973
21006
  context.arc(cx, cy, outerRadius, outerStartAngle, outerEndAngle, !clockwise);
20974
21007
  }
21008
+ else {
21009
+ context.moveTo(cx + outerRadius * cos(outerEndAngle), cy + (yore !== null && yore !== void 0 ? yore : 0));
21010
+ }
20975
21011
  }
20976
21012
  if (!(innerRadius > epsilon) || innerDeltaAngle < 0.001) {
20977
21013
  if (!partStroke || partStroke[1]) {
@@ -21039,7 +21075,7 @@
21039
21075
  context.closePath();
21040
21076
  }
21041
21077
  else if (partStroke[3]) {
21042
- context.lineTo(cx + outerRadius * cos(endAngle), cy + outerRadius * cos(endAngle));
21078
+ context.lineTo(cx + outerRadius * cos(startAngle), cy + outerRadius * sin(startAngle));
21043
21079
  }
21044
21080
  return collapsedToLine;
21045
21081
  }
@@ -21697,7 +21733,11 @@
21697
21733
  clone() {
21698
21734
  return new Circle(Object.assign({}, this.attribute));
21699
21735
  }
21736
+ getNoWorkAnimateAttr() {
21737
+ return Circle.NOWORK_ANIMATE_ATTR;
21738
+ }
21700
21739
  }
21740
+ Circle.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
21701
21741
 
21702
21742
  function getContextFont(text, defaultAttr = {}, fontSizeScale) {
21703
21743
  if (!fontSizeScale) {
@@ -21903,6 +21943,8 @@
21903
21943
  'fontWeight',
21904
21944
  'ellipsis',
21905
21945
  'lineHeight',
21946
+ 'direction',
21947
+ 'wordBreak',
21906
21948
  ...GRAPHIC_UPDATE_TAG_KEY
21907
21949
  ];
21908
21950
  class Text extends Graphic {
@@ -22225,7 +22267,11 @@
22225
22267
  clone() {
22226
22268
  return new Text(Object.assign({}, this.attribute));
22227
22269
  }
22270
+ getNoWorkAnimateAttr() {
22271
+ return Text.NOWORK_ANIMATE_ATTR;
22272
+ }
22228
22273
  }
22274
+ Text.NOWORK_ANIMATE_ATTR = Object.assign({ ellipsis: 1, wordBreak: 1, direction: 1, textAlign: 1, textBaseline: 1, fontFamily: 1, fontWeight: 1 }, NOWORK_ANIMATE_ATTR);
22229
22275
 
22230
22276
  const WRAP_TEXT_UPDATE_TAG_KEY = ['heightLimit', 'lineClamp'];
22231
22277
  class WrapText extends Text {
@@ -22360,6 +22406,9 @@
22360
22406
  }
22361
22407
  return super.needUpdateTag(key);
22362
22408
  }
22409
+ getNoWorkAnimateAttr() {
22410
+ return WrapText.NOWORK_ANIMATE_ATTR;
22411
+ }
22363
22412
  }
22364
22413
 
22365
22414
  function circle(ctx, r, x, y, z) {
@@ -23366,8 +23415,12 @@
23366
23415
  clone() {
23367
23416
  return new Symbol(Object.assign({}, this.attribute));
23368
23417
  }
23418
+ getNoWorkAnimateAttr() {
23419
+ return Symbol.NOWORK_ANIMATE_ATTR;
23420
+ }
23369
23421
  };
23370
23422
  Symbol$1.userSymbolMap = {};
23423
+ Symbol$1.NOWORK_ANIMATE_ATTR = Object.assign({ symbolType: 1 }, NOWORK_ANIMATE_ATTR);
23371
23424
 
23372
23425
  const LINE_UPDATE_TAG_KEY = ['segments', 'points', 'curveType', ...GRAPHIC_UPDATE_TAG_KEY];
23373
23426
  let Line$1 = class Line extends Graphic {
@@ -23472,7 +23525,11 @@
23472
23525
  clone() {
23473
23526
  return new Line(Object.assign({}, this.attribute));
23474
23527
  }
23528
+ getNoWorkAnimateAttr() {
23529
+ return Line.NOWORK_ANIMATE_ATTR;
23530
+ }
23475
23531
  };
23532
+ Line$1.NOWORK_ANIMATE_ATTR = Object.assign({ segments: 1, curveType: 1 }, NOWORK_ANIMATE_ATTR);
23476
23533
 
23477
23534
  const RECT_UPDATE_TAG_KEY = ['width', 'height', 'cornerRadius', ...GRAPHIC_UPDATE_TAG_KEY];
23478
23535
  class Rect extends Graphic {
@@ -23540,7 +23597,11 @@
23540
23597
  clone() {
23541
23598
  return new Rect(Object.assign({}, this.attribute));
23542
23599
  }
23600
+ getNoWorkAnimateAttr() {
23601
+ return Rect.NOWORK_ANIMATE_ATTR;
23602
+ }
23543
23603
  }
23604
+ Rect.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
23544
23605
 
23545
23606
  const CUBE_VERTICES = [
23546
23607
  [0, 0, 0],
@@ -23588,7 +23649,11 @@
23588
23649
  ];
23589
23650
  return faces;
23590
23651
  }
23652
+ getNoWorkAnimateAttr() {
23653
+ return Rect3d.NOWORK_ANIMATE_ATTR;
23654
+ }
23591
23655
  }
23656
+ Rect3d.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
23592
23657
 
23593
23658
  class Glyph extends Graphic {
23594
23659
  constructor(params) {
@@ -23754,7 +23819,11 @@
23754
23819
  glyph.setSubGraphic(this.subGraphic.map(g => g.clone()));
23755
23820
  return glyph;
23756
23821
  }
23822
+ getNoWorkAnimateAttr() {
23823
+ return Glyph.NOWORK_ANIMATE_ATTR;
23824
+ }
23757
23825
  }
23826
+ Glyph.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
23758
23827
 
23759
23828
  class Frame {
23760
23829
  constructor(left, top, width, height, ellipsis, wordBreak, verticalDirection, globalAlign, globalBaseline, layoutDirection, isWidthMax, isHeightMax, singleLine, icons) {
@@ -24306,7 +24375,11 @@
24306
24375
  clone() {
24307
24376
  return new Image(Object.assign({}, this.attribute));
24308
24377
  }
24378
+ getNoWorkAnimateAttr() {
24379
+ return Image.NOWORK_ANIMATE_ATTR;
24380
+ }
24309
24381
  }
24382
+ Image.NOWORK_ANIMATE_ATTR = Object.assign({ image: 1, repeatX: 1, repeatY: 1 }, NOWORK_ANIMATE_ATTR);
24310
24383
 
24311
24384
  class RichTextIcon extends Image {
24312
24385
  constructor(params) {
@@ -24914,7 +24987,11 @@
24914
24987
  });
24915
24988
  return pickIcon;
24916
24989
  }
24990
+ getNoWorkAnimateAttr() {
24991
+ return RichText.NOWORK_ANIMATE_ATTR;
24992
+ }
24917
24993
  }
24994
+ RichText.NOWORK_ANIMATE_ATTR = Object.assign({ ellipsis: 1, wordBreak: 1, verticalDirection: 1, textAlign: 1, textBaseline: 1, textConfig: 1, layoutDirection: 1 }, NOWORK_ANIMATE_ATTR);
24918
24995
 
24919
24996
  const PATH_UPDATE_TAG_KEY = ['path', 'customPath', ...GRAPHIC_UPDATE_TAG_KEY];
24920
24997
  class Path extends Graphic {
@@ -25008,7 +25085,11 @@
25008
25085
  clone() {
25009
25086
  return new Path(Object.assign({}, this.attribute));
25010
25087
  }
25088
+ getNoWorkAnimateAttr() {
25089
+ return Path.NOWORK_ANIMATE_ATTR;
25090
+ }
25011
25091
  }
25092
+ Path.NOWORK_ANIMATE_ATTR = Object.assign({ path: 1, customPath: 1 }, NOWORK_ANIMATE_ATTR);
25012
25093
 
25013
25094
  const AREA_UPDATE_TAG_KEY = ['segments', 'points', 'curveType', ...GRAPHIC_UPDATE_TAG_KEY];
25014
25095
  class Area extends Graphic {
@@ -25122,7 +25203,11 @@
25122
25203
  clone() {
25123
25204
  return new Area(Object.assign({}, this.attribute));
25124
25205
  }
25206
+ getNoWorkAnimateAttr() {
25207
+ return Area.NOWORK_ANIMATE_ATTR;
25208
+ }
25125
25209
  }
25210
+ Area.NOWORK_ANIMATE_ATTR = Object.assign({ segments: 1, curveType: 1 }, NOWORK_ANIMATE_ATTR);
25126
25211
 
25127
25212
  const ARC_UPDATE_TAG_KEY = [
25128
25213
  'innerRadius',
@@ -25326,7 +25411,11 @@
25326
25411
  clone() {
25327
25412
  return new Arc(Object.assign({}, this.attribute));
25328
25413
  }
25414
+ getNoWorkAnimateAttr() {
25415
+ return Arc.NOWORK_ANIMATE_ATTR;
25416
+ }
25329
25417
  }
25418
+ Arc.NOWORK_ANIMATE_ATTR = Object.assign({ cap: 1 }, NOWORK_ANIMATE_ATTR);
25330
25419
 
25331
25420
  class Arc3d extends Arc {
25332
25421
  constructor(params) {
@@ -25347,7 +25436,11 @@
25347
25436
  this.clearUpdateBoundTag();
25348
25437
  return this._AABBBounds;
25349
25438
  }
25439
+ getNoWorkAnimateAttr() {
25440
+ return Arc3d.NOWORK_ANIMATE_ATTR;
25441
+ }
25350
25442
  }
25443
+ Arc3d.NOWORK_ANIMATE_ATTR = Object.assign({ cap: 1 }, NOWORK_ANIMATE_ATTR);
25351
25444
 
25352
25445
  const POLYGON_UPDATE_TAG_KEY = ['points', 'cornerRadius', ...GRAPHIC_UPDATE_TAG_KEY];
25353
25446
  class Polygon extends Graphic {
@@ -25423,7 +25516,11 @@
25423
25516
  clone() {
25424
25517
  return new Polygon(Object.assign({}, this.attribute));
25425
25518
  }
25519
+ getNoWorkAnimateAttr() {
25520
+ return Polygon.NOWORK_ANIMATE_ATTR;
25521
+ }
25426
25522
  }
25523
+ Polygon.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
25427
25524
 
25428
25525
  class Pyramid3d extends Polygon {
25429
25526
  constructor(params) {
@@ -25519,7 +25616,11 @@
25519
25616
  _isValid() {
25520
25617
  return super._isValid() && this.attribute.points.length === 4;
25521
25618
  }
25619
+ getNoWorkAnimateAttr() {
25620
+ return Pyramid3d.NOWORK_ANIMATE_ATTR;
25621
+ }
25522
25622
  }
25623
+ Pyramid3d.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
25523
25624
 
25524
25625
  let DefaultOuterBorderBoundsContribution = class DefaultOuterBorderBoundsContribution {
25525
25626
  updateBounds(attribute, theme, aabbBounds, graphic) {
@@ -27121,7 +27222,11 @@
27121
27222
  offsetY,
27122
27223
  offsetZ: z
27123
27224
  });
27124
- if (line.cache && !isArray$1(line.cache) && line.attribute.curveType && line.attribute.curveType.includes('Closed')) {
27225
+ if (line.cache &&
27226
+ !isArray$1(line.cache) &&
27227
+ line.cache.curves.every(c => c.defined) &&
27228
+ line.attribute.curveType &&
27229
+ line.attribute.curveType.includes('Closed')) {
27125
27230
  context.closePath();
27126
27231
  }
27127
27232
  context.setShadowStyle && context.setShadowStyle(line, attribute, defaultAttribute);
@@ -28678,23 +28783,30 @@
28678
28783
  path.lineTo(points[i].x + x, points[i].y + y);
28679
28784
  }
28680
28785
  }
28681
- function drawRoundedPolygon(path, points, x, y, cornerRadius) {
28786
+ function drawRoundedPolygon(path, points, x, y, cornerRadius, closePath = true) {
28682
28787
  var _a;
28683
28788
  if (points.length < 3) {
28684
28789
  drawPolygon(path, points, x, y);
28685
28790
  return;
28686
28791
  }
28687
- for (let i = 0; i < points.length; i++) {
28688
- const p1 = points[i];
28689
- const angularPoint = points[(i + 1) % points.length];
28690
- const p2 = points[(i + 2) % points.length];
28792
+ let startI = 0;
28793
+ let endI = points.length - 1;
28794
+ if (!closePath) {
28795
+ startI += 1;
28796
+ endI -= 1;
28797
+ path.moveTo(points[0].x + x, points[0].y + y);
28798
+ }
28799
+ for (let i = startI; i <= endI; i++) {
28800
+ const p1 = points[i === 0 ? endI : (i - 1) % points.length];
28801
+ const angularPoint = points[i % points.length];
28802
+ const p2 = points[(i + 1) % points.length];
28691
28803
  const dx1 = angularPoint.x - p1.x;
28692
28804
  const dy1 = angularPoint.y - p1.y;
28693
28805
  const dx2 = angularPoint.x - p2.x;
28694
28806
  const dy2 = angularPoint.y - p2.y;
28695
28807
  const angle = (Math.atan2(dy1, dx1) - Math.atan2(dy2, dx2)) / 2;
28696
28808
  const tan = Math.abs(Math.tan(angle));
28697
- let radius = Array.isArray(cornerRadius) ? (_a = cornerRadius[(i + 1) % points.length]) !== null && _a !== void 0 ? _a : 0 : cornerRadius;
28809
+ let radius = Array.isArray(cornerRadius) ? (_a = cornerRadius[i % points.length]) !== null && _a !== void 0 ? _a : 0 : cornerRadius;
28698
28810
  let segment = radius / tan;
28699
28811
  const length1 = getLength(dx1, dy1);
28700
28812
  const length2 = getLength(dx2, dy2);
@@ -28731,6 +28843,9 @@
28731
28843
  }
28732
28844
  path.lineTo(p2Cross.x + x, p2Cross.y + y);
28733
28845
  }
28846
+ if (!closePath) {
28847
+ path.lineTo(points[endI + 1].x + x, points[endI + 1].y + y);
28848
+ }
28734
28849
  }
28735
28850
  function getLength(dx, dy) {
28736
28851
  return Math.sqrt(dx * dx + dy * dy);
@@ -28750,7 +28865,7 @@
28750
28865
  }
28751
28866
  drawShape(polygon, context, x, y, drawContext, params, fillCb, strokeCb) {
28752
28867
  const polygonAttribute = getTheme(polygon, params === null || params === void 0 ? void 0 : params.theme).polygon;
28753
- const { points = polygonAttribute.points, fill = polygonAttribute.fill, stroke = polygonAttribute.stroke, cornerRadius = polygonAttribute.cornerRadius, fillOpacity = polygonAttribute.fillOpacity, background, strokeOpacity = polygonAttribute.strokeOpacity, lineWidth = polygonAttribute.lineWidth, opacity = polygonAttribute.opacity, visible = polygonAttribute.visible, x: originX = polygonAttribute.x, y: originY = polygonAttribute.y } = polygon.attribute;
28868
+ const { points = polygonAttribute.points, fill = polygonAttribute.fill, stroke = polygonAttribute.stroke, cornerRadius = polygonAttribute.cornerRadius, fillOpacity = polygonAttribute.fillOpacity, background, strokeOpacity = polygonAttribute.strokeOpacity, lineWidth = polygonAttribute.lineWidth, opacity = polygonAttribute.opacity, visible = polygonAttribute.visible, x: originX = polygonAttribute.x, y: originY = polygonAttribute.y, closePath = polygonAttribute.closePath } = polygon.attribute;
28754
28869
  const fVisible = fillVisible(opacity, fillOpacity, fill);
28755
28870
  const sVisible = strokeVisible(opacity, strokeOpacity);
28756
28871
  const doFill = runFill(fill, background);
@@ -28769,9 +28884,9 @@
28769
28884
  drawPolygon(context.camera ? context : context.nativeContext, points, x, y);
28770
28885
  }
28771
28886
  else {
28772
- drawRoundedPolygon(context.camera ? context : context.nativeContext, points, x, y, cornerRadius);
28887
+ drawRoundedPolygon(context.camera ? context : context.nativeContext, points, x, y, cornerRadius, closePath);
28773
28888
  }
28774
- context.closePath();
28889
+ closePath && context.closePath();
28775
28890
  if (!this._polygonRenderContribitions) {
28776
28891
  this._polygonRenderContribitions = this.polygonRenderContribitions.getContributions() || [];
28777
28892
  this._polygonRenderContribitions.sort((a, b) => b.order - a.order);
@@ -33159,15 +33274,15 @@
33159
33274
  injectable()
33160
33275
  ], NodeEnvContribution);
33161
33276
 
33162
- function makeUpCanvas(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList, compoient) {
33277
+ function makeUpCanvas(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList, component) {
33163
33278
  return __awaiter(this, void 0, void 0, function* () {
33164
33279
  const dpr = wx.getSystemInfoSync().pixelRatio;
33165
33280
  for (let i = 0; i < canvasIdLists.length; i++) {
33166
33281
  const id = canvasIdLists[i];
33167
33282
  yield new Promise(resolve => {
33168
33283
  let data = wx.createSelectorQuery();
33169
- if (compoient) {
33170
- data = data.in(compoient);
33284
+ if (component) {
33285
+ data = data.in(component);
33171
33286
  }
33172
33287
  data
33173
33288
  .select(`#${id}`)
@@ -33213,7 +33328,7 @@
33213
33328
  configure(service, params) {
33214
33329
  if (service.env === this.type) {
33215
33330
  service.setActiveEnvContribution(this);
33216
- return makeUpCanvas(params.domref, params.canvasIdLists, this.canvasMap, params.freeCanvasIdx, this.freeCanvasList, params.compoient).then(() => {
33331
+ return makeUpCanvas(params.domref, params.canvasIdLists, this.canvasMap, params.freeCanvasIdx, this.freeCanvasList, params.component).then(() => {
33217
33332
  loadFeishuContributions();
33218
33333
  });
33219
33334
  }
@@ -40266,7 +40381,7 @@
40266
40381
  }
40267
40382
  const Fragment = Group;
40268
40383
 
40269
- const version = "0.15.1";
40384
+ const version = "0.15.2";
40270
40385
 
40271
40386
  exports.ACustomAnimate = ACustomAnimate;
40272
40387
  exports.ARC3D_NUMBER_TYPE = ARC3D_NUMBER_TYPE;
@@ -40395,6 +40510,7 @@
40395
40510
  exports.MorphingPath = MorphingPath;
40396
40511
  exports.MotionPath = MotionPath;
40397
40512
  exports.MultiToOneMorphingPath = MultiToOneMorphingPath;
40513
+ exports.NOWORK_ANIMATE_ATTR = NOWORK_ANIMATE_ATTR;
40398
40514
  exports.Node = Node;
40399
40515
  exports.PATH_NUMBER_TYPE = PATH_NUMBER_TYPE;
40400
40516
  exports.POLYGON_NUMBER_TYPE = POLYGON_NUMBER_TYPE;