@visactor/vrender-components 0.18.14-alpha.0 → 0.19.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/cjs/axis/base.js +4 -20
  2. package/cjs/axis/base.js.map +1 -1
  3. package/cjs/brush/brush.js +14 -21
  4. package/cjs/brush/brush.js.map +1 -1
  5. package/cjs/checkbox/checkbox.d.ts +2 -2
  6. package/cjs/checkbox/checkbox.js +3 -4
  7. package/cjs/checkbox/checkbox.js.map +1 -1
  8. package/cjs/checkbox/register.js +1 -1
  9. package/cjs/checkbox/register.js.map +1 -1
  10. package/cjs/checkbox/type.d.ts +2 -2
  11. package/cjs/checkbox/type.js.map +1 -1
  12. package/cjs/data-zoom/data-zoom.js +6 -12
  13. package/cjs/data-zoom/data-zoom.js.map +1 -1
  14. package/cjs/index.d.ts +1 -2
  15. package/cjs/index.js +2 -3
  16. package/cjs/index.js.map +1 -1
  17. package/cjs/label/arc.d.ts +2 -2
  18. package/cjs/label/base.d.ts +2 -2
  19. package/cjs/marker/animate/animate.d.ts +13 -0
  20. package/cjs/marker/animate/animate.js +92 -0
  21. package/cjs/marker/animate/animate.js.map +1 -0
  22. package/cjs/marker/animate/call-in.d.ts +4 -0
  23. package/cjs/marker/animate/call-in.js +27 -0
  24. package/cjs/marker/animate/call-in.js.map +1 -0
  25. package/cjs/marker/animate/clip-in.d.ts +4 -0
  26. package/cjs/marker/animate/clip-in.js +23 -0
  27. package/cjs/marker/animate/clip-in.js.map +1 -0
  28. package/cjs/marker/animate/common.d.ts +9 -0
  29. package/cjs/marker/animate/common.js +48 -0
  30. package/cjs/marker/animate/common.js.map +1 -0
  31. package/cjs/marker/animate/fade-in.d.ts +7 -0
  32. package/cjs/marker/animate/fade-in.js +30 -0
  33. package/cjs/marker/animate/fade-in.js.map +1 -0
  34. package/cjs/marker/animate/fade-out.d.ts +7 -0
  35. package/cjs/marker/animate/fade-out.js +30 -0
  36. package/cjs/marker/animate/fade-out.js.map +1 -0
  37. package/cjs/marker/animate/index.js +3 -0
  38. package/cjs/marker/animate/index.js.map +1 -0
  39. package/cjs/marker/arc-area.d.ts +55 -0
  40. package/cjs/marker/arc-area.js +131 -0
  41. package/cjs/marker/arc-area.js.map +1 -0
  42. package/cjs/marker/arc-line.d.ts +25 -0
  43. package/cjs/marker/arc-line.js +106 -0
  44. package/cjs/marker/arc-line.js.map +1 -0
  45. package/cjs/marker/area.d.ts +14 -4
  46. package/cjs/marker/area.js +34 -21
  47. package/cjs/marker/area.js.map +1 -1
  48. package/cjs/marker/base.d.ts +21 -3
  49. package/cjs/marker/base.js +40 -5
  50. package/cjs/marker/base.js.map +1 -1
  51. package/cjs/marker/common-line.d.ts +22 -0
  52. package/cjs/marker/common-line.js +56 -0
  53. package/cjs/marker/common-line.js.map +1 -0
  54. package/cjs/marker/config.d.ts +79 -6
  55. package/cjs/marker/config.js +77 -37
  56. package/cjs/marker/config.js.map +1 -1
  57. package/cjs/marker/index.d.ts +2 -0
  58. package/cjs/marker/index.js +2 -1
  59. package/cjs/marker/index.js.map +1 -1
  60. package/cjs/marker/line.d.ts +24 -12
  61. package/cjs/marker/line.js +111 -45
  62. package/cjs/marker/line.js.map +1 -1
  63. package/cjs/marker/point.d.ts +8 -3
  64. package/cjs/marker/point.js +33 -9
  65. package/cjs/marker/point.js.map +1 -1
  66. package/cjs/marker/register.d.ts +2 -0
  67. package/cjs/marker/register.js +11 -2
  68. package/cjs/marker/register.js.map +1 -1
  69. package/cjs/marker/type.d.ts +102 -12
  70. package/cjs/marker/type.js +8 -2
  71. package/cjs/marker/type.js.map +1 -1
  72. package/cjs/poptip/poptip.js +4 -6
  73. package/cjs/poptip/poptip.js.map +1 -1
  74. package/cjs/poptip/register.js +2 -2
  75. package/cjs/poptip/register.js.map +1 -1
  76. package/cjs/segment/arc-segment.d.ts +13 -0
  77. package/cjs/segment/arc-segment.js +51 -0
  78. package/cjs/segment/arc-segment.js.map +1 -0
  79. package/cjs/segment/index.d.ts +1 -0
  80. package/cjs/segment/index.js +2 -1
  81. package/cjs/segment/index.js.map +1 -1
  82. package/cjs/segment/register.d.ts +2 -1
  83. package/cjs/segment/register.js +8 -3
  84. package/cjs/segment/register.js.map +1 -1
  85. package/cjs/segment/segment.d.ts +9 -7
  86. package/cjs/segment/segment.js +12 -8
  87. package/cjs/segment/segment.js.map +1 -1
  88. package/cjs/segment/type.d.ts +24 -4
  89. package/cjs/segment/type.js.map +1 -1
  90. package/cjs/slider/slider.js +4 -7
  91. package/cjs/slider/slider.js.map +1 -1
  92. package/cjs/tag/tag.d.ts +5 -0
  93. package/cjs/tag/tag.js +11 -2
  94. package/cjs/tag/tag.js.map +1 -1
  95. package/cjs/title/register.js +2 -1
  96. package/cjs/title/register.js.map +1 -1
  97. package/cjs/title/title.js +4 -6
  98. package/cjs/title/title.js.map +1 -1
  99. package/cjs/util/interaction.d.ts +4 -0
  100. package/cjs/util/interaction.js +37 -0
  101. package/cjs/util/interaction.js.map +1 -0
  102. package/es/axis/base.js +7 -21
  103. package/es/axis/base.js.map +1 -1
  104. package/es/brush/brush.js +14 -21
  105. package/es/brush/brush.js.map +1 -1
  106. package/es/checkbox/checkbox.d.ts +2 -2
  107. package/es/checkbox/checkbox.js +3 -5
  108. package/es/checkbox/checkbox.js.map +1 -1
  109. package/es/checkbox/register.js +2 -2
  110. package/es/checkbox/register.js.map +1 -1
  111. package/es/checkbox/type.d.ts +2 -2
  112. package/es/checkbox/type.js.map +1 -1
  113. package/es/data-zoom/data-zoom.js +6 -12
  114. package/es/data-zoom/data-zoom.js.map +1 -1
  115. package/es/index.d.ts +1 -2
  116. package/es/index.js +1 -3
  117. package/es/index.js.map +1 -1
  118. package/es/label/arc.d.ts +2 -2
  119. package/es/label/base.d.ts +2 -2
  120. package/es/marker/animate/animate.d.ts +13 -0
  121. package/es/marker/animate/animate.js +92 -0
  122. package/es/marker/animate/animate.js.map +1 -0
  123. package/es/marker/animate/call-in.d.ts +4 -0
  124. package/es/marker/animate/call-in.js +17 -0
  125. package/es/marker/animate/call-in.js.map +1 -0
  126. package/es/marker/animate/clip-in.d.ts +4 -0
  127. package/es/marker/animate/clip-in.js +15 -0
  128. package/es/marker/animate/clip-in.js.map +1 -0
  129. package/es/marker/animate/common.d.ts +9 -0
  130. package/es/marker/animate/common.js +39 -0
  131. package/es/marker/animate/common.js.map +1 -0
  132. package/es/marker/animate/fade-in.d.ts +7 -0
  133. package/es/marker/animate/fade-in.js +20 -0
  134. package/es/marker/animate/fade-in.js.map +1 -0
  135. package/es/marker/animate/fade-out.d.ts +7 -0
  136. package/es/marker/animate/fade-out.js +20 -0
  137. package/es/marker/animate/fade-out.js.map +1 -0
  138. package/es/marker/animate/index.js +3 -0
  139. package/es/marker/animate/index.js.map +1 -0
  140. package/es/marker/arc-area.d.ts +55 -0
  141. package/es/marker/arc-area.js +143 -0
  142. package/es/marker/arc-area.js.map +1 -0
  143. package/es/marker/arc-line.d.ts +25 -0
  144. package/es/marker/arc-line.js +114 -0
  145. package/es/marker/arc-line.js.map +1 -0
  146. package/es/marker/area.d.ts +14 -4
  147. package/es/marker/area.js +36 -19
  148. package/es/marker/area.js.map +1 -1
  149. package/es/marker/base.d.ts +21 -3
  150. package/es/marker/base.js +43 -4
  151. package/es/marker/base.js.map +1 -1
  152. package/es/marker/common-line.d.ts +22 -0
  153. package/es/marker/common-line.js +58 -0
  154. package/es/marker/common-line.js.map +1 -0
  155. package/es/marker/config.d.ts +79 -6
  156. package/es/marker/config.js +79 -37
  157. package/es/marker/config.js.map +1 -1
  158. package/es/marker/index.d.ts +2 -0
  159. package/es/marker/index.js +4 -0
  160. package/es/marker/index.js.map +1 -1
  161. package/es/marker/line.d.ts +24 -12
  162. package/es/marker/line.js +116 -48
  163. package/es/marker/line.js.map +1 -1
  164. package/es/marker/point.d.ts +8 -3
  165. package/es/marker/point.js +34 -6
  166. package/es/marker/point.js.map +1 -1
  167. package/es/marker/register.d.ts +2 -0
  168. package/es/marker/register.js +10 -2
  169. package/es/marker/register.js.map +1 -1
  170. package/es/marker/type.d.ts +102 -12
  171. package/es/marker/type.js +9 -0
  172. package/es/marker/type.js.map +1 -1
  173. package/es/poptip/poptip.js +4 -6
  174. package/es/poptip/poptip.js.map +1 -1
  175. package/es/poptip/register.js +2 -2
  176. package/es/poptip/register.js.map +1 -1
  177. package/es/segment/arc-segment.d.ts +13 -0
  178. package/es/segment/arc-segment.js +49 -0
  179. package/es/segment/arc-segment.js.map +1 -0
  180. package/es/segment/index.d.ts +1 -0
  181. package/es/segment/index.js +2 -0
  182. package/es/segment/index.js.map +1 -1
  183. package/es/segment/register.d.ts +2 -1
  184. package/es/segment/register.js +6 -2
  185. package/es/segment/register.js.map +1 -1
  186. package/es/segment/segment.d.ts +9 -7
  187. package/es/segment/segment.js +11 -8
  188. package/es/segment/segment.js.map +1 -1
  189. package/es/segment/type.d.ts +24 -4
  190. package/es/segment/type.js.map +1 -1
  191. package/es/slider/slider.js +4 -7
  192. package/es/slider/slider.js.map +1 -1
  193. package/es/tag/tag.d.ts +5 -0
  194. package/es/tag/tag.js +11 -2
  195. package/es/tag/tag.js.map +1 -1
  196. package/es/title/register.js +2 -2
  197. package/es/title/register.js.map +1 -1
  198. package/es/title/title.js +4 -6
  199. package/es/title/title.js.map +1 -1
  200. package/es/util/interaction.d.ts +4 -0
  201. package/es/util/interaction.js +30 -0
  202. package/es/util/interaction.js.map +1 -0
  203. package/package.json +3 -3
  204. package/cjs/marker/util.js +0 -3
  205. package/cjs/marker/util.js.map +0 -1
  206. package/cjs/radio/index.d.ts +0 -2
  207. package/cjs/radio/index.js +0 -21
  208. package/cjs/radio/index.js.map +0 -1
  209. package/cjs/radio/radio.d.ts +0 -16
  210. package/cjs/radio/radio.js +0 -89
  211. package/cjs/radio/radio.js.map +0 -1
  212. package/cjs/radio/register.d.ts +0 -1
  213. package/cjs/radio/register.js +0 -15
  214. package/cjs/radio/register.js.map +0 -1
  215. package/cjs/radio/type.d.ts +0 -21
  216. package/cjs/radio/type.js +0 -6
  217. package/cjs/radio/type.js.map +0 -1
  218. package/es/marker/util.js +0 -3
  219. package/es/marker/util.js.map +0 -1
  220. package/es/radio/index.d.ts +0 -2
  221. package/es/radio/index.js +0 -4
  222. package/es/radio/index.js.map +0 -1
  223. package/es/radio/radio.d.ts +0 -16
  224. package/es/radio/radio.js +0 -88
  225. package/es/radio/radio.js.map +0 -1
  226. package/es/radio/register.d.ts +0 -1
  227. package/es/radio/register.js +0 -6
  228. package/es/radio/register.js.map +0 -1
  229. package/es/radio/type.d.ts +0 -21
  230. package/es/radio/type.js +0 -2
  231. package/es/radio/type.js.map +0 -1
  232. /package/cjs/marker/{util.d.ts → animate/index.d.ts} +0 -0
  233. /package/es/marker/{util.d.ts → animate/index.d.ts} +0 -0
