@visactor/vrender-components 0.14.5 → 0.14.6-alpha.10

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 (45) hide show
  1. package/cjs/index.d.ts +2 -1
  2. package/cjs/index.js +2 -2
  3. package/cjs/index.js.map +1 -1
  4. package/cjs/jsx/component-type.d.ts +4 -0
  5. package/cjs/jsx/component-type.js +14 -0
  6. package/cjs/jsx/component-type.js.map +1 -0
  7. package/cjs/jsx/index.d.ts +1 -0
  8. package/cjs/jsx/index.js +21 -0
  9. package/cjs/jsx/index.js.map +1 -0
  10. package/cjs/link-path/index.js +1 -2
  11. package/cjs/link-path/type.js +2 -1
  12. package/cjs/marker/point.js +1 -1
  13. package/cjs/marker/type.js +1 -1
  14. package/cjs/poptip/poptip.js +26 -10
  15. package/cjs/poptip/poptip.js.map +1 -1
  16. package/cjs/poptip/register.js +6 -4
  17. package/cjs/poptip/register.js.map +1 -1
  18. package/cjs/poptip/type.d.ts +1 -0
  19. package/cjs/poptip/type.js.map +1 -1
  20. package/cjs/util/text.js +3 -3
  21. package/cjs/util/text.js.map +1 -1
  22. package/dist/index.js +57 -20
  23. package/dist/index.min.js +1 -1
  24. package/es/index.d.ts +2 -1
  25. package/es/index.js +3 -1
  26. package/es/index.js.map +1 -1
  27. package/es/jsx/component-type.d.ts +4 -0
  28. package/es/jsx/component-type.js +6 -0
  29. package/es/jsx/component-type.js.map +1 -0
  30. package/es/jsx/index.d.ts +1 -0
  31. package/es/jsx/index.js +2 -0
  32. package/es/jsx/index.js.map +1 -0
  33. package/es/link-path/index.js +1 -2
  34. package/es/link-path/type.js +2 -1
  35. package/es/marker/point.js +1 -1
  36. package/es/marker/type.js +1 -1
  37. package/es/poptip/poptip.js +27 -9
  38. package/es/poptip/poptip.js.map +1 -1
  39. package/es/poptip/register.js +6 -4
  40. package/es/poptip/register.js.map +1 -1
  41. package/es/poptip/type.d.ts +1 -0
  42. package/es/poptip/type.js.map +1 -1
  43. package/es/util/text.js +3 -3
  44. package/es/util/text.js.map +1 -1
  45. package/package.json +2 -2
package/cjs/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const version = "0.14.5";
1
+ export declare const version = "0.14.6-alpha.10";
2
2
  export * from './core/base';
3
3
  export * from './scrollbar';
4
4
  export * from './tag';
@@ -19,3 +19,4 @@ export * from './player';
19
19
  export * from './brush';
20
20
  export * from './tooltip';
21
21
  export * from './interface';
22
+ export * from './jsx';
package/cjs/index.js CHANGED
@@ -17,7 +17,7 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
17
17
 
18
18
  Object.defineProperty(exports, "__esModule", {
19
19
  value: !0
20
- }), exports.version = void 0, exports.version = "0.14.5", __exportStar(require("./core/base"), exports),
20
+ }), exports.version = void 0, exports.version = "0.14.6-alpha.10", __exportStar(require("./core/base"), exports),
21
21
  __exportStar(require("./scrollbar"), exports), __exportStar(require("./tag"), exports),
22
22
  __exportStar(require("./poptip"), exports), __exportStar(require("./crosshair"), exports),
23
23
  __exportStar(require("./label"), exports), __exportStar(require("./axis"), exports),
@@ -27,5 +27,5 @@ __exportStar(require("./legend"), exports), __exportStar(require("./title"), exp
27
27
  __exportStar(require("./indicator"), exports), __exportStar(require("./slider"), exports),
28
28
  __exportStar(require("./link-path"), exports), __exportStar(require("./player"), exports),
29
29
  __exportStar(require("./brush"), exports), __exportStar(require("./tooltip"), exports),
30
- __exportStar(require("./interface"), exports);
30
+ __exportStar(require("./interface"), exports), __exportStar(require("./jsx"), exports);
31
31
  //# sourceMappingURL=index.js.map
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,8CAA4B;AAC5B,8CAA4B;AAC5B,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,8CAA4B","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.14.5\";\n\nexport * from './core/base';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\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';\n"]}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAEzC,8CAA4B;AAC5B,8CAA4B;AAC5B,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,8CAA4B;AAC5B,wCAAsB","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.14.6-alpha.10\";\n\nexport * from './core/base';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\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';\n"]}
@@ -0,0 +1,4 @@
1
+ import type { IDefaultGraphicParamsType } from '@visactor/vrender';
2
+ import type { TagAttributes } from '../tag';
3
+ import { Tag } from '../tag';
4
+ export declare function VTag(params: IDefaultGraphicParamsType<TagAttributes>): Tag;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.VTag = void 0;
6
+
7
+ const tag_1 = require("../tag");
8
+
9
+ function VTag(params) {
10
+ return new tag_1.Tag(params ? params.attribute : {});
11
+ }
12
+
13
+ exports.VTag = VTag;
14
+ //# sourceMappingURL=component-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["jsx/component-type.ts"],"names":[],"mappings":";;;AAEA,gCAA6B;AAE7B,SAAgB,IAAI,CAAC,MAAgD;IACnE,OAAO,IAAI,SAAG,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACjD,CAAC;AAFD,oBAEC","file":"component-type.js","sourcesContent":["import type { IDefaultGraphicParamsType } from '@visactor/vrender';\nimport type { TagAttributes } from '../tag';\nimport { Tag } from '../tag';\n\nexport function VTag(params: IDefaultGraphicParamsType<TagAttributes>) {\n return new Tag(params ? params.attribute : {});\n}\n"]}
@@ -0,0 +1 @@
1
+ export * from './component-type';
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) {
4
+ void 0 === k2 && (k2 = k);
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ desc && !("get" in desc ? !m.__esModule : desc.writable || desc.configurable) || (desc = {
7
+ enumerable: !0,
8
+ get: function() {
9
+ return m[k];
10
+ }
11
+ }), Object.defineProperty(o, k2, desc);
12
+ } : function(o, m, k, k2) {
13
+ void 0 === k2 && (k2 = k), o[k2] = m[k];
14
+ }), __exportStar = this && this.__exportStar || function(m, exports) {
15
+ for (var p in m) "default" === p || Object.prototype.hasOwnProperty.call(exports, p) || __createBinding(exports, m, p);
16
+ };
17
+
18
+ Object.defineProperty(exports, "__esModule", {
19
+ value: !0
20
+ }), __exportStar(require("./component-type"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["jsx/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC","file":"index.js","sourcesContent":["export * from './component-type';\n"]}
@@ -17,5 +17,4 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
17
17
 
18
18
  Object.defineProperty(exports, "__esModule", {
19
19
  value: !0
20
- }), __exportStar(require("./link-path"), exports), __exportStar(require("./type"), exports);
21
- //# sourceMappingURL=index.js.map
20
+ }), __exportStar(require("./link-path"), exports), __exportStar(require("./type"), exports);
@@ -2,4 +2,5 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
- });
5
+ });
6
+ //# sourceMappingURL=type.js.map
@@ -127,4 +127,4 @@ class MarkPoint extends base_1.Marker {
127
127
  }
128
128
 
129
129
  exports.MarkPoint = MarkPoint, MarkPoint.defaultAttributes = config_1.DEFAULT_MARK_POINT_THEME;
130
- //# sourceMappingURL=point.js.map
130
+ //# sourceMappingURL=point.js.map
@@ -23,4 +23,4 @@ function(IMarkPointItemPosition) {
23
23
  IMarkPointItemPosition.insideTop = "insideTop", IMarkPointItemPosition.insideBottom = "insideBottom",
24
24
  IMarkPointItemPosition.insideMiddle = "insideMiddle";
25
25
  }(IMarkPointItemPosition = exports.IMarkPointItemPosition || (exports.IMarkPointItemPosition = {}));
26
- //# sourceMappingURL=type.js.map
26
+ //# sourceMappingURL=type.js.map
@@ -14,7 +14,7 @@ Object.defineProperty(exports, "__esModule", {
14
14
  value: !0
15
15
  }), exports.PopTip = void 0;
16
16
 
17
- const vutils_1 = require("@visactor/vutils"), base_1 = require("../core/base");
17
+ const vutils_1 = require("@visactor/vutils"), base_1 = require("../core/base"), _tBounds = new vutils_1.AABBBounds;
18
18
 
