@visactor/vrender-components 0.13.3-alpha.0 → 0.13.3-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.
- package/cjs/axis/overlap/auto-limit.js +1 -1
- package/cjs/axis/overlap/auto-limit.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/poptip/poptip.d.ts +1 -0
- package/cjs/poptip/poptip.js +40 -31
- package/cjs/poptip/poptip.js.map +1 -1
- package/cjs/poptip/register.d.ts +2 -1
- package/cjs/poptip/register.js +8 -4
- package/cjs/poptip/register.js.map +1 -1
- package/cjs/poptip/theme.d.ts +1 -0
- package/cjs/poptip/theme.js +24 -18
- package/cjs/poptip/theme.js.map +1 -1
- package/cjs/poptip/type.d.ts +4 -2
- package/cjs/poptip/type.js.map +1 -1
- package/dist/index.js +84 -56
- package/dist/index.min.js +1 -1
- package/es/axis/overlap/auto-limit.js +1 -1
- package/es/axis/overlap/auto-limit.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/poptip/poptip.d.ts +1 -0
- package/es/poptip/poptip.js +38 -31
- package/es/poptip/poptip.js.map +1 -1
- package/es/poptip/register.d.ts +2 -1
- package/es/poptip/register.js +7 -3
- package/es/poptip/register.js.map +1 -1
- package/es/poptip/theme.d.ts +1 -0
- package/es/poptip/theme.js +24 -18
- package/es/poptip/theme.js.map +1 -1
- package/es/poptip/type.d.ts +4 -2
- package/es/poptip/type.js.map +1 -1
- package/package.json +4 -4
|
@@ -11,7 +11,7 @@ function autoLimit(labels, config) {
|
|
|
11
11
|
!(0, vutils_1.isEmpty)(labels) && (0, vutils_1.isValidNumber)(limitLength) && labels.forEach((label => {
|
|
12
12
|
const limitLabelLength = 0 === label.attribute.angle || (0, vutils_1.isNil)(label.attribute.angle) ? "top" === orient || "bottom" === orient ? null : limitLength : limitLength / Math.sin(label.attribute.angle);
|
|
13
13
|
label.setAttributes({
|
|
14
|
-
maxLineWidth: limitLabelLength,
|
|
14
|
+
maxLineWidth: Math.abs(limitLabelLength),
|
|
15
15
|
ellipsis: ellipsis
|
|
16
16
|
});
|
|
17
17
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["axis/overlap/auto-limit.ts"],"names":[],"mappings":";;;AAKA,6CAAiE;AAQjE,SAAgB,SAAS,CAAC,MAAe,EAAE,MAAmB;IAC5D,MAAM,EAAE,WAAW,EAAE,QAAQ,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAEzD,IAAI,IAAA,gBAAO,EAAC,MAAM,CAAC,IAAI,CAAC,IAAA,sBAAa,EAAC,WAAW,CAAC,EAAE;QAClD,OAAO;KACR;IAED,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QAErB,MAAM,gBAAgB,GACpB,KAAK,CAAC,SAAS,CAAC,KAAK,KAAK,CAAC,IAAI,IAAA,cAAK,EAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC;YACzD,CAAC,CAAC,MAAM,KAAK,KAAK,IAAI,MAAM,KAAK,QAAQ;gBACvC,CAAC,CAAC,IAAI;gBACN,CAAC,CAAC,WAAW;YACf,CAAC,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACpD,KAAK,CAAC,aAAa,CAAC;YAClB,YAAY,EAAE,gBAAgB;
|
|
1
|
+
{"version":3,"sources":["axis/overlap/auto-limit.ts"],"names":[],"mappings":";;;AAKA,6CAAiE;AAQjE,SAAgB,SAAS,CAAC,MAAe,EAAE,MAAmB;IAC5D,MAAM,EAAE,WAAW,EAAE,QAAQ,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAEzD,IAAI,IAAA,gBAAO,EAAC,MAAM,CAAC,IAAI,CAAC,IAAA,sBAAa,EAAC,WAAW,CAAC,EAAE;QAClD,OAAO;KACR;IAED,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QAErB,MAAM,gBAAgB,GACpB,KAAK,CAAC,SAAS,CAAC,KAAK,KAAK,CAAC,IAAI,IAAA,cAAK,EAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC;YACzD,CAAC,CAAC,MAAM,KAAK,KAAK,IAAI,MAAM,KAAK,QAAQ;gBACvC,CAAC,CAAC,IAAI;gBACN,CAAC,CAAC,WAAW;YACf,CAAC,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QACpD,KAAK,CAAC,aAAa,CAAC;YAClB,YAAY,EAAE,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC;YACxC,QAAQ;SACT,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AApBD,8BAoBC","file":"auto-limit.js","sourcesContent":["/**\n * 自动省略\n */\n\nimport type { IText } from '@visactor/vrender';\nimport { isEmpty, isNil, isValidNumber } from '@visactor/vutils';\n\ntype LimitConfig = {\n orient: string;\n limitLength: number;\n ellipsis?: string;\n};\n\nexport function autoLimit(labels: IText[], config: LimitConfig) {\n const { limitLength, ellipsis = '...', orient } = config;\n\n if (isEmpty(labels) || !isValidNumber(limitLength)) {\n return;\n }\n\n labels.forEach(label => {\n // 如果水平并且文本未发生旋转,则不配置 maxLineWidth\n const limitLabelLength =\n label.attribute.angle === 0 || isNil(label.attribute.angle)\n ? orient === 'top' || orient === 'bottom'\n ? null\n : limitLength\n : limitLength / Math.sin(label.attribute.angle);\n label.setAttributes({\n maxLineWidth: Math.abs(limitLabelLength),\n ellipsis\n });\n });\n}\n"]}
|
package/cjs/index.d.ts
CHANGED
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.13.3-alpha.
|
|
20
|
+
}), exports.version = void 0, exports.version = "0.13.3-alpha.1", __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),
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,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.13.3-alpha.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,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.13.3-alpha.1\";\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"]}
|
package/cjs/poptip/poptip.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare class PopTip extends AbstractComponent<Required<PopTipAttributes>
|
|
|
5
5
|
static defaultAttributes: Partial<PopTipAttributes>;
|
|
6
6
|
constructor(attributes: PopTipAttributes);
|
|
7
7
|
protected render(): void;
|
|
8
|
+
positionList: string[];
|
|
8
9
|
getAngleAndOffset(position: string, width: number, height: number, size: [number, number]): {
|
|
9
10
|
angle: number;
|
|
10
11
|
offset: [number, number];
|
package/cjs/poptip/poptip.js
CHANGED
|
@@ -18,10 +18,11 @@ const vutils_1 = require("@visactor/vutils"), base_1 = require("../core/base");
|
|
|
18
18
|
|
|
19
19
|
class PopTip extends base_1.AbstractComponent {
|
|
20
20
|
constructor(attributes) {
|
|
21
|
-
super((0, vutils_1.merge)({}, PopTip.defaultAttributes, attributes)), this.name = "poptip"
|
|
21
|
+
super((0, vutils_1.merge)({}, PopTip.defaultAttributes, attributes)), this.name = "poptip",
|
|
22
|
+
this.positionList = [ "top", "tl", "tr", "bottom", "bl", "br", "left", "lt", "lb", "right", "rt", "rb" ];
|
|
22
23
|
}
|
|
23
24
|
render() {
|
|
24
|
-
var _a, _b;
|
|
25
|
+
var _a, _b, _c, _d, _e;
|
|
25
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,
|
|
26
27
|
vutils_1.normalizePadding)(padding), group = this.createOrUpdateChild("poptip-content", {
|
|
27
28
|
x: 0,
|
|
@@ -57,36 +58,44 @@ class PopTip extends base_1.AbstractComponent {
|
|
|
57
58
|
contentVisible && (height += contentHeight);
|
|
58
59
|
let popTipWidth = (0, vutils_1.max)(titleWidth + parsedPadding[1] + parsedPadding[3], contentWidth + parsedPadding[1] + parsedPadding[3]);
|
|
59
60
|
popTipWidth > maxWidth ? popTipWidth = maxWidth : popTipWidth < minWidth && (popTipWidth = minWidth);
|
|
60
|
-
const poptipHeight = parsedPadding[0] + parsedPadding[2] + height, {visible: bgVisible} = panel, backgroundStyle = __rest(panel, [ "visible" ]), symbolSize = null !== (_a = backgroundStyle.size) && void 0 !== _a ? _a : 12,
|
|
61
|
-
vutils_1.isArray)(symbolSize) ? symbolSize : [ symbolSize,
|
|
62
|
-
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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;
|
|
63
|
+
for (let i = 0; i < this.positionList.length; i++) {
|
|
64
|
+
const p = layout ? this.positionList[i] : position, {angle: angle, offset: offset, rectOffset: rectOffset} = this.getAngleAndOffset(p, popTipWidth, poptipHeight, (0,
|
|
65
|
+
vutils_1.isArray)(spaceSize) ? spaceSize : [ spaceSize, spaceSize - lineWidth ]);
|
|
66
|
+
if ((0, vutils_1.isBoolean)(bgVisible)) {
|
|
67
|
+
const offsetX = ((0, vutils_1.isArray)(symbolSize) ? symbolSize[0] : symbolSize) / 4, bgSymbol = group.createOrUpdateChild("poptip-symbol-panel", Object.assign(Object.assign({}, backgroundStyle), {
|
|
68
|
+
visible: bgVisible && (contentVisible || titleVisible),
|
|
69
|
+
x: offsetX,
|
|
70
|
+
y: 0,
|
|
71
|
+
anchor: [ 0, 0 ],
|
|
72
|
+
symbolType: "arrow2Left",
|
|
73
|
+
angle: angle,
|
|
74
|
+
dx: offset[0],
|
|
75
|
+
dy: offset[1],
|
|
76
|
+
size: symbolSize,
|
|
77
|
+
zIndex: -9
|
|
78
|
+
}), "symbol");
|
|
79
|
+
(0, vutils_1.isEmpty)(null == state ? void 0 : state.panel) || (bgSymbol.states = state.panel);
|
|
80
|
+
const bgRect = group.createOrUpdateChild("poptip-rect-panel", Object.assign(Object.assign({}, backgroundStyle), {
|
|
81
|
+
visible: bgVisible && (contentVisible || titleVisible),
|
|
82
|
+
x: 0,
|
|
83
|
+
y: 0,
|
|
84
|
+
width: popTipWidth,
|
|
85
|
+
height: poptipHeight,
|
|
86
|
+
zIndex: -10
|
|
87
|
+
}), "rect");
|
|
88
|
+
(0, vutils_1.isEmpty)(null == state ? void 0 : state.panel) || (bgRect.states = state.panel);
|
|
89
|
+
}
|
|
90
|
+
if (group.setAttributes({
|
|
91
|
+
x: -offset[0] + dx,
|
|
92
|
+
y: -offset[1] + dy
|
|
93
|
+
}), !layout || !range) break;
|
|
94
|
+
{
|
|
95
|
+
const b = this.AABBBounds, stageBounds = (new vutils_1.Bounds).setValue(0, 0, range[0], range[1]);
|
|
96
|
+
if ((0, vutils_1.rectInsideAnotherRect)(b, stageBounds, !1)) break;
|
|
97
|
+
}
|
|
85
98
|
}
|
|
86
|
-
group.setAttributes({
|
|
87
|
-
x: -offset[0] + dx,
|
|
88
|
-
y: -offset[1] + dy
|
|
89
|
-
});
|
|
90
99
|
}
|
|
91
100
|
getAngleAndOffset(position, width, height, size) {
|
|
92
101
|
const sizeH = size[1] / 2;
|
package/cjs/poptip/poptip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["poptip/poptip.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAaA,6CAA0G;AAC1G,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;IAyBhB,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,EAAoD,EAC5D,KAAK,GAAG,CAAC,EACT,QAAQ,GAAG,CAAC,EACZ,QAAQ,GAAG,QAAQ,EACnB,OAAO,GAAG,CAAC,EACX,OAAO,EACP,KAAK,EACL,EAAE,GAAG,CAAC,EACN,EAAE,GAAG,CAAC,EACP,GAAG,IAAI,CAAC,SAA6B,CAAC;QAEvC,MAAM,aAAa,GAAG,IAAA,yBAAgB,EAAC,OAAO,CAAC,CAAC;QAEhD,MAAM,KAAK,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EA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,CAAC,CAAC;iBACjD,CAAC;SACL;IACH,CAAC;;AAzNH,wBA0NC;AAvNQ,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,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 { isArray, isBoolean, isEmpty, isValid, max, merge, normalizePadding, pi } 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,\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 lineWidth = backgroundStyle.lineWidth ?? 1;\n const { angle, offset, rectOffset } = this.getAngleAndOffset(\n position,\n popTipWidth,\n poptipHeight,\n isArray(symbolSize) ? symbolSize : [symbolSize, symbolSize - 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 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: -10\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\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,6CAW0B;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;QAgMhB,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;IAvKlG,CAAC;IAES,MAAM;;QACd,MAAM,EACJ,KAAK,GAAG,EAAE,EACV,UAAU,GAAG,EAA2B,EACxC,QAAQ,EACR,OAAO,GAAG,EAAE,EACZ,YAAY,GAAG,EAA2B,EAC1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,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;;AAjPH,wBAkPC;AA/OQ,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,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 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 for (let i = 0; i < this.positionList.length; i++) {\n const p = layout ? this.positionList[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 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: -10\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 }\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"]}
|
package/cjs/poptip/register.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ContainerModule } from 'inversify';
|
|
2
2
|
import type { PopTipAttributes } from './type';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const popTipModule: ContainerModule;
|
|
4
4
|
export declare function loadPoptip(defaultPoptipTheme: PopTipAttributes): void;
|
|
5
|
+
export declare function setPoptipTheme(defaultPoptipTheme: PopTipAttributes): void;
|
package/cjs/poptip/register.js
CHANGED
|
@@ -2,17 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: !0
|
|
5
|
-
}), exports.loadPoptip = exports.
|
|
5
|
+
}), exports.setPoptipTheme = exports.loadPoptip = exports.popTipModule = void 0;
|
|
6
6
|
|
|
7
7
|
const vrender_1 = require("@visactor/vrender"), inversify_1 = require("inversify"), vutils_1 = require("@visactor/vutils"), contribution_1 = require("./contribution"), poptip_plugin_1 = require("./poptip-plugin"), theme_1 = require("./theme");
|
|
8
8
|
|
|
9
9
|
function loadPoptip(defaultPoptipTheme) {
|
|
10
|
-
(0, vutils_1.merge)(theme_1.theme.poptip, defaultPoptipTheme), vrender_1.container.load(exports.
|
|
10
|
+
(0, vutils_1.merge)(theme_1.theme.poptip, defaultPoptipTheme), vrender_1.container.load(exports.popTipModule);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
function setPoptipTheme(defaultPoptipTheme) {
|
|
14
|
+
(0, vutils_1.merge)(theme_1.theme.poptip, theme_1.DEFAULT_THEME, defaultPoptipTheme);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
exports.popTipModule = new inversify_1.ContainerModule((bind => {
|
|
14
18
|
bind(contribution_1.PopTipRenderContribution).toSelf().inSingletonScope(), bind(vrender_1.InteractiveSubRenderContribution).toService(contribution_1.PopTipRenderContribution),
|
|
15
19
|
bind(poptip_plugin_1.PopTipPlugin).toSelf().inSingletonScope(), bind(vrender_1.AutoEnablePlugins).toService(poptip_plugin_1.PopTipPlugin),
|
|
16
20
|
bind(poptip_plugin_1.PopTipForClipedTextPlugin).toSelf().inSingletonScope(), bind(vrender_1.AutoEnablePlugins).toService(poptip_plugin_1.PopTipForClipedTextPlugin);
|
|
17
|
-
})), exports.loadPoptip = loadPoptip;
|
|
21
|
+
})), exports.loadPoptip = loadPoptip, exports.setPoptipTheme = setPoptipTheme;
|
|
18
22
|
//# 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,
|
|
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"]}
|
package/cjs/poptip/theme.d.ts
CHANGED
package/cjs/poptip/theme.js
CHANGED
|
@@ -2,25 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: !0
|
|
5
|
-
}), exports.theme =
|
|
6
|
-
|
|
5
|
+
}), exports.theme = exports.DEFAULT_THEME = void 0;
|
|
6
|
+
|
|
7
|
+
const vutils_1 = require("@visactor/vutils");
|
|
8
|
+
|
|
9
|
+
exports.DEFAULT_THEME = {
|
|
10
|
+
visible: !0,
|
|
11
|
+
position: "auto",
|
|
12
|
+
titleStyle: {
|
|
13
|
+
fontSize: 16,
|
|
14
|
+
fill: "#08979c"
|
|
15
|
+
},
|
|
16
|
+
contentStyle: {
|
|
17
|
+
fontSize: 12,
|
|
18
|
+
fill: "green"
|
|
19
|
+
},
|
|
20
|
+
panel: {
|
|
7
21
|
visible: !0,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
fontSize: 12,
|
|
15
|
-
fill: "green"
|
|
16
|
-
},
|
|
17
|
-
panel: {
|
|
18
|
-
visible: !0,
|
|
19
|
-
fill: "#e6fffb",
|
|
20
|
-
stroke: "#87e8de",
|
|
21
|
-
lineWidth: 1,
|
|
22
|
-
cornerRadius: 4
|
|
23
|
-
}
|
|
22
|
+
fill: "#e6fffb",
|
|
23
|
+
size: 12,
|
|
24
|
+
space: 0,
|
|
25
|
+
stroke: "#87e8de",
|
|
26
|
+
lineWidth: 1,
|
|
27
|
+
cornerRadius: 4
|
|
24
28
|
}
|
|
29
|
+
}, exports.theme = {
|
|
30
|
+
poptip: (0, vutils_1.merge)({}, exports.DEFAULT_THEME)
|
|
25
31
|
};
|
|
26
32
|
//# sourceMappingURL=theme.js.map
|
package/cjs/poptip/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["poptip/theme.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"sources":["poptip/theme.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAG5B,QAAA,aAAa,GAAqB;IAC7C,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE;QACZ,IAAI,EAAE,SAAS;KAChB;IACD,YAAY,EAAE;QACZ,QAAQ,EAAE,EAAE;QACZ,IAAI,EAAE,OAAO;KACd;IACD,KAAK,EAAE;QACL,OAAO,EAAE,IAAI;QAEb,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,EAAE;QACR,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,CAAC;QACZ,YAAY,EAAE,CAAC;KAChB;CACF,CAAC;AAEW,QAAA,KAAK,GAAiC;IACjD,MAAM,EAAE,IAAA,cAAK,EAAC,EAAE,EAAE,qBAAa,CAAC;CACjC,CAAC","file":"theme.js","sourcesContent":["import { merge } from '@visactor/vutils';\nimport type { PopTipAttributes } from './type';\n\nexport const DEFAULT_THEME: PopTipAttributes = {\n visible: true,\n position: 'auto',\n titleStyle: {\n fontSize: 16,\n fill: '#08979c'\n },\n contentStyle: {\n fontSize: 12,\n fill: 'green'\n },\n panel: {\n visible: true,\n\n fill: '#e6fffb',\n size: 12,\n space: 0,\n stroke: '#87e8de',\n lineWidth: 1,\n cornerRadius: 4\n }\n};\n\nexport const theme: { poptip: PopTipAttributes } = {\n poptip: merge({}, DEFAULT_THEME)\n};\n"]}
|
package/cjs/poptip/type.d.ts
CHANGED
|
@@ -7,14 +7,16 @@ type StateStyle = {
|
|
|
7
7
|
panel?: State<Partial<IRectGraphicAttribute>>;
|
|
8
8
|
};
|
|
9
9
|
export type PopTipAttributes = {
|
|
10
|
-
position?: 'top' | 'tl' | 'tr' | 'bottom' | 'bl' | 'br' | 'left' | 'lt' | 'lb' | 'right' | 'rt' | 'rb';
|
|
10
|
+
position?: 'auto' | 'top' | 'tl' | 'tr' | 'bottom' | 'bl' | 'br' | 'left' | 'lt' | 'lb' | 'right' | 'rt' | 'rb';
|
|
11
11
|
title?: string | string[] | number | number[];
|
|
12
12
|
titleStyle?: Partial<ITextGraphicAttribute>;
|
|
13
13
|
content?: string | string[] | number | number[];
|
|
14
14
|
contentStyle?: Partial<ITextGraphicAttribute>;
|
|
15
15
|
space?: number;
|
|
16
16
|
padding?: Padding;
|
|
17
|
-
panel?: BackgroundAttributes & ISymbolGraphicAttribute
|
|
17
|
+
panel?: BackgroundAttributes & ISymbolGraphicAttribute & {
|
|
18
|
+
space?: number;
|
|
19
|
+
};
|
|
18
20
|
minWidth?: number;
|
|
19
21
|
maxWidth?: number;
|
|
20
22
|
visible?: boolean;
|
package/cjs/poptip/type.js.map
CHANGED
|
@@ -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?: '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;\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 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/dist/index.js
CHANGED
|
@@ -743,44 +743,65 @@
|
|
|
743
743
|
const poptipHeight = parsedPadding[0] + parsedPadding[2] + height;
|
|
744
744
|
const { visible: bgVisible, ...backgroundStyle } = panel;
|
|
745
745
|
const symbolSize = backgroundStyle.size ?? 12;
|
|
746
|
+
const spaceSize = vutils.isArray(symbolSize)
|
|
747
|
+
? [symbolSize[0] + (backgroundStyle.space ?? 0), symbolSize[1] + (backgroundStyle.space ?? 0)]
|
|
748
|
+
: symbolSize + (backgroundStyle.space ?? 0);
|
|
746
749
|
const lineWidth = backgroundStyle.lineWidth ?? 1;
|
|
747
|
-
const
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
750
|
+
const range = this.stage
|
|
751
|
+
? [this.stage.width, this.stage.height]
|
|
752
|
+
: undefined;
|
|
753
|
+
const layout = position === 'auto';
|
|
754
|
+
for (let i = 0; i < this.positionList.length; i++) {
|
|
755
|
+
const p = layout ? this.positionList[i] : position;
|
|
756
|
+
const { angle, offset, rectOffset } = this.getAngleAndOffset(p, popTipWidth, poptipHeight, vutils.isArray(spaceSize) ? spaceSize : [spaceSize, spaceSize - lineWidth]);
|
|
757
|
+
if (vutils.isBoolean(bgVisible)) {
|
|
758
|
+
const offsetX = (vutils.isArray(symbolSize) ? symbolSize[0] : symbolSize) / 4;
|
|
759
|
+
const bgSymbol = group.createOrUpdateChild('poptip-symbol-panel', {
|
|
760
|
+
...backgroundStyle,
|
|
761
|
+
visible: bgVisible && (contentVisible || titleVisible),
|
|
762
|
+
x: offsetX,
|
|
763
|
+
y: 0,
|
|
764
|
+
anchor: [0, 0],
|
|
765
|
+
symbolType: 'arrow2Left',
|
|
766
|
+
angle: angle,
|
|
767
|
+
dx: offset[0],
|
|
768
|
+
dy: offset[1],
|
|
769
|
+
size: symbolSize,
|
|
770
|
+
zIndex: -9
|
|
771
|
+
}, 'symbol');
|
|
772
|
+
if (!vutils.isEmpty(state?.panel)) {
|
|
773
|
+
bgSymbol.states = state.panel;
|
|
774
|
+
}
|
|
775
|
+
const bgRect = group.createOrUpdateChild('poptip-rect-panel', {
|
|
776
|
+
...backgroundStyle,
|
|
777
|
+
visible: bgVisible && (contentVisible || titleVisible),
|
|
778
|
+
x: 0,
|
|
779
|
+
y: 0,
|
|
780
|
+
width: popTipWidth,
|
|
781
|
+
height: poptipHeight,
|
|
782
|
+
zIndex: -10
|
|
783
|
+
}, 'rect');
|
|
784
|
+
if (!vutils.isEmpty(state?.panel)) {
|
|
785
|
+
bgRect.states = state.panel;
|
|
786
|
+
}
|
|
765
787
|
}
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
788
|
+
group.setAttributes({
|
|
789
|
+
x: -offset[0] + dx,
|
|
790
|
+
y: -offset[1] + dy
|
|
791
|
+
});
|
|
792
|
+
if (layout && range) {
|
|
793
|
+
const b = this.AABBBounds;
|
|
794
|
+
const stageBounds = new vutils.Bounds().setValue(0, 0, range[0], range[1]);
|
|
795
|
+
if (vutils.rectInsideAnotherRect(b, stageBounds, false)) {
|
|
796
|
+
break;
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
else {
|
|
800
|
+
break;
|
|
777
801
|
}
|
|
778
802
|
}
|
|
779
|
-
group.setAttributes({
|
|
780
|
-
x: -offset[0] + dx,
|
|
781
|
-
y: -offset[1] + dy
|
|
782
|
-
});
|
|
783
803
|
}
|
|
804
|
+
positionList = ['top', 'tl', 'tr', 'bottom', 'bl', 'br', 'left', 'lt', 'lb', 'right', 'rt', 'rb'];
|
|
784
805
|
getAngleAndOffset(position, width, height, size) {
|
|
785
806
|
const sizeH = size[1] / 2;
|
|
786
807
|
switch (position) {
|
|
@@ -875,27 +896,30 @@
|
|
|
875
896
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
876
897
|
};
|
|
877
898
|
|
|
878
|
-
const
|
|
879
|
-
|
|
899
|
+
const DEFAULT_THEME = {
|
|
900
|
+
visible: true,
|
|
901
|
+
position: 'auto',
|
|
902
|
+
titleStyle: {
|
|
903
|
+
fontSize: 16,
|
|
904
|
+
fill: '#08979c'
|
|
905
|
+
},
|
|
906
|
+
contentStyle: {
|
|
907
|
+
fontSize: 12,
|
|
908
|
+
fill: 'green'
|
|
909
|
+
},
|
|
910
|
+
panel: {
|
|
880
911
|
visible: true,
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
fontSize: 12,
|
|
888
|
-
fill: 'green'
|
|
889
|
-
},
|
|
890
|
-
panel: {
|
|
891
|
-
visible: true,
|
|
892
|
-
fill: '#e6fffb',
|
|
893
|
-
stroke: '#87e8de',
|
|
894
|
-
lineWidth: 1,
|
|
895
|
-
cornerRadius: 4
|
|
896
|
-
}
|
|
912
|
+
fill: '#e6fffb',
|
|
913
|
+
size: 12,
|
|
914
|
+
space: 0,
|
|
915
|
+
stroke: '#87e8de',
|
|
916
|
+
lineWidth: 1,
|
|
917
|
+
cornerRadius: 4
|
|
897
918
|
}
|
|
898
919
|
};
|
|
920
|
+
const theme = {
|
|
921
|
+
poptip: vutils.merge({}, DEFAULT_THEME)
|
|
922
|
+
};
|
|
899
923
|
|
|
900
924
|
function wrapPoptip(target, source) {
|
|
901
925
|
vutils.merge(target, theme.poptip, source);
|
|
@@ -1050,7 +1074,7 @@
|
|
|
1050
1074
|
injectable()
|
|
1051
1075
|
], PopTipForClipedTextPlugin);
|
|
1052
1076
|
|
|
1053
|
-
const
|
|
1077
|
+
const popTipModule = new ContainerModule(bind => {
|
|
1054
1078
|
bind(PopTipRenderContribution).toSelf().inSingletonScope();
|
|
1055
1079
|
bind(vrender.InteractiveSubRenderContribution).toService(PopTipRenderContribution);
|
|
1056
1080
|
bind(PopTipPlugin).toSelf().inSingletonScope();
|
|
@@ -1060,7 +1084,10 @@
|
|
|
1060
1084
|
});
|
|
1061
1085
|
function loadPoptip(defaultPoptipTheme) {
|
|
1062
1086
|
vutils.merge(theme.poptip, defaultPoptipTheme);
|
|
1063
|
-
vrender.container.load(
|
|
1087
|
+
vrender.container.load(popTipModule);
|
|
1088
|
+
}
|
|
1089
|
+
function setPoptipTheme(defaultPoptipTheme) {
|
|
1090
|
+
vutils.merge(theme.poptip, DEFAULT_THEME, defaultPoptipTheme);
|
|
1064
1091
|
}
|
|
1065
1092
|
|
|
1066
1093
|
class CrosshairBase extends AbstractComponent {
|
|
@@ -3255,7 +3282,7 @@
|
|
|
3255
3282
|
: limitLength
|
|
3256
3283
|
: limitLength / Math.sin(label.attribute.angle);
|
|
3257
3284
|
label.setAttributes({
|
|
3258
|
-
maxLineWidth: limitLabelLength,
|
|
3285
|
+
maxLineWidth: Math.abs(limitLabelLength),
|
|
3259
3286
|
ellipsis
|
|
3260
3287
|
});
|
|
3261
3288
|
});
|
|
@@ -9474,7 +9501,7 @@
|
|
|
9474
9501
|
}
|
|
9475
9502
|
}
|
|
9476
9503
|
|
|
9477
|
-
const version = "0.13.3-alpha.
|
|
9504
|
+
const version = "0.13.3-alpha.1";
|
|
9478
9505
|
|
|
9479
9506
|
exports.AbstractComponent = AbstractComponent;
|
|
9480
9507
|
exports.BasePlayer = BasePlayer;
|
|
@@ -9527,7 +9554,8 @@
|
|
|
9527
9554
|
exports.getSizeHandlerPath = getSizeHandlerPath;
|
|
9528
9555
|
exports.getVerticalPath = getVerticalPath;
|
|
9529
9556
|
exports.loadPoptip = loadPoptip;
|
|
9530
|
-
exports.
|
|
9557
|
+
exports.popTipModule = popTipModule;
|
|
9558
|
+
exports.setPoptipTheme = setPoptipTheme;
|
|
9531
9559
|
exports.version = version;
|
|
9532
9560
|
|
|
9533
9561
|
}));
|