package/es/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export const version = "0.18.14-alpha.0";
1
+ export const version = "0.19.0-alpha.1";
2
2
 
3
3
  export * from "./core/base";
4
4
 
@@ -48,7 +48,5 @@ export * from "./jsx";
48
48
 
49
49
  export * from "./checkbox";
50
50
 
51
- export * from "./radio";
52
-
53
51
  export * from "./util";
54
52
  //# sourceMappingURL=index.js.map
package/es/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC;AAEzC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.18.14-alpha.0\";\n\nexport * from './core/base';\nexport * from './core/type';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\nexport * from './radio';\nexport * from './util';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAC;AAExC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.19.0-alpha.1\";\n\nexport * from './core/base';\nexport * from './core/type';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\nexport * from './util';\n"]}
package/es/label/arc.d.ts CHANGED
@@ -40,12 +40,12 @@ export declare class ArcLabel extends LabelBase<ArcLabelAttrs> {
40
40
  private _arcLeft;
41
41
  private _arcRight;
42
42
  constructor(attributes: ArcLabelAttrs, options?: ComponentOptions);
43
- protected _overlapping(labels: (IText | IRichText)[]): (IRichText | IText)[];
43
+ protected _overlapping(labels: (IText | IRichText)[]): (IText | IRichText)[];
44
44
  protected labeling(textBounds: IBoundsLike, graphicBounds: IBoundsLike, position?: string, offset?: number): {
45
45
  x: number;
46
46
  y: number;
47
47
  } | undefined;
48
- protected _layout(texts: (IText | IRichText)[]): (IRichText | IText)[];
48
+ protected _layout(texts: (IText | IRichText)[]): (IText | IRichText)[];
49
49
  protected layoutArcLabels(position: BaseLabelAttrs['position'], attribute: any, currentMarks?: IGraphic[], data?: LabelItem[], textBoundsArray?: any, ellipsisWidth?: number): ArcInfo[];
50
50
  private _layoutInsideLabels;
51
51
  private _layoutOutsideLabels;
@@ -40,12 +40,12 @@ export declare class LabelBase<T extends BaseLabelAttrs> extends AbstractCompone
40
40
  private _onHover;
41
41
  private _onUnHover;
42
42
  private _onClick;
43
- protected _createLabelText(attributes: LabelItem): IRichText | IText;
43
+ protected _createLabelText(attributes: LabelItem): IText | IRichText;
44
44
  private _prepare;
45
45
  protected getRelatedGraphic(item: LabelItem): IGraphic<Partial<import("@visactor/vrender-core").IGraphicAttribute>>;
46
46
  protected _initText(data?: LabelItem[]): (IText | IRichText)[];
47
47
  protected _layout(texts: (IText | IRichText)[]): (IText | IRichText)[];
48
- protected _overlapping(labels: (IText | IRichText)[]): (IRichText | IText)[];
48
+ protected _overlapping(labels: (IText | IRichText)[]): (IText | IRichText)[];
49
49
  protected getBaseMarkGroup(): IGroup;
50
50
  protected getGraphicBounds(graphic?: IGraphic, point?: Partial<PointLocationCfg>, position?: string): IBoundsLike;
51
51
  protected _renderLabels(labels: (IText | IRichText)[]): void;
@@ -0,0 +1,13 @@
1
+ import type { IRichText, ISymbol, IImage, IArc } from '@visactor/vrender-core';
2
+ import type { ILine, IPolygon } from '@visactor/vrender-core';
3
+ import type { ArcSegment, Segment } from '../../segment';
4
+ import type { Tag } from '../../tag';
5
+ import type { CommonMarkAreaAnimationType, MarkCommonLineAnimationType, MarkPointAnimationType, MarkerAnimationState, MarkerExitAnimation, MarkerUpdateAnimation } from '../type';
6
+ export declare function markCommonLineAnimate(line: Segment | ArcSegment, label: Tag, animationconfig: any, state: MarkerAnimationState): void;
7
+ export declare function markAreaAnimate(area: IPolygon, label: Tag, animationconfig: any, state: MarkerAnimationState): void;
8
+ export declare function markArcAreaAnimate(area: IArc, label: Tag, animationconfig: any, state: MarkerAnimationState): void;
9
+ export declare function markPointAnimate(lines: [Segment, ILine], item: Tag | IRichText | ISymbol | IImage, animationconfig: any, state: MarkerAnimationState): void;
10
+ export declare const DefaultUpdateMarkLineAnimation: MarkerUpdateAnimation<MarkCommonLineAnimationType>;
11
+ export declare const DefaultUpdateMarkAreaAnimation: MarkerUpdateAnimation<CommonMarkAreaAnimationType>;
12
+ export declare const DefaultUpdateMarkPointAnimation: MarkerUpdateAnimation<MarkPointAnimationType>;
13
+ export declare const DefaultExitMarkerAnimation: MarkerExitAnimation;
@@ -0,0 +1,92 @@
1
+ import { commonLineClipIn } from "./clip-in";
2
+
3
+ import { areaFadeIn, commonLineFadeIn, arcAreaFadeIn, pointFadeIn } from "./fade-in";
4
+
5
+ import { areaFadeOut, commonLineFadeOut, arcAreaFadeOut, pointFadeOut } from "./fade-out";
6
+
7
+ import { pointCallIn } from "./call-in";
8
+
9
+ export function markCommonLineAnimate(line, label, animationconfig, state) {
10
+ const {enter: enter, update: update, exit: exit} = animationconfig;
11
+ if ("enter" === state) {
12
+ const {type: type, duration: duration, delay: delay, easing: easing} = enter;
13
+ "clipIn" === type ? commonLineClipIn(line, label, duration, delay, easing) : "fadeIn" === type && commonLineFadeIn(line, label, duration, delay, easing);
14
+ } else if ("update" === state) {
15
+ const {type: type, duration: duration, delay: delay, easing: easing} = update;
16
+ "clipIn" === type ? commonLineClipIn(line, label, duration, delay, easing) : "fadeIn" === type && commonLineFadeIn(line, label, duration, delay, easing);
17
+ } else if ("exit" === state) {
18
+ const {duration: duration, delay: delay, easing: easing} = exit;
19
+ commonLineFadeOut(line, label, duration, delay, easing);
20
+ }
21
+ }
22
+
23
+ export function markAreaAnimate(area, label, animationconfig, state) {
24
+ const {enter: enter, update: update, exit: exit} = animationconfig;
25
+ if ("enter" === state) {
26
+ const {type: type, duration: duration, delay: delay, easing: easing} = enter;
27
+ "fadeIn" === type && areaFadeIn(area, label, duration, delay, easing);
28
+ } else if ("update" === state) {
29
+ const {type: type, duration: duration, delay: delay, easing: easing} = update;
30
+ "fadeIn" === type && areaFadeIn(area, label, duration, delay, easing);
31
+ } else if ("exit" === state) {
32
+ const {duration: duration, delay: delay, easing: easing} = exit;
33
+ areaFadeOut(area, label, duration, delay, easing);
34
+ }
35
+ }
36
+
37
+ export function markArcAreaAnimate(area, label, animationconfig, state) {
38
+ const {enter: enter, update: update, exit: exit} = animationconfig;
39
+ if ("enter" === state) {
40
+ const {type: type, duration: duration, delay: delay, easing: easing} = enter;
41
+ "fadeIn" === type && arcAreaFadeIn(area, label, duration, delay, easing);
42
+ } else if ("update" === state) {
43
+ const {type: type, duration: duration, delay: delay, easing: easing} = update;
44
+ "fadeIn" === type && arcAreaFadeIn(area, label, duration, delay, easing);
45
+ } else if ("exit" === state) {
46
+ const {duration: duration, delay: delay, easing: easing} = exit;
47
+ arcAreaFadeOut(area, label, duration, delay, easing);
48
+ }
49
+ }
50
+
51
+ export function markPointAnimate(lines, item, animationconfig, state) {
52
+ const [itemLine, decorativeLine] = lines, {enter: enter, update: update, exit: exit} = animationconfig;
53
+ if ("enter" === state) {
54
+ const {type: type, duration: duration, delay: delay, easing: easing} = enter;
55
+ "fadeIn" === type ? pointFadeIn(itemLine, decorativeLine, item, duration, delay, easing) : "callIn" === type && pointCallIn(itemLine, decorativeLine, item, duration, delay, easing);
56
+ } else if ("update" === state) {
57
+ const {type: type, duration: duration, delay: delay, easing: easing} = update;
58
+ "fadeIn" === type ? pointFadeIn(itemLine, decorativeLine, item, duration, delay, easing) : "callIn" === type && pointCallIn(itemLine, decorativeLine, item, duration, delay, easing);
59
+ } else if ("exit" === state) {
60
+ const {duration: duration, delay: delay, easing: easing} = exit;
61
+ pointFadeOut(itemLine, decorativeLine, item, duration, delay, easing);
62
+ }
63
+ }
64
+
65
+ export const DefaultUpdateMarkLineAnimation = {
66
+ type: "clipIn",
67
+ duration: 500,
68
+ easing: "linear",
69
+ delay: 0
70
+ };
71
+
72
+ export const DefaultUpdateMarkAreaAnimation = {
73
+ type: "fadeIn",
74
+ duration: 500,
75
+ easing: "linear",
76
+ delay: 0
77
+ };
78
+
79
+ export const DefaultUpdateMarkPointAnimation = {
80
+ type: "callIn",
81
+ duration: 500,
82
+ easing: "linear",
83
+ delay: 0
84
+ };
85
+
86
+ export const DefaultExitMarkerAnimation = {
87
+ type: "fadeOut",
88
+ duration: 500,
89
+ easing: "linear",
90
+ delay: 0
91
+ };
92
+ //# sourceMappingURL=animate.js.map
@@ -0,0 +1 @@
1
+ {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AAM,CAAC,MAAM,0BAA0B,GAAwB;IAC7D,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,GAAG;IACb,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,CAAC;CACT,CAAC","file":"animate.js","sourcesContent":["import type { IRichText, ISymbol, IImage, IArc } from '@visactor/vrender-core';\n// eslint-disable-next-line no-duplicate-imports\nimport type { ILine, IPolygon } from '@visactor/vrender-core';\nimport type { ArcSegment, Segment } from '../../segment';\nimport type { Tag } from '../../tag';\nimport type {\n CommonMarkAreaAnimationType,\n MarkCommonLineAnimationType,\n MarkPointAnimationType,\n MarkerAnimationState,\n MarkerExitAnimation,\n MarkerUpdateAnimation\n} from '../type';\nimport { commonLineClipIn } from './clip-in';\nimport { areaFadeIn, commonLineFadeIn, arcAreaFadeIn, pointFadeIn } from './fade-in';\nimport { areaFadeOut, commonLineFadeOut, arcAreaFadeOut, pointFadeOut } from './fade-out';\nimport { pointCallIn } from './call-in';\n\nexport function markCommonLineAnimate(\n line: Segment | ArcSegment,\n label: Tag,\n animationconfig: any,\n state: MarkerAnimationState\n) {\n const { enter, update, exit } = animationconfig;\n if (state === 'enter') {\n const { type, duration, delay, easing } = enter;\n if (type === 'clipIn') {\n commonLineClipIn(line, label, duration, delay, easing);\n } else if (type === 'fadeIn') {\n commonLineFadeIn(line, label, duration, delay, easing);\n }\n } else if (state === 'update') {\n const { type, duration, delay, easing } = update;\n if (type === 'clipIn') {\n commonLineClipIn(line, label, duration, delay, easing);\n } else if (type === 'fadeIn') {\n commonLineFadeIn(line, label, duration, delay, easing);\n }\n } else if (state === 'exit') {\n const { duration, delay, easing } = exit;\n commonLineFadeOut(line, label, duration, delay, easing);\n }\n}\n\nexport function markAreaAnimate(area: IPolygon, label: Tag, animationconfig: any, state: MarkerAnimationState) {\n const { enter, update, exit } = animationconfig;\n if (state === 'enter') {\n const { type, duration, delay, easing } = enter;\n if (type === 'fadeIn') {\n areaFadeIn(area, label, duration, delay, easing);\n }\n } else if (state === 'update') {\n const { type, duration, delay, easing } = update;\n if (type === 'fadeIn') {\n areaFadeIn(area, label, duration, delay, easing);\n }\n } else if (state === 'exit') {\n const { duration, delay, easing } = exit;\n areaFadeOut(area, label, duration, delay, easing);\n }\n}\n\nexport function markArcAreaAnimate(area: IArc, label: Tag, animationconfig: any, state: MarkerAnimationState) {\n const { enter, update, exit } = animationconfig;\n if (state === 'enter') {\n const { type, duration, delay, easing } = enter;\n if (type === 'fadeIn') {\n arcAreaFadeIn(area, label, duration, delay, easing);\n }\n } else if (state === 'update') {\n const { type, duration, delay, easing } = update;\n if (type === 'fadeIn') {\n arcAreaFadeIn(area, label, duration, delay, easing);\n }\n } else if (state === 'exit') {\n const { duration, delay, easing } = exit;\n arcAreaFadeOut(area, label, duration, delay, easing);\n }\n}\n\nexport function markPointAnimate(\n lines: [Segment, ILine],\n item: Tag | IRichText | ISymbol | IImage,\n animationconfig: any,\n state: MarkerAnimationState\n) {\n const [itemLine, decorativeLine] = lines;\n const { enter, update, exit } = animationconfig;\n if (state === 'enter') {\n const { type, duration, delay, easing } = enter;\n if (type === 'fadeIn') {\n pointFadeIn(itemLine, decorativeLine, item, duration, delay, easing);\n } else if (type === 'callIn') {\n pointCallIn(itemLine, decorativeLine, item, duration, delay, easing);\n }\n } else if (state === 'update') {\n const { type, duration, delay, easing } = update;\n if (type === 'fadeIn') {\n pointFadeIn(itemLine, decorativeLine, item, duration, delay, easing);\n } else if (type === 'callIn') {\n pointCallIn(itemLine, decorativeLine, item, duration, delay, easing);\n }\n } else if (state === 'exit') {\n const { duration, delay, easing } = exit;\n pointFadeOut(itemLine, decorativeLine, item, duration, delay, easing);\n }\n}\n\nexport const DefaultUpdateMarkLineAnimation: MarkerUpdateAnimation<MarkCommonLineAnimationType> = {\n type: 'clipIn',\n duration: 500,\n easing: 'linear',\n delay: 0\n} as any;\n\nexport const DefaultUpdateMarkAreaAnimation: MarkerUpdateAnimation<CommonMarkAreaAnimationType> = {\n type: 'fadeIn',\n duration: 500,\n easing: 'linear',\n delay: 0\n} as any;\n\nexport const DefaultUpdateMarkPointAnimation: MarkerUpdateAnimation<MarkPointAnimationType> = {\n type: 'callIn',\n duration: 500,\n easing: 'linear',\n delay: 0\n} as any;\n\nexport const DefaultExitMarkerAnimation: MarkerExitAnimation = {\n type: 'fadeOut',\n duration: 500,\n easing: 'linear',\n delay: 0\n};\n"]}
@@ -0,0 +1,4 @@
1
+ import type { EasingType, IImage, ILine, IRichText, ISymbol } from '@visactor/vrender-core';
2
+ import type { Segment } from '../../segment';
3
+ import type { Tag } from '../../tag';
4
+ export declare function pointCallIn(itemLine: Segment, decorativeLine: ILine, item: Tag | IRichText | ISymbol | IImage, duration: number, delay: number, easing: EasingType): void;
@@ -0,0 +1,17 @@
1
+ import { graphicFadeIn } from "./common";
2
+
3
+ export function pointCallIn(itemLine, decorativeLine, item, duration, delay, easing) {
4
+ var _a;
5
+ const startSymbolDuration = .1 * duration, lineDuration = .65 * duration, decorativeDuration = .05 * duration, endSymbolDuration = .1 * duration, labelDuration = .1 * duration;
6
+ graphicFadeIn(itemLine.startSymbol, delay, startSymbolDuration, easing), itemLine.lines.forEach((line => line.setAttribute("clipRange", 0))),
7
+ itemLine.lines.forEach(((l, index) => {
8
+ const stepDuration = lineDuration / itemLine.lines.length;
9
+ l.animate().wait(delay + startSymbolDuration + index * stepDuration).to({
10
+ clipRange: 1
11
+ }, stepDuration, easing);
12
+ })), graphicFadeIn(decorativeLine, delay + startSymbolDuration + lineDuration, decorativeDuration, easing),
13
+ graphicFadeIn(itemLine.endSymbol, delay + startSymbolDuration + lineDuration + decorativeDuration, endSymbolDuration, easing),
14
+ (null === (_a = item.getTextShape) || void 0 === _a ? void 0 : _a.call(item)) ? (graphicFadeIn(item.getTextShape(), delay + startSymbolDuration + lineDuration + decorativeDuration + endSymbolDuration, labelDuration, easing),
15
+ graphicFadeIn(item.getBgRect(), delay + startSymbolDuration + lineDuration + endSymbolDuration, labelDuration, easing)) : graphicFadeIn(item, delay + startSymbolDuration + lineDuration + endSymbolDuration, labelDuration, easing);
16
+ }
17
+ //# sourceMappingURL=call-in.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/marker/animate/call-in.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,WAAW,CACzB,QAAiB,EACjB,cAAqB,EACrB,IAAwC,EACxC,QAAgB,EAChB,KAAa,EACb,MAAkB;;IAElB,MAAM,mBAAmB,GAAG,GAAG,GAAG,QAAQ,CAAC;IAC3C,MAAM,YAAY,GAAG,IAAI,GAAG,QAAQ,CAAC;IACrC,MAAM,kBAAkB,GAAG,IAAI,GAAG,QAAQ,CAAC;IAC3C,MAAM,iBAAiB,GAAG,GAAG,GAAG,QAAQ,CAAC;IACzC,MAAM,aAAa,GAAG,GAAG,GAAG,QAAQ,CAAC;IAGrC,aAAa,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,EAAE,mBAAmB,EAAE,MAAM,CAAC,CAAC;IAGxE,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC;IAClE,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;QAClC,MAAM,YAAY,GAAG,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC;QAC1D,CAAC,CAAC,OAAO,EAAE;aACR,IAAI,CAAC,KAAK,GAAG,mBAAmB,GAAG,KAAK,GAAG,YAAY,CAAC;aACxD,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;IAEH,aAAa,CAAC,cAAc,EAAE,KAAK,GAAG,mBAAmB,GAAG,YAAY,EAAE,kBAAkB,EAAE,MAAM,CAAC,CAAC;IAGtG,aAAa,CACX,QAAQ,CAAC,SAAS,EAClB,KAAK,GAAG,mBAAmB,GAAG,YAAY,GAAG,kBAAkB,EAC/D,iBAAiB,EACjB,MAAM,CACP,CAAC;IAEF,IAAI,MAAA,IAAI,CAAC,YAAY,oDAAI,EAAE;QAEzB,aAAa,CACX,IAAI,CAAC,YAAY,EAAE,EACnB,KAAK,GAAG,mBAAmB,GAAG,YAAY,GAAG,kBAAkB,GAAG,iBAAiB,EACnF,aAAa,EACb,MAAM,CACP,CAAC;QAGF,aAAa,CACX,IAAI,CAAC,SAAS,EAAE,EAChB,KAAK,GAAG,mBAAmB,GAAG,YAAY,GAAG,iBAAiB,EAC9D,aAAa,EACb,MAAM,CACP,CAAC;KACH;SAAM;QACL,aAAa,CAAC,IAAI,EAAE,KAAK,GAAG,mBAAmB,GAAG,YAAY,GAAG,iBAAiB,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC;KAC5G;AACH,CAAC","file":"call-in.js","sourcesContent":["import type { EasingType, IImage, ILine, IRichText, ISymbol } from '@visactor/vrender-core';\nimport type { Segment } from '../../segment';\nimport type { Tag } from '../../tag';\nimport { graphicFadeIn } from './common';\n\nexport function pointCallIn(\n itemLine: Segment,\n decorativeLine: ILine,\n item: Tag | IRichText | ISymbol | IImage,\n duration: number,\n delay: number,\n easing: EasingType\n) {\n const startSymbolDuration = 0.1 * duration;\n const lineDuration = 0.65 * duration;\n const decorativeDuration = 0.05 * duration;\n const endSymbolDuration = 0.1 * duration;\n const labelDuration = 0.1 * duration;\n\n // start symbol\n graphicFadeIn(itemLine.startSymbol, delay, startSymbolDuration, easing);\n\n // line\n itemLine.lines.forEach(line => line.setAttribute('clipRange', 0));\n itemLine.lines.forEach((l, index) => {\n const stepDuration = lineDuration / itemLine.lines.length;\n l.animate()\n .wait(delay + startSymbolDuration + index * stepDuration)\n .to({ clipRange: 1 }, stepDuration, easing);\n });\n\n graphicFadeIn(decorativeLine, delay + startSymbolDuration + lineDuration, decorativeDuration, easing);\n\n // end symbol\n graphicFadeIn(\n itemLine.endSymbol,\n delay + startSymbolDuration + lineDuration + decorativeDuration,\n endSymbolDuration,\n easing\n );\n\n if (item.getTextShape?.()) {\n // text\n graphicFadeIn(\n item.getTextShape(),\n delay + startSymbolDuration + lineDuration + decorativeDuration + endSymbolDuration,\n labelDuration,\n easing\n );\n\n // text background\n graphicFadeIn(\n item.getBgRect(),\n delay + startSymbolDuration + lineDuration + endSymbolDuration,\n labelDuration,\n easing\n );\n } else {\n graphicFadeIn(item, delay + startSymbolDuration + lineDuration + endSymbolDuration, labelDuration, easing);\n }\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import type { EasingType } from '@visactor/vrender-core';
2
+ import type { ArcSegment, Segment } from '../../segment';
3
+ import type { Tag } from '../../tag';
4
+ export declare function commonLineClipIn(line: Segment | ArcSegment, label: Tag, duration: number, delay: number, easing: EasingType): void;
@@ -0,0 +1,15 @@
1
+ import { graphicFadeIn } from "./common";
2
+
3
+ export function commonLineClipIn(line, label, duration, delay, easing) {
4
+ const startSymbolDuration = .1 * duration, lineDuration = .7 * duration, endSymbolDuration = .1 * duration, labelDuration = .1 * duration;
5
+ graphicFadeIn(line.startSymbol, delay, startSymbolDuration, easing), line.lines.forEach((line => line.setAttribute("clipRange", 0))),
6
+ line.lines.forEach(((l, index) => {
7
+ const stepDuration = lineDuration / line.lines.length;
8
+ l.animate().wait(delay + startSymbolDuration + index * stepDuration).to({
9
+ clipRange: 1
10
+ }, stepDuration, easing);
11
+ })), graphicFadeIn(line.endSymbol, delay + startSymbolDuration + lineDuration, endSymbolDuration, easing),
12
+ graphicFadeIn(label.getTextShape(), delay + startSymbolDuration + lineDuration + endSymbolDuration, labelDuration, easing),
13
+ graphicFadeIn(label.getBgRect(), delay + startSymbolDuration + lineDuration + endSymbolDuration, labelDuration, easing);
14
+ }
15
+ //# sourceMappingURL=clip-in.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/marker/animate/clip-in.ts"],"names":[],"mappings":"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,YAAY,GAAG,iBAAiB,EAC9D,aAAa,EACb,MAAM,CACP,CAAC;AACJ,CAAC","file":"clip-in.js","sourcesContent":["import type { EasingType } from '@visactor/vrender-core';\nimport type { ArcSegment, Segment } from '../../segment';\nimport type { Tag } from '../../tag';\nimport { graphicFadeIn } from './common';\n\nexport function commonLineClipIn(\n line: Segment | ArcSegment,\n label: Tag,\n duration: number,\n delay: number,\n easing: EasingType\n) {\n const startSymbolDuration = 0.1 * duration;\n const lineDuration = 0.7 * duration;\n const endSymbolDuration = 0.1 * duration;\n const labelDuration = 0.1 * duration;\n\n // start symbol\n graphicFadeIn(line.startSymbol, delay, startSymbolDuration, easing);\n\n // line\n line.lines.forEach(line => line.setAttribute('clipRange', 0));\n line.lines.forEach((l, index) => {\n const stepDuration = lineDuration / line.lines.length;\n l.animate()\n .wait(delay + startSymbolDuration + index * stepDuration)\n .to({ clipRange: 1 }, stepDuration, easing);\n });\n\n // end symbol\n graphicFadeIn(line.endSymbol, delay + startSymbolDuration + lineDuration, endSymbolDuration, easing);\n\n // text\n graphicFadeIn(\n label.getTextShape(),\n delay + startSymbolDuration + lineDuration + endSymbolDuration,\n labelDuration,\n easing\n );\n\n // text background\n graphicFadeIn(\n label.getBgRect(),\n delay + startSymbolDuration + lineDuration + endSymbolDuration,\n labelDuration,\n easing\n );\n}\n"]}
@@ -0,0 +1,9 @@
1
+ import type { EasingType, IGraphic } from '@visactor/vrender-core';
2
+ import type { ArcSegment, Segment } from '../../segment';
3
+ import type { Tag } from '../../tag';
4
+ export declare function graphicFadeIn(graphic: IGraphic, delay: number, duration: number, easing: EasingType): void;
5
+ export declare function segmentFadeIn(segment: Segment, delay: number, duration: number, easing: EasingType): void;
6
+ export declare function tagFadeIn(tag: Tag, delay: number, duration: number, easing: EasingType): void;
7
+ export declare function graphicFadeOut(graphic: IGraphic, delay: number, duration: number, easing: EasingType): void;
8
+ export declare function segmentFadeOut(segment: Segment | ArcSegment, delay: number, duration: number, easing: EasingType): void;
9
+ export declare function tagFadeOut(tag: Tag, delay: number, duration: number, easing: EasingType): void;
@@ -0,0 +1,39 @@
1
+ export function graphicFadeIn(graphic, delay, duration, easing) {
2
+ graphic && (graphic.setAttributes({
3
+ fillOpacity: 0,
4
+ strokeOpacity: 0
5
+ }), graphic.animate().wait(delay).to({
6
+ fillOpacity: 1,
7
+ strokeOpacity: 1
8
+ }, duration, easing));
9
+ }
10
+
11
+ export function segmentFadeIn(segment, delay, duration, easing) {
12
+ segment && (graphicFadeIn(segment.startSymbol, delay, duration, easing), segment.lines.forEach((line => graphicFadeIn(line, delay, duration, easing))),
13
+ graphicFadeIn(segment.line, delay, duration, easing), graphicFadeIn(segment.endSymbol, delay, duration, easing));
14
+ }
15
+
16
+ export function tagFadeIn(tag, delay, duration, easing) {
17
+ tag && (graphicFadeIn(tag.getTextShape(), delay, duration, easing), graphicFadeIn(tag.getBgRect(), delay, duration, easing));
18
+ }
19
+
20
+ export function graphicFadeOut(graphic, delay, duration, easing) {
21
+ var _a, _b, _c, _d;
22
+ graphic && (graphic.setAttributes({
23
+ fillOpacity: null !== (_b = null === (_a = graphic.attribute) || void 0 === _a ? void 0 : _a.fillOpacity) && void 0 !== _b ? _b : 1,
24
+ strokeOpacity: null !== (_d = null === (_c = graphic.attribute) || void 0 === _c ? void 0 : _c.strokeOpacity) && void 0 !== _d ? _d : 1
25
+ }), graphic.animate().wait(delay).to({
26
+ fillOpacity: 0,
27
+ strokeOpacity: 0
28
+ }, duration, easing));
29
+ }
30
+
31
+ export function segmentFadeOut(segment, delay, duration, easing) {
32
+ segment && (graphicFadeOut(segment.startSymbol, delay, duration, easing), segment.lines.forEach((line => graphicFadeOut(line, delay, duration, easing))),
33
+ graphicFadeOut(segment.line, delay, duration, easing), graphicFadeOut(segment.endSymbol, delay, duration, easing));
34
+ }
35
+
36
+ export function tagFadeOut(tag, delay, duration, easing) {
37
+ tag && (graphicFadeOut(tag.getTextShape(), delay, duration, easing), graphicFadeOut(tag.getBgRect(), delay, duration, easing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kB;IACtF,IAAI,CAAC,GAAG,EAAE;QACR,OAAO;KACR;IAGD,cAAc,CAAC,GAAG,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAG5D,cAAc,CAAC,GAAG,CAAC,SAAS,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC3D,CAAC","file":"common.js","sourcesContent":["import type { EasingType, IGraphic } from '@visactor/vrender-core';\nimport type { ArcSegment, Segment } from '../../segment';\nimport type { Tag } from '../../tag';\n\n/** fade-in */\nexport function graphicFadeIn(graphic: IGraphic, delay: number, duration: number, easing: EasingType) {\n if (!graphic) {\n return;\n }\n\n graphic.setAttributes({\n fillOpacity: 0,\n strokeOpacity: 0\n });\n\n graphic.animate().wait(delay).to({ fillOpacity: 1, strokeOpacity: 1 }, duration, easing);\n}\n\nexport function segmentFadeIn(segment: Segment, delay: number, duration: number, easing: EasingType) {\n if (!segment) {\n return;\n }\n\n // start symbol\n graphicFadeIn(segment.startSymbol, delay, duration, easing);\n\n // line\n segment.lines.forEach(line => graphicFadeIn(line, delay, duration, easing));\n graphicFadeIn((segment as ArcSegment).line, delay, duration, easing);\n\n // end symbol\n graphicFadeIn(segment.endSymbol, delay, duration, easing);\n}\n\nexport function tagFadeIn(tag: Tag, delay: number, duration: number, easing: EasingType) {\n if (!tag) {\n return;\n }\n\n // text\n graphicFadeIn(tag.getTextShape(), delay, duration, easing);\n\n // text background\n graphicFadeIn(tag.getBgRect(), delay, duration, easing);\n}\n\n/** fade-out */\nexport function graphicFadeOut(graphic: IGraphic, delay: number, duration: number, easing: EasingType) {\n if (!graphic) {\n return;\n }\n\n graphic.setAttributes({\n fillOpacity: graphic.attribute?.fillOpacity ?? 1,\n strokeOpacity: graphic.attribute?.strokeOpacity ?? 1\n });\n\n graphic.animate().wait(delay).to({ fillOpacity: 0, strokeOpacity: 0 }, duration, easing);\n}\n\nexport function segmentFadeOut(segment: Segment | ArcSegment, delay: number, duration: number, easing: EasingType) {\n if (!segment) {\n return;\n }\n\n // start symbol\n graphicFadeOut(segment.startSymbol, delay, duration, easing);\n\n // line\n segment.lines.forEach(line => graphicFadeOut(line, delay, duration, easing));\n graphicFadeOut((segment as ArcSegment).line, delay, duration, easing);\n\n // end symbol\n graphicFadeOut(segment.endSymbol, delay, duration, easing);\n}\n\nexport function tagFadeOut(tag: Tag, delay: number, duration: number, easing: EasingType) {\n if (!tag) {\n return;\n }\n\n // text\n graphicFadeOut(tag.getTextShape(), delay, duration, easing);\n\n // text background\n graphicFadeOut(tag.getBgRect(), delay, duration, easing);\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import type { EasingType, IArc, IImage, ILine, IPolygon, IRichText, ISymbol } from '@visactor/vrender-core';
2
+ import type { ArcSegment, Segment } from '../../segment';
3
+ import type { Tag } from '../../tag';
4
+ export declare function commonLineFadeIn(line: Segment | ArcSegment, label: Tag, duration: number, delay: number, easing: EasingType): void;
5
+ export declare function areaFadeIn(area: IPolygon, label: Tag, duration: number, delay: number, easing: EasingType): void;
6
+ export declare function arcAreaFadeIn(area: IArc, label: Tag, duration: number, delay: number, easing: EasingType): void;
7
+ export declare function pointFadeIn(itemLine: Segment, decorativeLine: ILine, item: Tag | IRichText | ISymbol | IImage, duration: number, delay: number, easing: EasingType): void;
@@ -0,0 +1,20 @@
1
+ import { graphicFadeIn, segmentFadeIn, tagFadeIn } from "./common";
2
+
3
+ export function commonLineFadeIn(line, label, duration, delay, easing) {
4
+ segmentFadeIn(line, delay, duration, easing), tagFadeIn(label, delay, duration, easing);
5
+ }
6
+
7
+ export function areaFadeIn(area, label, duration, delay, easing) {
8
+ graphicFadeIn(area, delay, duration, easing), tagFadeIn(label, delay, duration, easing);
9
+ }
10
+
11
+ export function arcAreaFadeIn(area, label, duration, delay, easing) {
12
+ graphicFadeIn(area, delay, duration, easing), tagFadeIn(label, delay, duration, easing);
13
+ }
14
+
15
+ export function pointFadeIn(itemLine, decorativeLine, item, duration, delay, easing) {
16
+ var _a;
17
+ segmentFadeIn(itemLine, delay, duration, easing), graphicFadeIn(decorativeLine, delay, duration, easing),
18
+ (null === (_a = item.getTextShape) || void 0 === _a ? void 0 : _a.call(item)) ? tagFadeIn(item, delay, duration, easing) : graphicFadeIn(item, delay, duration, easing);
19
+ }
20
+ //# sourceMappingURL=fade-in.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/marker/animate/fade-in.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEnE,MAAM,UAAU,gBAAgB,CAC9B,IAA0B,EAC1B,KAAU,EACV,QAAgB,EAChB,KAAa,EACb,MAAkB;IAElB,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC7C,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAc,EAAE,KAAU,EAAE,QAAgB,EAAE,KAAa,EAAE,MAAkB;IACxG,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC7C,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAU,EAAE,KAAU,EAAE,QAAgB,EAAE,KAAa,EAAE,MAAkB;IACvG,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC7C,SAAS,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,WAAW,CACzB,QAAiB,EACjB,cAAqB,EACrB,IAAwC,EACxC,QAAgB,EAChB,KAAa,EACb,MAAkB;;IAElB,aAAa,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IACjD,aAAa,CAAC,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IACvD,IAAI,MAAA,IAAI,CAAC,YAAY,oDAAI,EAAE;QAEzB,SAAS,CAAC,IAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;KACjD;SAAM;QAEL,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;KAC9C;AACH,CAAC","file":"fade-in.js","sourcesContent":["import type { EasingType, IArc, IImage, ILine, IPolygon, IRichText, ISymbol } from '@visactor/vrender-core';\nimport type { ArcSegment, Segment } from '../../segment';\nimport type { Tag } from '../../tag';\nimport { graphicFadeIn, segmentFadeIn, tagFadeIn } from './common';\n\nexport function commonLineFadeIn(\n line: Segment | ArcSegment,\n label: Tag,\n duration: number,\n delay: number,\n easing: EasingType\n) {\n segmentFadeIn(line, delay, duration, easing);\n tagFadeIn(label, delay, duration, easing);\n}\n\nexport function areaFadeIn(area: IPolygon, label: Tag, duration: number, delay: number, easing: EasingType) {\n graphicFadeIn(area, delay, duration, easing);\n tagFadeIn(label, delay, duration, easing);\n}\n\nexport function arcAreaFadeIn(area: IArc, label: Tag, duration: number, delay: number, easing: EasingType) {\n graphicFadeIn(area, delay, duration, easing);\n tagFadeIn(label, delay, duration, easing);\n}\n\nexport function pointFadeIn(\n itemLine: Segment,\n decorativeLine: ILine,\n item: Tag | IRichText | ISymbol | IImage,\n duration: number,\n delay: number,\n easing: EasingType\n) {\n segmentFadeIn(itemLine, delay, duration, easing);\n graphicFadeIn(decorativeLine, delay, duration, easing);\n if (item.getTextShape?.()) {\n // tag\n tagFadeIn(item as Tag, delay, duration, easing);\n } else {\n // symbol / richText / image\n graphicFadeIn(item, delay, duration, easing);\n }\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import type { EasingType, IArc, IImage, ILine, IPolygon, IRichText, ISymbol } from '@visactor/vrender-core';
2
+ import type { ArcSegment, Segment } from '../../segment';
3
+ import type { Tag } from '../../tag';
4
+ export declare function commonLineFadeOut(line: Segment | ArcSegment, label: Tag, duration: number, delay: number, easing: EasingType): void;
5
+ export declare function areaFadeOut(area: IPolygon, label: Tag, duration: number, delay: number, easing: EasingType): void;
6
+ export declare function arcAreaFadeOut(area: IArc, label: Tag, duration: number, delay: number, easing: EasingType): void;
7
+ export declare function pointFadeOut(itemLine: Segment, decorativeLine: ILine, item: Tag | IRichText | ISymbol | IImage, duration: number, delay: number, easing: EasingType): void;
@@ -0,0 +1,20 @@
1
+ import { graphicFadeOut, segmentFadeOut, tagFadeOut } from "./common";
2
+
3
+ export function commonLineFadeOut(line, label, duration, delay, easing) {
4
+ segmentFadeOut(line, delay, duration, easing), tagFadeOut(label, delay, duration, easing);
5
+ }
6
+
7
+ export function areaFadeOut(area, label, duration, delay, easing) {
8
+ graphicFadeOut(area, delay, duration, easing), tagFadeOut(label, delay, duration, easing);
9
+ }
10
+
11
+ export function arcAreaFadeOut(area, label, duration, delay, easing) {
12
+ graphicFadeOut(area, delay, duration, easing), tagFadeOut(label, delay, duration, easing);
13
+ }
14
+
15
+ export function pointFadeOut(itemLine, decorativeLine, item, duration, delay, easing) {
16
+ var _a;
17
+ segmentFadeOut(itemLine, delay, duration, easing), graphicFadeOut(decorativeLine, delay, duration, easing),
18
+ (null === (_a = item.getTextShape) || void 0 === _a ? void 0 : _a.call(item)) ? tagFadeOut(item, delay, duration, easing) : graphicFadeOut(item, delay, duration, easing);
19
+ }
20
+ //# sourceMappingURL=fade-out.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/marker/animate/fade-out.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtE,MAAM,UAAU,iBAAiB,CAC/B,IAA0B,EAC1B,KAAU,EACV,QAAgB,EAChB,KAAa,EACb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cSegment, Segment } from '../../segment';\nimport type { Tag } from '../../tag';\nimport { graphicFadeOut, segmentFadeOut, tagFadeOut } from './common';\n\nexport function commonLineFadeOut(\n line: Segment | ArcSegment,\n label: Tag,\n duration: number,\n delay: number,\n easing: EasingType\n) {\n segmentFadeOut(line, delay, duration, easing);\n tagFadeOut(label, delay, duration, easing);\n}\n\nexport function areaFadeOut(area: IPolygon, label: Tag, duration: number, delay: number, easing: EasingType) {\n graphicFadeOut(area, delay, duration, easing);\n tagFadeOut(label, delay, duration, easing);\n}\n\nexport function arcAreaFadeOut(area: IArc, label: Tag, duration: number, delay: number, easing: EasingType) {\n graphicFadeOut(area, delay, duration, easing);\n tagFadeOut(label, delay, duration, easing);\n}\n\nexport function pointFadeOut(\n itemLine: Segment,\n decorativeLine: ILine,\n item: Tag | IRichText | ISymbol | IImage,\n duration: number,\n delay: number,\n easing: EasingType\n) {\n segmentFadeOut(itemLine, delay, duration, easing);\n graphicFadeOut(decorativeLine, delay, duration, easing);\n if (item.getTextShape?.()) {\n // tag\n tagFadeOut(item as Tag, delay, duration, easing);\n } else {\n // symbol / richText / image\n graphicFadeOut(item, delay, duration, easing);\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/marker/animate/index.ts"],"names":[],"mappings":"","file":"index.js","sourcesContent":[""]}
@@ -0,0 +1,55 @@
1
+ import type { IArc, IGroup } from '@visactor/vrender-core';
2
+ import { Tag } from '../tag';
3
+ import { Marker } from './base';
4
+ import type { CommonMarkAreaAnimationType, MarkerAnimationState } from './type';
5
+ import { IMarkCommonArcLabelPosition, type MarkArcAreaAttrs } from './type';
6
+ import type { ComponentOptions } from '../interface';
7
+ export declare function registerMarkArcAreaAnimate(): void;
8
+ export declare class MarkArcArea extends Marker<MarkArcAreaAttrs, CommonMarkAreaAnimationType> {
9
+ name: string;
10
+ static defaultAttributes: {
11
+ interactive: boolean;
12
+ label: {
13
+ position: IMarkCommonArcLabelPosition;
14
+ textStyle: {
15
+ fill: string;
16
+ stroke: string;
17
+ lineWidth: number;
18
+ fontSize: number;
19
+ fontWeight: string;
20
+ fontStyle: string;
21
+ textAlign: string;
22
+ textBaseline: string;
23
+ };
24
+ padding: number[];
25
+ panel: {
26
+ visible: boolean;
27
+ cornerRadius: number;
28
+ fill: string;
29
+ fillOpacity: number;
30
+ };
31
+ };
32
+ areaStyle: {
33
+ fill: string;
34
+ visible: boolean;
35
+ };
36
+ };
37
+ private _area;
38
+ defaultUpdateAnimation: never;
39
+ defaultExitAnimation: import("./type").MarkerExitAnimation;
40
+ protected markerAnimate(state: MarkerAnimationState): void;
41
+ getArea(): IArc;
42
+ getLabel(): Tag;
43
+ constructor(attributes: MarkArcAreaAttrs, options?: ComponentOptions);
44
+ protected getPointAttrByPosition(position: IMarkCommonArcLabelPosition): {
45
+ position: {
46
+ x: number;
47
+ y: number;
48
+ };
49
+ angle: number;
50
+ };
51
+ protected setLabelPos(): void;
52
+ protected initMarker(container: IGroup): void;
53
+ protected updateMarker(): void;
54
+ protected isValidPoints(): boolean;
55
+ }
@@ -0,0 +1,143 @@
1
+ import { graphicCreator } from "@visactor/vrender-core";
2
+
3
+ import { merge } from "@visactor/vutils";
4
+
5
+ import { Tag } from "../tag";
6
+
7
+ import { Marker } from "./base";
8
+
9
+ import { DEFAULT_MARK_ARC_AREA_THEME } from "./config";
10
+
11
+ import { IMarkCommonArcLabelPosition } from "./type";
12
+
13
+ import { limitShapeInBounds } from "../util/limit-shape";
14
+
15
+ import { loadMarkArcAreaComponent } from "./register";
16
+
17
+ import { DEFAULT_STATES } from "../constant";
18
+
19
+ import { DefaultExitMarkerAnimation, DefaultUpdateMarkAreaAnimation, markArcAreaAnimate } from "./animate/animate";
20
+
21
+ loadMarkArcAreaComponent();
22
+
23
+ export function registerMarkArcAreaAnimate() {
24
+ MarkArcArea._animate = markArcAreaAnimate;
25
+ }
26
+
27
+ export class MarkArcArea extends Marker {
28
+ markerAnimate(state) {
29
+ MarkArcArea._animate && this._animationConfig && MarkArcArea._animate(this._area, this._label, this._animationConfig, state);
30
+ }
31
+ getArea() {
32
+ return this._area;
33
+ }
34
+ getLabel() {
35
+ return this._label;
36
+ }
37
+ constructor(attributes, options) {
38
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge({}, MarkArcArea.defaultAttributes, attributes)),
39
+ this.name = "markArcArea", this.defaultUpdateAnimation = DefaultUpdateMarkAreaAnimation,
40
+ this.defaultExitAnimation = DefaultExitMarkerAnimation;
41
+ }
42
+ getPointAttrByPosition(position) {
43
+ var _a, _b, _c, _d, _e, _f, _g, _h;
44
+ const {center: center, innerRadius: innerRadius, outerRadius: outerRadius, startAngle: startAngle, endAngle: endAngle, label: label} = this.attribute, {refX: refX = 0, refY: refY = 0} = label, labelTextHeight = this._label.getTextShape().attribute.visible ? Math.abs((null !== (_b = null === (_a = this._label.getTextShape().AABBBounds) || void 0 === _a ? void 0 : _a.y2) && void 0 !== _b ? _b : 0) - (null !== (_d = null === (_c = this._label.getTextShape()) || void 0 === _c ? void 0 : _c.AABBBounds.y1) && void 0 !== _d ? _d : 0)) : 0, labelRectHeight = this._label.getBgRect().attribute.visible ? Math.abs((null !== (_f = null === (_e = this._label.getBgRect().AABBBounds) || void 0 === _e ? void 0 : _e.y2) && void 0 !== _f ? _f : 0) - (null !== (_h = null === (_g = this._label.getBgRect()) || void 0 === _g ? void 0 : _g.AABBBounds.y1) && void 0 !== _h ? _h : 0)) : 0, labelHeight = Math.max(labelRectHeight, labelTextHeight);
45
+ let radius, angle, orthogonalOffsetDirection;
46
+ switch (position) {
47
+ case IMarkCommonArcLabelPosition.center:
48
+ radius = (innerRadius + outerRadius) / 2, angle = (startAngle + endAngle) / 2, orthogonalOffsetDirection = 0;
49
+ break;
50
+
51
+ case IMarkCommonArcLabelPosition.arcInnerStart:
52
+ radius = innerRadius, angle = startAngle, orthogonalOffsetDirection = -1;
53
+ break;
54
+
55
+ case IMarkCommonArcLabelPosition.arcOuterStart:
56
+ radius = outerRadius, angle = startAngle, orthogonalOffsetDirection = 1;
57
+ break;
58
+
59
+ case IMarkCommonArcLabelPosition.arcInnerEnd:
60
+ radius = innerRadius, angle = endAngle, orthogonalOffsetDirection = -1;
61
+ break;
62
+
63
+ case IMarkCommonArcLabelPosition.arcOuterEnd:
64
+ radius = outerRadius, angle = endAngle, orthogonalOffsetDirection = 1;
65
+ break;
66
+
67
+ case IMarkCommonArcLabelPosition.arcInnerMiddle:
68
+ radius = innerRadius, angle = (startAngle + endAngle) / 2, orthogonalOffsetDirection = -1;
69
+ break;
70
+
71
+ case IMarkCommonArcLabelPosition.arcOuterMiddle:
72
+ radius = outerRadius, angle = (startAngle + endAngle) / 2, orthogonalOffsetDirection = 1;
73
+ break;
74
+
75
+ default:
76
+ radius = innerRadius, angle = (startAngle + endAngle) / 2, orthogonalOffsetDirection = -1;
77
+ }
78
+ return {
79
+ position: {
80
+ x: center.x + (radius + orthogonalOffsetDirection * labelHeight / 2 + refY) * Math.cos(angle) + refX * Math.cos(angle - Math.PI / 2),
81
+ y: center.y + (radius + orthogonalOffsetDirection * labelHeight / 2 + refY) * Math.sin(angle) + refX * Math.sin(angle - Math.PI / 2)
82
+ },
83
+ angle: angle
84
+ };
85
+ }
86
+ setLabelPos() {
87
+ var _a;
88
+ if (this._label && this._area) {
89
+ const {label: label = {}} = this.attribute, {position: labelPosition = "arcInnerMiddle", autoRotate: autoRotate = !0} = label, labelAttr = this.getPointAttrByPosition(labelPosition);
90
+ if (this._label.setAttributes(Object.assign(Object.assign({}, labelAttr.position), {
91
+ angle: autoRotate ? labelAttr.angle - Math.PI / 2 + (null !== (_a = label.refAngle) && void 0 !== _a ? _a : 0) : 0
92
+ })), this.attribute.limitRect && label.confine) {
93
+ const {x: x, y: y, width: width, height: height} = this.attribute.limitRect;
94
+ limitShapeInBounds(this._label, {
95
+ x1: x,
96
+ y1: y,
97
+ x2: x + width,
98
+ y2: y + height
99
+ });
100
+ }
101
+ }
102
+ }
103
+ initMarker(container) {
104
+ const {center: center, innerRadius: innerRadius, outerRadius: outerRadius, startAngle: startAngle, endAngle: endAngle, areaStyle: areaStyle, label: label, state: state} = this.attribute, area = graphicCreator.arc(Object.assign({
105
+ x: center.x,
106
+ y: center.y,
107
+ innerRadius: innerRadius,
108
+ outerRadius: outerRadius,
109
+ startAngle: startAngle,
110
+ endAngle: endAngle
111
+ }, areaStyle));
112
+ area.states = merge({}, DEFAULT_STATES, null == state ? void 0 : state.area), area.name = "polar-mark-area-area",
113
+ this._area = area, container.add(area);
114
+ const markLabel = new Tag(Object.assign(Object.assign({}, label), {
115
+ state: {
116
+ panel: merge({}, DEFAULT_STATES, null == state ? void 0 : state.labelBackground),
117
+ text: merge({}, DEFAULT_STATES, null == state ? void 0 : state.label)
118
+ }
119
+ }));
120
+ markLabel.name = "mark-area-label", this._label = markLabel, container.add(markLabel),
121
+ this.setLabelPos();
122
+ }
123
+ updateMarker() {
124
+ const {center: center, innerRadius: innerRadius, outerRadius: outerRadius, startAngle: startAngle, endAngle: endAngle, areaStyle: areaStyle, label: label} = this.attribute;
125
+ this._area && this._area.setAttributes(Object.assign({
126
+ x: center.x,
127
+ y: center.y,
128
+ innerRadius: innerRadius,
129
+ outerRadius: outerRadius,
130
+ startAngle: startAngle,
131
+ endAngle: endAngle
132
+ }, areaStyle)), this._area && this._label.setAttributes(Object.assign({
133
+ dx: 0,
134
+ dy: 0
135
+ }, label)), this.setLabelPos();
136
+ }
137
+ isValidPoints() {
138
+ return !0;
139
+ }
140
+ }
141
+
142
+ MarkArcArea.defaultAttributes = DEFAULT_MARK_ARC_AREA_THEME;
143
+ //# sourceMappingURL=arc-area.js.map