19
19
  class PopTip extends base_1.AbstractComponent {
20
20
  constructor(attributes) {
@@ -22,15 +22,15 @@ class PopTip extends base_1.AbstractComponent {
22
22
  this.positionList = [ "top", "tl", "tr", "bottom", "bl", "br", "left", "lt", "lb", "right", "rt", "rb" ];
23
23
  }
24
24
  render() {
25
- var _a, _b, _c, _d, _e;
26
- const {title: title = "", titleStyle: titleStyle = {}, position: position, content: content = "", contentStyle: contentStyle = {}, panel: panel = {}, space: space = 4, minWidth: minWidth = 0, maxWidth: maxWidth = 1 / 0, padding: padding = 4, visible: visible, state: state, dx: dx = 0, dy: dy = 0} = this.attribute, parsedPadding = (0,
25
+ var _a, _b, _c, _d, _e, _f, _g, _h;
26
+ const {title: title = "", titleStyle: titleStyle = {}, position: position, content: content = "", contentStyle: contentStyle = {}, panel: panel = {}, space: space = 4, minWidth: minWidth = 0, maxWidth: maxWidth = 1 / 0, padding: padding = 4, maxWidthPercent: maxWidthPercent, visible: visible, state: state, dx: dx = 0, dy: dy = 0} = this.attribute, parsedPadding = (0,
27
27
  vutils_1.normalizePadding)(padding), group = this.createOrUpdateChild("poptip-content", {
28
28
  x: 0,
29
29
  y: 0,
30
30
  zIndex: 1
31
31
  }, "group"), maxLineWidth = maxWidth - parsedPadding[1] - parsedPadding[3], titleVisible = (0,
32
32
  vutils_1.isValid)(title) && !1 !== visible, titleAttrs = Object.assign(Object.assign({
33
- text: title,
33
+ text: (0, vutils_1.isArray)(title) ? title : [ title ],
34
34
  visible: titleVisible
35
35
  }, titleStyle), {
36
36
  x: parsedPadding[3],
@@ -38,13 +38,13 @@ class PopTip extends base_1.AbstractComponent {
38
38
  maxLineWidth: maxLineWidth,
39
39
  textAlign: "left",
40
40
  textBaseline: "top"
41
- }), titleShape = group.createOrUpdateChild("poptip-title", titleAttrs, "text");
41
+ }), titleShape = group.createOrUpdateChild("poptip-title", titleAttrs, "wrapText");
42
42
  (0, vutils_1.isEmpty)(null == state ? void 0 : state.title) || (titleShape.states = state.title);
43
43
  const titleBounds = titleShape.AABBBounds, titleHeight = titleBounds.height(), titleWidth = titleBounds.width();
44
44
  let height = titleHeight + space;
45
45
  titleVisible || (height = 0);
46
46
  const contentVisible = (0, vutils_1.isValid)(content) && !1 !== visible, contentAttrs = Object.assign(Object.assign({
47
- text: content,
47
+ text: (0, vutils_1.isArray)(content) ? content : [ content ],
48
48
  visible: contentVisible
49
49
  }, contentStyle), {
50
50
  x: parsedPadding[3],
@@ -52,14 +52,28 @@ class PopTip extends base_1.AbstractComponent {
52
52
  maxLineWidth: maxLineWidth,
53
53
  textAlign: "left",
54
54
  textBaseline: "top"
55
- }), contentShape = group.createOrUpdateChild("poptip-content", contentAttrs, "text");
55
+ }), contentShape = group.createOrUpdateChild("poptip-content", contentAttrs, "wrapText");
56
56
  (0, vutils_1.isEmpty)(null == state ? void 0 : state.content) || (contentShape.states = state.content);
57
57
  const contentBounds = contentShape.AABBBounds, contentHeight = contentBounds.height(), contentWidth = contentBounds.width();
58
58
  contentVisible && (height += contentHeight);
59
59
  let popTipWidth = (0, vutils_1.max)(titleWidth + parsedPadding[1] + parsedPadding[3], contentWidth + parsedPadding[1] + parsedPadding[3]);
60
60
  popTipWidth > maxWidth ? popTipWidth = maxWidth : popTipWidth < minWidth && (popTipWidth = minWidth);
61
- const poptipHeight = parsedPadding[0] + parsedPadding[2] + height, {visible: bgVisible} = panel, backgroundStyle = __rest(panel, [ "visible" ]), symbolSize = null !== (_a = backgroundStyle.size) && void 0 !== _a ? _a : 12, spaceSize = (0,
62
- vutils_1.isArray)(symbolSize) ? [ symbolSize[0] + (null !== (_b = backgroundStyle.space) && void 0 !== _b ? _b : 0), symbolSize[1] + (null !== (_c = backgroundStyle.space) && void 0 !== _c ? _c : 0) ] : symbolSize + (null !== (_d = backgroundStyle.space) && void 0 !== _d ? _d : 0), lineWidth = null !== (_e = backgroundStyle.lineWidth) && void 0 !== _e ? _e : 1, range = this.stage ? [ this.stage.width, this.stage.height ] : void 0, layout = "auto" === position;
61
+ let poptipHeight = parsedPadding[0] + parsedPadding[2] + height;
62
+ const {visible: bgVisible} = panel, backgroundStyle = __rest(panel, [ "visible" ]), symbolSize = null !== (_a = backgroundStyle.size) && void 0 !== _a ? _a : 12, spaceSize = (0,
63
+ vutils_1.isArray)(symbolSize) ? [ symbolSize[0] + (null !== (_b = backgroundStyle.space) && void 0 !== _b ? _b : 0), symbolSize[1] + (null !== (_c = backgroundStyle.space) && void 0 !== _c ? _c : 0) ] : symbolSize + (null !== (_d = backgroundStyle.space) && void 0 !== _d ? _d : 0), lineWidth = null !== (_e = backgroundStyle.lineWidth) && void 0 !== _e ? _e : 1, range = this.stage ? [ null !== (_f = this.stage.viewWidth) && void 0 !== _f ? _f : this.stage.width, null !== (_g = this.stage.viewHeight) && void 0 !== _g ? _g : this.stage.height ] : void 0;
64
+ if (range) {
65
+ const b = this.AABBBounds, leftWidth = null !== (_h = this.attribute.x) && void 0 !== _h ? _h : b.x1, rightWidth = range[0] - b.x1;
66
+ let maxSpace = Math.max(leftWidth, rightWidth);
67
+ const buf = ((0, vutils_1.isArray)(symbolSize) ? symbolSize[0] : 12) + 3;
68
+ if (maxSpace = Math.min(maxSpace - buf, maxSpace * maxWidthPercent), maxSpace < popTipWidth) {
69
+ popTipWidth = maxSpace;
70
+ const buf = parsedPadding[1] + parsedPadding[3];
71
+ titleShape.setAttribute("maxLineWidth", maxSpace - buf), contentShape.setAttribute("maxLineWidth", maxSpace - buf),
72
+ poptipHeight = parsedPadding[0] + parsedPadding[2], titleVisible && (poptipHeight += titleShape.AABBBounds.height() + space),
73
+ poptipHeight += contentShape.AABBBounds.height();
74
+ }
75
+ }
76
+ const layout = "auto" === position;
63
77
  let maxBBoxI, maxBBoxSize = -1 / 0;
64
78
  for (let i = 0; i < this.positionList.length + 1; i++) {
65
79
  const p = layout ? this.positionList[i === this.positionList.length ? maxBBoxI : i] : position, {angle: angle, offset: offset, rectOffset: rectOffset} = this.getAngleAndOffset(p, popTipWidth, poptipHeight, (0,
@@ -95,7 +109,8 @@ class PopTip extends base_1.AbstractComponent {
95
109
  y: -offset[1] + dy
96
110
  }), !layout || !range) break;
97
111
  {
98
- const b = this.AABBBounds, stageBounds = (new vutils_1.Bounds).setValue(0, 0, range[0], range[1]);
112
+ _tBounds.setValue(0, 0, popTipWidth, poptipHeight).transformWithMatrix(group.globalTransMatrix);
113
+ const b = _tBounds, stageBounds = (new vutils_1.Bounds).setValue(0, 0, range[0], range[1]);
99
114
  if ((0, vutils_1.rectInsideAnotherRect)(b, stageBounds, !1)) break;
100
115
  {
101
116
  const bbox = (0, vutils_1.getRectIntersect)(b, stageBounds, !1), size = (bbox.x2 - bbox.x1) * (bbox.y2 - bbox.y1);
@@ -211,6 +226,7 @@ exports.PopTip = PopTip, PopTip.defaultAttributes = {
211
226
  textAlign: "left",
212
227
  textBaseline: "top"
213
228
  },
229
+ maxWidthPercent: .8,
214
230
  space: 8,
215
231
  padding: 10
216
232
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["poptip/poptip.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAaA,6CAY0B;AAC1B,uCAAiD;AAIjD,MAAa,MAAO,SAAQ,wBAA6C;IAwBvE,YAAY,UAA4B;QACtC,KAAK,CAAC,IAAA,cAAK,EAAC,EAAE,EAAE,MAAM,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC,CAAC;QAxBzD,SAAI,GAAG,QAAQ,CAAC;QA2MhB,iBAAY,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAlLlG,CAAC;IAES,MAAM;;QACd,MAAM,EACJ,KAAK,GAAG,EAAE,EACV,UAAU,GAAG,EAA2B,EACxC,QAAQ,EACR,OAAO,GAAG,EAAE,EACZ,YAAY,GAAG,EAA2B,EAC1C,KAAK,GAAG,EAAyE,EACjF,KAAK,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ACZ,QAAQ,EAAE,EAAE;QACZ,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,MAAM;QACjB,YAAY,EAAE,KAAK;KACpB;IACD,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,EAAE;CACZ,CAAC","file":"poptip.js","sourcesContent":["/**\n * @description PopTip组件\n */\nimport type {\n IGroup,\n IRect,\n ISymbol,\n ISymbolGraphicAttribute,\n IText,\n ITextGraphicAttribute,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vrender';\nimport {\n Bounds,\n getRectIntersect,\n isArray,\n isBoolean,\n isEmpty,\n isValid,\n max,\n merge,\n normalizePadding,\n pi,\n rectInsideAnotherRect\n} from '@visactor/vutils';\nimport { AbstractComponent } from '../core/base';\nimport type { BackgroundAttributes } from '../interface';\nimport type { PopTipAttributes } from './type';\n\nexport class PopTip extends AbstractComponent<Required<PopTipAttributes>> {\n name = 'poptip';\n\n static defaultAttributes: Partial<PopTipAttributes> = {\n position: 'rt',\n visible: true,\n title: null,\n content: null,\n titleStyle: {\n fontSize: 12,\n fill: '#000',\n textAlign: 'left',\n textBaseline: 'top'\n },\n contentStyle: {\n fontSize: 12,\n fill: '#000',\n textAlign: 'left',\n textBaseline: 'top'\n },\n space: 8,\n padding: 10\n };\n\n constructor(attributes: PopTipAttributes) {\n super(merge({}, PopTip.defaultAttributes, attributes));\n }\n\n protected render() {\n const {\n title = '',\n titleStyle = {} as ITextGraphicAttribute,\n position,\n content = '',\n contentStyle = {} as ITextGraphicAttribute,\n panel = {} as BackgroundAttributes & ISymbolGraphicAttribute & { space?: number },\n space = 4,\n minWidth = 0,\n maxWidth = Infinity,\n padding = 4,\n visible,\n state,\n dx = 0,\n dy = 0\n } = this.attribute as PopTipAttributes;\n\n const parsedPadding = normalizePadding(padding);\n\n const group = this.createOrUpdateChild('poptip-content', { x: 0, y: 0, zIndex: 1 }, 'group') as IGroup;\n\n const maxLineWidth = maxWidth - parsedPadding[1] - parsedPadding[3];\n\n const titleVisible = isValid(title) && visible !== false;\n const titleAttrs = {\n text: title,\n visible: titleVisible,\n ...titleStyle,\n x: parsedPadding[3],\n y: parsedPadding[0],\n maxLineWidth,\n textAlign: 'left' as TextAlignType,\n textBaseline: 'top' as TextBaselineType\n };\n\n const titleShape = group.createOrUpdateChild('poptip-title', titleAttrs, 'text') as IText;\n if (!isEmpty(state?.title)) {\n titleShape.states = state.title;\n }\n\n const titleBounds = titleShape.AABBBounds;\n const titleHeight = titleBounds.height();\n const titleWidth = titleBounds.width();\n let height = titleHeight + space;\n if (!titleVisible) {\n height = 0;\n }\n\n const contentVisible = isValid(content) && visible !== false;\n const contentAttrs = {\n text: content,\n visible: contentVisible,\n ...contentStyle,\n x: parsedPadding[3],\n y: parsedPadding[0] + height,\n maxLineWidth,\n textAlign: 'left' as TextAlignType,\n textBaseline: 'top' as TextBaselineType\n };\n\n const contentShape = group.createOrUpdateChild('poptip-content', contentAttrs, 'text') as IText;\n if (!isEmpty(state?.content)) {\n contentShape.states = state.content;\n }\n\n const contentBounds = contentShape.AABBBounds;\n const contentHeight = contentBounds.height();\n const contentWidth = contentBounds.width();\n\n if (contentVisible) {\n height += contentHeight;\n }\n\n // 计算整个popTip的宽高\n let popTipWidth = max(\n titleWidth + parsedPadding[1] + parsedPadding[3],\n contentWidth + parsedPadding[1] + parsedPadding[3]\n );\n if (popTipWidth > maxWidth) {\n popTipWidth = maxWidth;\n } else if (popTipWidth < minWidth) {\n popTipWidth = minWidth;\n }\n const poptipHeight = parsedPadding[0] + parsedPadding[2] + height;\n\n // 绘制背景层\n const { visible: bgVisible, ...backgroundStyle } = panel;\n const symbolSize = backgroundStyle.size ?? 12;\n const spaceSize: number | [number, number] = isArray(symbolSize)\n ? [symbolSize[0] + (backgroundStyle.space ?? 0), symbolSize[1] + (backgroundStyle.space ?? 0)]\n : (symbolSize as number) + (backgroundStyle.space ?? 0);\n const lineWidth = backgroundStyle.lineWidth ?? 1;\n const range: [number, number] | undefined = (this as any).stage\n ? [(this as any).stage.width, (this as any).stage.height]\n : undefined;\n\n const layout = position === 'auto';\n // 最多循环this.positionList次\n let maxBBoxI: number;\n let maxBBoxSize: number = -Infinity;\n for (let i = 0; i < this.positionList.length + 1; i++) {\n const p = layout ? this.positionList[i === this.positionList.length ? maxBBoxI : i] : position;\n const { angle, offset, rectOffset } = this.getAngleAndOffset(\n p,\n popTipWidth,\n poptipHeight,\n isArray(spaceSize) ? (spaceSize as [number, number]) : [spaceSize, spaceSize - lineWidth]\n );\n if (isBoolean(bgVisible)) {\n const offsetX = (isArray(symbolSize) ? symbolSize[0] : symbolSize) / 4;\n const bgSymbol = group.createOrUpdateChild(\n 'poptip-symbol-panel',\n {\n ...backgroundStyle,\n visible: bgVisible && (contentVisible || titleVisible),\n x: offsetX,\n y: 0,\n strokeBoundsBuffer: -1,\n boundsPadding: -2,\n anchor: [0, 0],\n symbolType: 'arrow2Left',\n angle: angle,\n dx: offset[0],\n dy: offset[1],\n size: symbolSize,\n zIndex: -9\n },\n 'symbol'\n ) as ISymbol;\n if (!isEmpty(state?.panel)) {\n bgSymbol.states = state.panel;\n }\n\n const bgRect = group.createOrUpdateChild(\n 'poptip-rect-panel',\n {\n ...backgroundStyle,\n visible: bgVisible && (contentVisible || titleVisible),\n x: 0,\n y: 0,\n width: popTipWidth,\n height: poptipHeight,\n zIndex: -8\n },\n 'rect'\n ) as IRect;\n if (!isEmpty(state?.panel)) {\n bgRect.states = state.panel;\n }\n }\n\n group.setAttributes({\n x: -offset[0] + dx,\n y: -offset[1] + dy\n });\n\n if (layout && range) {\n const b = (this as any).AABBBounds;\n const stageBounds = new Bounds().setValue(0, 0, range[0], range[1]);\n if (rectInsideAnotherRect(b, stageBounds, false)) {\n break;\n } else {\n const bbox = getRectIntersect(b, stageBounds, false);\n const size = (bbox.x2 - bbox.x1) * (bbox.y2 - bbox.y1);\n if (size > maxBBoxSize) {\n maxBBoxSize = size;\n maxBBoxI = i;\n }\n }\n } else {\n break;\n }\n }\n }\n\n positionList = ['top', 'tl', 'tr', 'bottom', 'bl', 'br', 'left', 'lt', 'lb', 'right', 'rt', 'rb'];\n\n getAngleAndOffset(\n position: string,\n width: number,\n height: number,\n size: [number, number]\n ): { angle: number; offset: [number, number]; rectOffset: [number, number] } {\n // const sizeW = size[0];\n const sizeH = size[1] / 2;\n switch (position) {\n case 'tl':\n return {\n angle: (pi / 2) * 3,\n offset: [width / 4, height + sizeH],\n rectOffset: [-width / 4, -height - size[1]]\n };\n case 'top':\n return { angle: (pi / 2) * 3, offset: [width / 2, height + sizeH], rectOffset: [0, -height - size[1]] };\n case 'tr':\n return {\n angle: (pi / 2) * 3,\n offset: [(width / 4) * 3, height + sizeH],\n rectOffset: [(width / 4) * 3, -height - size[1]]\n };\n case 'rt':\n return { angle: 0, offset: [-sizeH, height / 5], rectOffset: [(width / 4) * 3, -height - size[1]] };\n case 'right':\n return { angle: 0, offset: [-sizeH, height / 2], rectOffset: [(width / 4) * 3, -height - size[1]] };\n case 'rb':\n return { angle: 0, offset: [-sizeH, (height / 5) * 4], rectOffset: [(width / 4) * 3, -height - size[1]] };\n case 'bl':\n return { angle: pi / 2, offset: [width / 4, -sizeH], rectOffset: [-width / 4, -height - size[1]] };\n case 'bottom':\n return { angle: pi / 2, offset: [width / 2, -sizeH], rectOffset: [0, -height - size[1]] };\n case 'br':\n return { angle: pi / 2, offset: [(width / 4) * 3, -sizeH], rectOffset: [(width / 4) * 3, -height - size[1]] };\n case 'lt':\n return { angle: pi, offset: [width + sizeH, height / 5], rectOffset: [-width / 4, -height - size[1]] };\n case 'left':\n return { angle: pi, offset: [width + sizeH, height / 2], rectOffset: [0, -height - size[1]] };\n case 'lb':\n return {\n angle: pi,\n offset: [width + sizeH, (height / 5) * 4],\n rectOffset: [(width / 4) * 3, -height - size[1]]\n };\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["poptip/poptip.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAaA,6CAa0B;AAC1B,uCAAiD;AAIjD,MAAM,QAAQ,GAAG,I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,KAAK,GAAG,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACzG,KAAK,MAAM;gBACT,OAAO,EAAE,KAAK,EAAE,WAAE,EAAE,MAAM,EAAE,CAAC,KAAK,GAAG,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAChG,KAAK,IAAI;gBACP,OAAO;oBACL,KAAK,EAAE,WAAE;oBACT,MAAM,EAAE,CAAC,KAAK,GAAG,KAAK,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;oBACzC,UAAU,EAAE,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;iBACjD,CAAC;SACL;IACH,CAAC;;AAzRH,wBA0RC;AAvRQ,wBAAiB,GAA8B;IACpD,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,IAAI;IACb,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE;QACZ,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,MAAM;QACjB,YAAY,EAAE,KAAK;KACpB;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE,EAAE;QACZ,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,MAAM;QACjB,YAAY,EAAE,KAAK;KACpB;IACD,eAAe,EAAE,GAAG;IACpB,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,EAAE;CACZ,CAAC","file":"poptip.js","sourcesContent":["/**\n * @description PopTip组件\n */\nimport type {\n IGroup,\n IRect,\n ISymbol,\n ISymbolGraphicAttribute,\n IText,\n ITextGraphicAttribute,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vrender';\nimport {\n AABBBounds,\n Bounds,\n getRectIntersect,\n isArray,\n isBoolean,\n isEmpty,\n isValid,\n max,\n merge,\n normalizePadding,\n pi,\n rectInsideAnotherRect\n} from '@visactor/vutils';\nimport { AbstractComponent } from '../core/base';\nimport type { BackgroundAttributes } from '../interface';\nimport type { PopTipAttributes } from './type';\n\nconst _tBounds = new AABBBounds();\n\nexport class PopTip extends AbstractComponent<Required<PopTipAttributes>> {\n name = 'poptip';\n\n static defaultAttributes: Partial<PopTipAttributes> = {\n position: 'rt',\n visible: true,\n title: null,\n content: null,\n titleStyle: {\n fontSize: 12,\n fill: '#000',\n textAlign: 'left',\n textBaseline: 'top'\n },\n contentStyle: {\n fontSize: 12,\n fill: '#000',\n textAlign: 'left',\n textBaseline: 'top'\n },\n maxWidthPercent: 0.8,\n space: 8,\n padding: 10\n };\n\n constructor(attributes: PopTipAttributes) {\n super(merge({}, PopTip.defaultAttributes, attributes));\n }\n\n protected render() {\n const {\n title = '',\n titleStyle = {} as ITextGraphicAttribute,\n position,\n content = '',\n contentStyle = {} as ITextGraphicAttribute,\n panel = {} as BackgroundAttributes & ISymbolGraphicAttribute & { space?: number },\n space = 4,\n minWidth = 0,\n maxWidth = Infinity,\n padding = 4,\n maxWidthPercent,\n visible,\n state,\n dx = 0,\n dy = 0\n } = this.attribute as PopTipAttributes;\n\n const parsedPadding = normalizePadding(padding);\n\n const group = this.createOrUpdateChild('poptip-content', { x: 0, y: 0, zIndex: 1 }, 'group') as IGroup;\n\n const maxLineWidth = maxWidth - parsedPadding[1] - parsedPadding[3];\n\n const titleVisible = isValid(title) && visible !== false;\n const titleAttrs = {\n text: isArray(title) ? title : ([title] as any),\n visible: titleVisible,\n ...titleStyle,\n x: parsedPadding[3],\n y: parsedPadding[0],\n maxLineWidth,\n textAlign: 'left' as TextAlignType,\n textBaseline: 'top' as TextBaselineType\n };\n\n const titleShape = group.createOrUpdateChild('poptip-title', titleAttrs, 'wrapText') as IText;\n if (!isEmpty(state?.title)) {\n titleShape.states = state.title;\n }\n\n const titleBounds = titleShape.AABBBounds;\n const titleHeight = titleBounds.height();\n const titleWidth = titleBounds.width();\n let height = titleHeight + space;\n if (!titleVisible) {\n height = 0;\n }\n\n const contentVisible = isValid(content) && visible !== false;\n const contentAttrs = {\n text: isArray(content) ? content : ([content] as any),\n visible: contentVisible,\n ...contentStyle,\n x: parsedPadding[3],\n y: parsedPadding[0] + height,\n maxLineWidth,\n textAlign: 'left' as TextAlignType,\n textBaseline: 'top' as TextBaselineType\n };\n\n const contentShape = group.createOrUpdateChild('poptip-content', contentAttrs, 'wrapText') as IText;\n if (!isEmpty(state?.content)) {\n contentShape.states = state.content;\n }\n\n const contentBounds = contentShape.AABBBounds;\n const contentHeight = contentBounds.height();\n const contentWidth = contentBounds.width();\n\n if (contentVisible) {\n height += contentHeight;\n }\n\n // 计算整个popTip的宽高\n let popTipWidth = max(\n titleWidth + parsedPadding[1] + parsedPadding[3],\n contentWidth + parsedPadding[1] + parsedPadding[3]\n );\n if (popTipWidth > maxWidth) {\n popTipWidth = maxWidth;\n } else if (popTipWidth < minWidth) {\n popTipWidth = minWidth;\n }\n let poptipHeight = parsedPadding[0] + parsedPadding[2] + height;\n\n // 绘制背景层\n const { visible: bgVisible, ...backgroundStyle } = panel;\n const symbolSize = backgroundStyle.size ?? 12;\n const spaceSize: number | [number, number] = isArray(symbolSize)\n ? [symbolSize[0] + (backgroundStyle.space ?? 0), symbolSize[1] + (backgroundStyle.space ?? 0)]\n : (symbolSize as number) + (backgroundStyle.space ?? 0);\n const lineWidth = backgroundStyle.lineWidth ?? 1;\n const range: [number, number] | undefined = (this as any).stage\n ? [\n (this as any).stage.viewWidth ?? (this as any).stage.width,\n (this as any).stage.viewHeight ?? (this as any).stage.height\n ]\n : undefined;\n\n if (range) {\n // 尝试进行换行\n const b = (this as any).AABBBounds;\n const leftWidth = this.attribute.x ?? b.x1;\n const rightWidth = range[0] - b.x1;\n let maxSpace = Math.max(leftWidth, rightWidth);\n // 减一些buffer,buffer不能超过maxSpace的20%\n const buf = (isArray(symbolSize) ? symbolSize[0] : 12) + 3;\n maxSpace = Math.min(maxSpace - buf, maxSpace * maxWidthPercent);\n // 需要进行换行\n if (maxSpace < popTipWidth) {\n popTipWidth = maxSpace;\n const buf = parsedPadding[1] + parsedPadding[3];\n titleShape.setAttribute('maxLineWidth', maxSpace - buf);\n contentShape.setAttribute('maxLineWidth', maxSpace - buf);\n poptipHeight = parsedPadding[0] + parsedPadding[2];\n if (titleVisible) {\n poptipHeight += titleShape.AABBBounds.height() + space;\n }\n poptipHeight += contentShape.AABBBounds.height();\n }\n }\n\n const layout = position === 'auto';\n // 最多循环this.positionList次\n let maxBBoxI: number;\n let maxBBoxSize: number = -Infinity;\n for (let i = 0; i < this.positionList.length + 1; i++) {\n const p = layout ? this.positionList[i === this.positionList.length ? maxBBoxI : i] : position;\n const { angle, offset, rectOffset } = this.getAngleAndOffset(\n p,\n popTipWidth,\n poptipHeight,\n isArray(spaceSize) ? (spaceSize as [number, number]) : [spaceSize, spaceSize - lineWidth]\n );\n if (isBoolean(bgVisible)) {\n const offsetX = (isArray(symbolSize) ? symbolSize[0] : symbolSize) / 4;\n const bgSymbol = group.createOrUpdateChild(\n 'poptip-symbol-panel',\n {\n ...backgroundStyle,\n visible: bgVisible && (contentVisible || titleVisible),\n x: offsetX,\n y: 0,\n strokeBoundsBuffer: -1,\n boundsPadding: -2,\n anchor: [0, 0],\n symbolType: 'arrow2Left',\n angle: angle,\n dx: offset[0],\n dy: offset[1],\n size: symbolSize,\n zIndex: -9\n },\n 'symbol'\n ) as ISymbol;\n if (!isEmpty(state?.panel)) {\n bgSymbol.states = state.panel;\n }\n\n const bgRect = group.createOrUpdateChild(\n 'poptip-rect-panel',\n {\n ...backgroundStyle,\n visible: bgVisible && (contentVisible || titleVisible),\n x: 0,\n y: 0,\n width: popTipWidth,\n height: poptipHeight,\n zIndex: -8\n },\n 'rect'\n ) as IRect;\n if (!isEmpty(state?.panel)) {\n bgRect.states = state.panel;\n }\n }\n\n group.setAttributes({\n x: -offset[0] + dx,\n y: -offset[1] + dy\n });\n\n if (layout && range) {\n _tBounds.setValue(0, 0, popTipWidth, poptipHeight).transformWithMatrix(group.globalTransMatrix);\n const b = _tBounds;\n const stageBounds = new Bounds().setValue(0, 0, range[0], range[1]);\n if (rectInsideAnotherRect(b, stageBounds, false)) {\n break;\n } else {\n const bbox = getRectIntersect(b, stageBounds, false);\n const size = (bbox.x2 - bbox.x1) * (bbox.y2 - bbox.y1);\n if (size > maxBBoxSize) {\n maxBBoxSize = size;\n maxBBoxI = i;\n }\n }\n } else {\n break;\n }\n }\n }\n\n positionList = ['top', 'tl', 'tr', 'bottom', 'bl', 'br', 'left', 'lt', 'lb', 'right', 'rt', 'rb'];\n\n getAngleAndOffset(\n position: string,\n width: number,\n height: number,\n size: [number, number]\n ): { angle: number; offset: [number, number]; rectOffset: [number, number] } {\n // const sizeW = size[0];\n const sizeH = size[1] / 2;\n switch (position) {\n case 'tl':\n return {\n angle: (pi / 2) * 3,\n offset: [width / 4, height + sizeH],\n rectOffset: [-width / 4, -height - size[1]]\n };\n case 'top':\n return { angle: (pi / 2) * 3, offset: [width / 2, height + sizeH], rectOffset: [0, -height - size[1]] };\n case 'tr':\n return {\n angle: (pi / 2) * 3,\n offset: [(width / 4) * 3, height + sizeH],\n rectOffset: [(width / 4) * 3, -height - size[1]]\n };\n case 'rt':\n return { angle: 0, offset: [-sizeH, height / 5], rectOffset: [(width / 4) * 3, -height - size[1]] };\n case 'right':\n return { angle: 0, offset: [-sizeH, height / 2], rectOffset: [(width / 4) * 3, -height - size[1]] };\n case 'rb':\n return { angle: 0, offset: [-sizeH, (height / 5) * 4], rectOffset: [(width / 4) * 3, -height - size[1]] };\n case 'bl':\n return { angle: pi / 2, offset: [width / 4, -sizeH], rectOffset: [-width / 4, -height - size[1]] };\n case 'bottom':\n return { angle: pi / 2, offset: [width / 2, -sizeH], rectOffset: [0, -height - size[1]] };\n case 'br':\n return { angle: pi / 2, offset: [(width / 4) * 3, -sizeH], rectOffset: [(width / 4) * 3, -height - size[1]] };\n case 'lt':\n return { angle: pi, offset: [width + sizeH, height / 5], rectOffset: [-width / 4, -height - size[1]] };\n case 'left':\n return { angle: pi, offset: [width + sizeH, height / 2], rectOffset: [0, -height - size[1]] };\n case 'lb':\n return {\n angle: pi,\n offset: [width + sizeH, (height / 5) * 4],\n rectOffset: [(width / 4) * 3, -height - size[1]]\n };\n }\n }\n}\n"]}
@@ -14,9 +14,11 @@ function setPoptipTheme(defaultPoptipTheme) {
14
14
  (0, vutils_1.merge)(theme_1.theme.poptip, theme_1.DEFAULT_THEME, defaultPoptipTheme);
15
15
  }
16
16
 
17
- exports.popTipModule = new inversify_1.ContainerModule((bind => {
18
- bind(contribution_1.PopTipRenderContribution).toSelf().inSingletonScope(), bind(vrender_1.InteractiveSubRenderContribution).toService(contribution_1.PopTipRenderContribution),
19
- bind(poptip_plugin_1.PopTipPlugin).toSelf().inSingletonScope(), bind(vrender_1.AutoEnablePlugins).toService(poptip_plugin_1.PopTipPlugin),
20
- bind(poptip_plugin_1.PopTipForClipedTextPlugin).toSelf().inSingletonScope(), bind(vrender_1.AutoEnablePlugins).toService(poptip_plugin_1.PopTipForClipedTextPlugin);
17
+ exports.popTipModule = new inversify_1.ContainerModule(((bind, unbind, isBound, rebind) => {
18
+ isBound(contribution_1.PopTipRenderContribution) && isBound(poptip_plugin_1.PopTipPlugin) && isBound(poptip_plugin_1.PopTipForClipedTextPlugin) ? (rebind(contribution_1.PopTipRenderContribution).toSelf().inSingletonScope(),
19
+ rebind(poptip_plugin_1.PopTipPlugin).toSelf(), rebind(poptip_plugin_1.PopTipForClipedTextPlugin).toSelf()) : (bind(contribution_1.PopTipRenderContribution).toSelf().inSingletonScope(),
20
+ bind(vrender_1.InteractiveSubRenderContribution).toService(contribution_1.PopTipRenderContribution),
21
+ bind(poptip_plugin_1.PopTipPlugin).toSelf(), bind(vrender_1.AutoEnablePlugins).toService(poptip_plugin_1.PopTipPlugin),
22
+ bind(poptip_plugin_1.PopTipForClipedTextPlugin).toSelf(), bind(vrender_1.AutoEnablePlugins).toService(poptip_plugin_1.PopTipForClipedTextPlugin));
21
23
  })), exports.loadPoptip = loadPoptip, exports.setPoptipTheme = setPoptipTheme;
22
24
  //# sourceMappingURL=register.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["poptip/register.ts"],"names":[],"mappings":";;;AAAA,+CAAmG;AACnG,yCAA4C;AAC5C,6CAAyC;AACzC,iDAA0D;AAC1D,mDAA0E;AAE1E,mCAA+C;AAElC,QAAA,YAAY,GAAG,IAAI,2BAAe,CAAC,IAAI,CAAC,EAAE;IACrD,IAAI,CAAC,uCAAwB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC3D,IAAI,CAAC,0CAAgC,CAAC,CAAC,SAAS,CAAC,uCAAwB,CAAC,CAAC;IAE3E,IAAI,CAAC,4BAAY,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC/C,IAAI,CAAC,2BAAiB,CAAC,CAAC,SAAS,CAAC,4BAAY,CAAC,CAAC;IAEhD,IAAI,CAAC,yCAAyB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC5D,IAAI,CAAC,2BAAiB,CAAC,CAAC,SAAS,CAAC,yCAAyB,CAAC,CAAC;AAC/D,CAAC,CAAC,CAAC;AAEH,SAAgB,UAAU,CAAC,kBAAoC;IAC7D,IAAA,cAAK,EAAC,aAAK,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IACxC,mBAAS,CAAC,IAAI,CAAC,oBAAY,CAAC,CAAC;AAC/B,CAAC;AAHD,gCAGC;AAED,SAAgB,cAAc,CAAC,kBAAoC;IACjE,IAAA,cAAK,EAAC,aAAK,CAAC,MAAM,EAAE,qBAAa,EAAE,kBAAkB,CAAC,CAAC;AACzD,CAAC;AAFD,wCAEC","file":"register.js","sourcesContent":["import { container, InteractiveSubRenderContribution, AutoEnablePlugins } from '@visactor/vrender';\nimport { ContainerModule } from 'inversify';\nimport { merge } from '@visactor/vutils';\nimport { PopTipRenderContribution } from './contribution';\nimport { PopTipPlugin, PopTipForClipedTextPlugin } from './poptip-plugin';\nimport type { PopTipAttributes } from './type';\nimport { DEFAULT_THEME, theme } from './theme';\n\nexport const popTipModule = new ContainerModule(bind => {\n bind(PopTipRenderContribution).toSelf().inSingletonScope();\n bind(InteractiveSubRenderContribution).toService(PopTipRenderContribution);\n\n bind(PopTipPlugin).toSelf().inSingletonScope();\n bind(AutoEnablePlugins).toService(PopTipPlugin);\n\n bind(PopTipForClipedTextPlugin).toSelf().inSingletonScope();\n bind(AutoEnablePlugins).toService(PopTipForClipedTextPlugin);\n});\n\nexport function loadPoptip(defaultPoptipTheme: PopTipAttributes) {\n merge(theme.poptip, defaultPoptipTheme);\n container.load(popTipModule);\n}\n\nexport function setPoptipTheme(defaultPoptipTheme: PopTipAttributes) {\n merge(theme.poptip, DEFAULT_THEME, defaultPoptipTheme);\n}\n"]}
1
+ {"version":3,"sources":["poptip/register.ts"],"names":[],"mappings":";;;AAAA,+CAAmG;AACnG,yCAA4C;AAC5C,6CAAyC;AACzC,iDAA0D;AAC1D,mDAA0E;AAE1E,mCAA+C;AAElC,QAAA,YAAY,GAAG,IAAI,2BAAe,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IAChF,IAAI,CAAC,OAAO,CAAC,uCAAwB,CAAC,IAAI,CAAC,OAAO,CAAC,4BAAY,CAAC,IAAI,CAAC,OAAO,CAAC,yCAAyB,CAAC,EAAE;QACvG,IAAI,CAAC,uCAAwB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;QAC3D,IAAI,CAAC,0CAAgC,CAAC,CAAC,SAAS,CAAC,uCAAwB,CAAC,CAAC;QAE3E,IAAI,CAAC,4BAAY,CAAC,CAAC,MAAM,EAAE,CAAC;QAC5B,IAAI,CAAC,2BAAiB,CAAC,CAAC,SAAS,CAAC,4BAAY,CAAC,CAAC;QAEhD,IAAI,CAAC,yCAAyB,CAAC,CAAC,MAAM,EAAE,CAAC;QACzC,IAAI,CAAC,2BAAiB,CAAC,CAAC,SAAS,CAAC,yCAAyB,CAAC,CAAC;KAC9D;SAAM;QACL,MAAM,CAAC,uCAAwB,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;QAC7D,MAAM,CAAC,4BAAY,CAAC,CAAC,MAAM,EAAE,CAAC;QAC9B,MAAM,CAAC,yCAAyB,CAAC,CAAC,MAAM,EAAE,CAAC;KAC5C;AACH,CAAC,CAAC,CAAC;AAEH,SAAgB,UAAU,CAAC,kBAAoC;IAC7D,IAAA,cAAK,EAAC,aAAK,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IACxC,mBAAS,CAAC,IAAI,CAAC,oBAAY,CAAC,CAAC;AAC/B,CAAC;AAHD,gCAGC;AAED,SAAgB,cAAc,CAAC,kBAAoC;IACjE,IAAA,cAAK,EAAC,aAAK,CAAC,MAAM,EAAE,qBAAa,EAAE,kBAAkB,CAAC,CAAC;AACzD,CAAC;AAFD,wCAEC","file":"register.js","sourcesContent":["import { container, InteractiveSubRenderContribution, AutoEnablePlugins } from '@visactor/vrender';\nimport { ContainerModule } from 'inversify';\nimport { merge } from '@visactor/vutils';\nimport { PopTipRenderContribution } from './contribution';\nimport { PopTipPlugin, PopTipForClipedTextPlugin } from './poptip-plugin';\nimport type { PopTipAttributes } from './type';\nimport { DEFAULT_THEME, theme } from './theme';\n\nexport const popTipModule = new ContainerModule((bind, unbind, isBound, rebind) => {\n if (!isBound(PopTipRenderContribution) || !isBound(PopTipPlugin) || !isBound(PopTipForClipedTextPlugin)) {\n bind(PopTipRenderContribution).toSelf().inSingletonScope();\n bind(InteractiveSubRenderContribution).toService(PopTipRenderContribution);\n\n bind(PopTipPlugin).toSelf();\n bind(AutoEnablePlugins).toService(PopTipPlugin);\n\n bind(PopTipForClipedTextPlugin).toSelf();\n bind(AutoEnablePlugins).toService(PopTipForClipedTextPlugin);\n } else {\n rebind(PopTipRenderContribution).toSelf().inSingletonScope();\n rebind(PopTipPlugin).toSelf();\n rebind(PopTipForClipedTextPlugin).toSelf();\n }\n});\n\nexport function loadPoptip(defaultPoptipTheme: PopTipAttributes) {\n merge(theme.poptip, defaultPoptipTheme);\n container.load(popTipModule);\n}\n\nexport function setPoptipTheme(defaultPoptipTheme: PopTipAttributes) {\n merge(theme.poptip, DEFAULT_THEME, defaultPoptipTheme);\n}\n"]}
@@ -19,6 +19,7 @@ export type PopTipAttributes = {
19
19
  };
20
20
  minWidth?: number;
21
21
  maxWidth?: number;
22
+ maxWidthPercent?: number;
22
23
  visible?: boolean;
23
24
  visibleFunc?: (graphic: IGraphic) => boolean;
24
25
  state?: StateStyle;
@@ -1 +1 @@
1
- {"version":3,"sources":["poptip/type.ts"],"names":[],"mappings":"","file":"type.js","sourcesContent":["import type {\n IGraphic,\n IGroupGraphicAttribute,\n IRectGraphicAttribute,\n ISymbolGraphicAttribute,\n ITextGraphicAttribute\n} from '@visactor/vrender';\nimport type { Padding, State } from '../core/type';\nimport type { BackgroundAttributes } from '../interface';\n\ntype StateStyle = {\n /**\n * title 文本的状态配置\n */\n title?: State<Partial<ITextGraphicAttribute>>;\n /**\n * content 文本的状态配置\n */\n content?: State<Partial<ITextGraphicAttribute>>;\n /**\n * panel 背景的状态配置ß\n */\n panel?: State<Partial<IRectGraphicAttribute>>;\n};\n\nexport type PopTipAttributes = {\n /** 位置,参考arco design */\n position?: 'auto' | 'top' | 'tl' | 'tr' | 'bottom' | 'bl' | 'br' | 'left' | 'lt' | 'lb' | 'right' | 'rt' | 'rb';\n /**\n * 标题内容,如果需要进行换行,则使用数组形式,如 ['abc', '123']\n */\n title?: string | string[] | number | number[];\n /** 标题样式 */\n titleStyle?: Partial<ITextGraphicAttribute>;\n /**\n * 内容文本,如果需要进行换行,则使用数组形式,如 ['abc', '123']\n */\n content?: string | string[] | number | number[];\n /** 内容文本样式 */\n contentStyle?: Partial<ITextGraphicAttribute>;\n /**\n * 标题与内容的间距\n */\n space?: number;\n /**\n * 内部边距\n */\n padding?: Padding;\n /**\n * 标签的背景面板配置, TODO: 支持symbol形状\n */\n panel?: BackgroundAttributes & ISymbolGraphicAttribute & { space?: number };\n\n /**\n * 最小宽度,像素值\n * @default 30\n */\n minWidth?: number;\n /**\n * 最大宽度,像素值。当文字超过最大宽度时,会自动省略。\n */\n maxWidth?: number;\n\n visible?: boolean;\n visibleFunc?: (graphic: IGraphic) => boolean;\n state?: StateStyle;\n dx?: number;\n dy?: number;\n} & Omit<IGroupGraphicAttribute, 'background'>;\n\nexport type PoptipShapeAttributes = {\n /**\n * 是否展示 shape\n */\n visible: boolean;\n} & Partial<ISymbolGraphicAttribute>;\n"]}
1
+ {"version":3,"sources":["poptip/type.ts"],"names":[],"mappings":"","file":"type.js","sourcesContent":["import type {\n IGraphic,\n IGroupGraphicAttribute,\n IRectGraphicAttribute,\n ISymbolGraphicAttribute,\n ITextGraphicAttribute\n} from '@visactor/vrender';\nimport type { Padding, State } from '../core/type';\nimport type { BackgroundAttributes } from '../interface';\n\ntype StateStyle = {\n /**\n * title 文本的状态配置\n */\n title?: State<Partial<ITextGraphicAttribute>>;\n /**\n * content 文本的状态配置\n */\n content?: State<Partial<ITextGraphicAttribute>>;\n /**\n * panel 背景的状态配置ß\n */\n panel?: State<Partial<IRectGraphicAttribute>>;\n};\n\nexport type PopTipAttributes = {\n /** 位置,参考arco design */\n position?: 'auto' | 'top' | 'tl' | 'tr' | 'bottom' | 'bl' | 'br' | 'left' | 'lt' | 'lb' | 'right' | 'rt' | 'rb';\n /**\n * 标题内容,如果需要进行换行,则使用数组形式,如 ['abc', '123']\n */\n title?: string | string[] | number | number[];\n /** 标题样式 */\n titleStyle?: Partial<ITextGraphicAttribute>;\n /**\n * 内容文本,如果需要进行换行,则使用数组形式,如 ['abc', '123']\n */\n content?: string | string[] | number | number[];\n /** 内容文本样式 */\n contentStyle?: Partial<ITextGraphicAttribute>;\n /**\n * 标题与内容的间距\n */\n space?: number;\n /**\n * 内部边距\n */\n padding?: Padding;\n /**\n * 标签的背景面板配置, TODO: 支持symbol形状\n */\n panel?: BackgroundAttributes & ISymbolGraphicAttribute & { space?: number };\n\n /**\n * 最小宽度,像素值\n * @default 30\n */\n minWidth?: number;\n /**\n * 最大宽度,像素值。当文字超过最大宽度时,会自动省略。\n */\n maxWidth?: number;\n\n // 最大宽度比例\n maxWidthPercent?: number;\n\n visible?: boolean;\n visibleFunc?: (graphic: IGraphic) => boolean;\n state?: StateStyle;\n dx?: number;\n dy?: number;\n} & Omit<IGroupGraphicAttribute, 'background'>;\n\nexport type PoptipShapeAttributes = {\n /**\n * 是否展示 shape\n */\n visible: boolean;\n} & Partial<ISymbolGraphicAttribute>;\n"]}
package/cjs/util/text.js CHANGED
@@ -14,17 +14,17 @@ const vrender_1 = require("@visactor/vrender"), vutils_1 = require("@visactor/vu
14
14
  }, null != option ? option : {}), textSpec);
15
15
 
16
16
  function measureTextSize(text, textSpec) {
17
- var _a, _b;
17
+ var _a;
18
18
  if (!text) return {
19
19
  width: 0,
20
20
  height: 0
21
21
  };
22
22
  const bounds = (0, vrender_1.getTextBounds)({
23
23
  text: text,
24
- fontFamily: null !== (_a = textSpec.fontFamily) && void 0 !== _a ? _a : "",
24
+ fontFamily: textSpec.fontFamily,
25
25
  fontSize: textSpec.fontSize || 12,
26
26
  fontWeight: textSpec.fontWeight,
27
- textAlign: null !== (_b = textSpec.textAlign) && void 0 !== _b ? _b : "center",
27
+ textAlign: null !== (_a = textSpec.textAlign) && void 0 !== _a ? _a : "center",
28
28
  textBaseline: textSpec.textBaseline,
29
29
  ellipsis: !!textSpec.ellipsis,
30
30
  maxLineWidth: textSpec.maxLineWidth || 1 / 0,
@@ -1 +1 @@
1
- {"version":3,"sources":["util/text.ts"],"names":[],"mappings":";;;AAEA,+CAAkD;AAGlD,6CAA+C;AAC/C,0CAA+E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AAjBD,0CAiBC","file":"text.js","sourcesContent":["import type { ITextGraphicAttribute } from '@visactor/vrender';\n// eslint-disable-next-line no-duplicate-imports\nimport { getTextBounds } from '@visactor/vrender';\nimport type { ITextMeasureOption } from '@visactor/vutils';\n// eslint-disable-next-line no-duplicate-imports\nimport { TextMeasure } from '@visactor/vutils';\nimport { DEFAULT_TEXT_FONT_FAMILY, DEFAULT_TEXT_FONT_SIZE } from '../constant';\n\nexport const initTextMeasure = (\n textSpec?: Partial<ITextGraphicAttribute>,\n option?: Partial<ITextMeasureOption>,\n useNaiveCanvas?: boolean\n): TextMeasure<ITextGraphicAttribute> => {\n return new TextMeasure<ITextGraphicAttribute>(\n {\n defaultFontParams: {\n fontFamily: DEFAULT_TEXT_FONT_FAMILY,\n fontSize: DEFAULT_TEXT_FONT_SIZE\n },\n getTextBounds: useNaiveCanvas ? undefined : getTextBounds,\n specialCharSet: '-/: .,@%\\'\"~' + TextMeasure.ALPHABET_CHAR_SET + TextMeasure.ALPHABET_CHAR_SET.toUpperCase(),\n ...(option ?? {})\n },\n textSpec\n );\n};\n\n// FIXME: 和上一个方法统一,使用 TextMeasure 类\nexport function measureTextSize(text: string | number | string[] | number[], textSpec: Partial<ITextGraphicAttribute>) {\n if (!text) {\n return { width: 0, height: 0 };\n }\n const bounds = getTextBounds({\n text,\n fontFamily: textSpec.fontFamily ?? '',\n fontSize: textSpec.fontSize || 12,\n fontWeight: textSpec.fontWeight as any,\n textAlign: textSpec.textAlign ?? 'center',\n textBaseline: textSpec.textBaseline,\n ellipsis: !!textSpec.ellipsis,\n maxLineWidth: textSpec.maxLineWidth || Infinity,\n lineHeight: textSpec.fontSize || 12\n });\n\n return { width: bounds.width(), height: bounds.height() };\n}\n"]}
1
+ {"version":3,"sources":["util/text.ts"],"names":[],"mappings":";;;AAEA,+CAAkD;AAGlD,6CAA+C;AAC/C,0CAA+E;AAExE,MAAM,eAAe,GAAG,CAC7B,QAAyC,EACzC,MAAoC,EACpC,cAAwB,EACY,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imports\nimport { getTextBounds } from '@visactor/vrender';\nimport type { ITextMeasureOption } from '@visactor/vutils';\n// eslint-disable-next-line no-duplicate-imports\nimport { TextMeasure } from '@visactor/vutils';\nimport { DEFAULT_TEXT_FONT_FAMILY, DEFAULT_TEXT_FONT_SIZE } from '../constant';\n\nexport const initTextMeasure = (\n textSpec?: Partial<ITextGraphicAttribute>,\n option?: Partial<ITextMeasureOption>,\n useNaiveCanvas?: boolean\n): TextMeasure<ITextGraphicAttribute> => {\n return new TextMeasure<ITextGraphicAttribute>(\n {\n defaultFontParams: {\n fontFamily: DEFAULT_TEXT_FONT_FAMILY,\n fontSize: DEFAULT_TEXT_FONT_SIZE\n },\n getTextBounds: useNaiveCanvas ? undefined : getTextBounds,\n specialCharSet: '-/: .,@%\\'\"~' + TextMeasure.ALPHABET_CHAR_SET + TextMeasure.ALPHABET_CHAR_SET.toUpperCase(),\n ...(option ?? {})\n },\n textSpec\n );\n};\n\n// FIXME: 和上一个方法统一,使用 TextMeasure 类\nexport function measureTextSize(text: string | number | string[] | number[], textSpec: Partial<ITextGraphicAttribute>) {\n if (!text) {\n return { width: 0, height: 0 };\n }\n const bounds = getTextBounds({\n text,\n fontFamily: textSpec.fontFamily,\n fontSize: textSpec.fontSize || 12,\n fontWeight: textSpec.fontWeight as any,\n textAlign: textSpec.textAlign ?? 'center',\n textBaseline: textSpec.textBaseline,\n ellipsis: !!textSpec.ellipsis,\n maxLineWidth: textSpec.maxLineWidth || Infinity,\n lineHeight: textSpec.fontSize || 12\n });\n\n return { width: bounds.width(), height: bounds.height() };\n}\n"]}
package/dist/index.js CHANGED
@@ -561,16 +561,16 @@
561
561
  }, getTextBounds: useNaiveCanvas ? undefined : vrender.getTextBounds, specialCharSet: '-/: .,@%\'"~' + vutils.TextMeasure.ALPHABET_CHAR_SET + vutils.TextMeasure.ALPHABET_CHAR_SET.toUpperCase() }, (option !== null && option !== void 0 ? option : {})), textSpec);
562
562
  };
563
563
  function measureTextSize(text, textSpec) {
564
- var _a, _b;
564
+ var _a;
565
565
  if (!text) {
566
566
  return { width: 0, height: 0 };
567
567
  }
568
568
  const bounds = vrender.getTextBounds({
569
569
  text,
570
- fontFamily: (_a = textSpec.fontFamily) !== null && _a !== void 0 ? _a : '',
570
+ fontFamily: textSpec.fontFamily,
571
571
  fontSize: textSpec.fontSize || 12,
572
572
  fontWeight: textSpec.fontWeight,
573
- textAlign: (_b = textSpec.textAlign) !== null && _b !== void 0 ? _b : 'center',
573
+ textAlign: (_a = textSpec.textAlign) !== null && _a !== void 0 ? _a : 'center',
574
574
  textBaseline: textSpec.textBaseline,
575
575
  ellipsis: !!textSpec.ellipsis,
576
576
  maxLineWidth: textSpec.maxLineWidth || Infinity,
@@ -696,6 +696,7 @@
696
696
  }
697
697
  };
698
698
 
699
+ const _tBounds = new vutils.AABBBounds();
699
700
  class PopTip extends AbstractComponent {
700
701
  constructor(attributes) {
701
702
  super(vutils.merge({}, PopTip.defaultAttributes, attributes));
@@ -703,14 +704,14 @@
703
704
  this.positionList = ['top', 'tl', 'tr', 'bottom', 'bl', 'br', 'left', 'lt', 'lb', 'right', 'rt', 'rb'];
704
705
  }
705
706
  render() {
706
- var _a, _b, _c, _d, _e;
707
- const { title = '', titleStyle = {}, position, content = '', contentStyle = {}, panel = {}, space = 4, minWidth = 0, maxWidth = Infinity, padding = 4, visible, state, dx = 0, dy = 0 } = this.attribute;
707
+ var _a, _b, _c, _d, _e, _f, _g, _h;
708
+ const { title = '', titleStyle = {}, position, content = '', contentStyle = {}, panel = {}, space = 4, minWidth = 0, maxWidth = Infinity, padding = 4, maxWidthPercent, visible, state, dx = 0, dy = 0 } = this.attribute;
708
709
  const parsedPadding = vutils.normalizePadding(padding);
709
710
  const group = this.createOrUpdateChild('poptip-content', { x: 0, y: 0, zIndex: 1 }, 'group');
710
711
  const maxLineWidth = maxWidth - parsedPadding[1] - parsedPadding[3];
711
712
  const titleVisible = vutils.isValid(title) && visible !== false;
712
- const titleAttrs = Object.assign(Object.assign({ text: title, visible: titleVisible }, titleStyle), { x: parsedPadding[3], y: parsedPadding[0], maxLineWidth, textAlign: 'left', textBaseline: 'top' });
713
- const titleShape = group.createOrUpdateChild('poptip-title', titleAttrs, 'text');
713
+ const titleAttrs = Object.assign(Object.assign({ text: vutils.isArray(title) ? title : [title], visible: titleVisible }, titleStyle), { x: parsedPadding[3], y: parsedPadding[0], maxLineWidth, textAlign: 'left', textBaseline: 'top' });
714
+ const titleShape = group.createOrUpdateChild('poptip-title', titleAttrs, 'wrapText');
714
715
  if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.title)) {
715
716
  titleShape.states = state.title;
716
717
  }
@@ -722,8 +723,8 @@
722
723
  height = 0;
723
724
  }
724
725
  const contentVisible = vutils.isValid(content) && visible !== false;
725
- const contentAttrs = Object.assign(Object.assign({ text: content, visible: contentVisible }, contentStyle), { x: parsedPadding[3], y: parsedPadding[0] + height, maxLineWidth, textAlign: 'left', textBaseline: 'top' });
726
- const contentShape = group.createOrUpdateChild('poptip-content', contentAttrs, 'text');
726
+ const contentAttrs = Object.assign(Object.assign({ text: vutils.isArray(content) ? content : [content], visible: contentVisible }, contentStyle), { x: parsedPadding[3], y: parsedPadding[0] + height, maxLineWidth, textAlign: 'left', textBaseline: 'top' });
727
+ const contentShape = group.createOrUpdateChild('poptip-content', contentAttrs, 'wrapText');
727
728
  if (!vutils.isEmpty(state === null || state === void 0 ? void 0 : state.content)) {
728
729
  contentShape.states = state.content;
729
730
  }
@@ -740,7 +741,7 @@
740
741
  else if (popTipWidth < minWidth) {
741
742
  popTipWidth = minWidth;
742
743
  }
743
- const poptipHeight = parsedPadding[0] + parsedPadding[2] + height;
744
+ let poptipHeight = parsedPadding[0] + parsedPadding[2] + height;
744
745
  const { visible: bgVisible } = panel, backgroundStyle = __rest(panel, ["visible"]);
745
746
  const symbolSize = (_a = backgroundStyle.size) !== null && _a !== void 0 ? _a : 12;
746
747
  const spaceSize = vutils.isArray(symbolSize)
@@ -748,8 +749,30 @@
748
749
  : symbolSize + ((_d = backgroundStyle.space) !== null && _d !== void 0 ? _d : 0);
749
750
  const lineWidth = (_e = backgroundStyle.lineWidth) !== null && _e !== void 0 ? _e : 1;
750
751
  const range = this.stage
751
- ? [this.stage.width, this.stage.height]
752
+ ? [
753
+ (_f = this.stage.viewWidth) !== null && _f !== void 0 ? _f : this.stage.width,
754
+ (_g = this.stage.viewHeight) !== null && _g !== void 0 ? _g : this.stage.height
755
+ ]
752
756
  : undefined;
757
+ if (range) {
758
+ const b = this.AABBBounds;
759
+ const leftWidth = (_h = this.attribute.x) !== null && _h !== void 0 ? _h : b.x1;
760
+ const rightWidth = range[0] - b.x1;
761
+ let maxSpace = Math.max(leftWidth, rightWidth);
762
+ const buf = (vutils.isArray(symbolSize) ? symbolSize[0] : 12) + 3;
763
+ maxSpace = Math.min(maxSpace - buf, maxSpace * maxWidthPercent);
764
+ if (maxSpace < popTipWidth) {
765
+ popTipWidth = maxSpace;
766
+ const buf = parsedPadding[1] + parsedPadding[3];
767
+ titleShape.setAttribute('maxLineWidth', maxSpace - buf);
768
+ contentShape.setAttribute('maxLineWidth', maxSpace - buf);
769
+ poptipHeight = parsedPadding[0] + parsedPadding[2];
770
+ if (titleVisible) {
771
+ poptipHeight += titleShape.AABBBounds.height() + space;
772
+ }
773
+ poptipHeight += contentShape.AABBBounds.height();
774
+ }
775
+ }
753
776
  const layout = position === 'auto';
754
777
  let maxBBoxI;
755
778
  let maxBBoxSize = -Infinity;
@@ -772,7 +795,8 @@
772
795
  y: -offset[1] + dy
773
796
  });
774
797
  if (layout && range) {
775
- const b = this.AABBBounds;
798
+ _tBounds.setValue(0, 0, popTipWidth, poptipHeight).transformWithMatrix(group.globalTransMatrix);
799
+ const b = _tBounds;
776
800
  const stageBounds = new vutils.Bounds().setValue(0, 0, range[0], range[1]);
777
801
  if (vutils.rectInsideAnotherRect(b, stageBounds, false)) {
778
802
  break;
@@ -850,6 +874,7 @@
850
874
  textAlign: 'left',
851
875
  textBaseline: 'top'
852
876
  },
877
+ maxWidthPercent: 0.8,
853
878
  space: 8,
854
879
  padding: 10
855
880
  };
@@ -1056,13 +1081,20 @@
1056
1081
  injectable()
1057
1082
  ], PopTipForClipedTextPlugin);
1058
1083
 
1059
- const popTipModule = new ContainerModule(bind => {
1060
- bind(PopTipRenderContribution).toSelf().inSingletonScope();
1061
- bind(vrender.InteractiveSubRenderContribution).toService(PopTipRenderContribution);
1062
- bind(PopTipPlugin).toSelf().inSingletonScope();
1063
- bind(vrender.AutoEnablePlugins).toService(PopTipPlugin);
1064
- bind(PopTipForClipedTextPlugin).toSelf().inSingletonScope();
1065
- bind(vrender.AutoEnablePlugins).toService(PopTipForClipedTextPlugin);
1084
+ const popTipModule = new ContainerModule((bind, unbind, isBound, rebind) => {
1085
+ if (!isBound(PopTipRenderContribution) || !isBound(PopTipPlugin) || !isBound(PopTipForClipedTextPlugin)) {
1086
+ bind(PopTipRenderContribution).toSelf().inSingletonScope();
1087
+ bind(vrender.InteractiveSubRenderContribution).toService(PopTipRenderContribution);
1088
+ bind(PopTipPlugin).toSelf();
1089
+ bind(vrender.AutoEnablePlugins).toService(PopTipPlugin);
1090
+ bind(PopTipForClipedTextPlugin).toSelf();
1091
+ bind(vrender.AutoEnablePlugins).toService(PopTipForClipedTextPlugin);
1092
+ }
1093
+ else {
1094
+ rebind(PopTipRenderContribution).toSelf().inSingletonScope();
1095
+ rebind(PopTipPlugin).toSelf();
1096
+ rebind(PopTipForClipedTextPlugin).toSelf();
1097
+ }
1066
1098
  });
1067
1099
  function loadPoptip(defaultPoptipTheme) {
1068
1100
  vutils.merge(theme.poptip, defaultPoptipTheme);
@@ -10119,7 +10151,11 @@
10119
10151
  }
10120
10152
  Tooltip.defaultAttributes = defaultAttributes;
10121
10153
 
10122
- const version = "0.14.5";
10154
+ function VTag(params) {
10155
+ return new Tag(params ? params.attribute : {});
10156
+ }
10157
+
10158
+ const version = "0.14.6-alpha.10";
10123
10159
 
10124
10160
  exports.AbstractComponent = AbstractComponent;
10125
10161
  exports.ArcInfo = ArcInfo;
@@ -10170,6 +10206,7 @@
10170
10206
  exports.Tag = Tag;
10171
10207
  exports.Title = Title;
10172
10208
  exports.Tooltip = Tooltip;
10209
+ exports.VTag = VTag;
10173
10210
  exports.getHorizontalPath = getHorizontalPath;
10174
10211
  exports.getSizeHandlerPath = getSizeHandlerPath;
10175
10212
  exports.getVerticalPath = getVerticalPath;