@visactor/vrender-components 0.21.2-vstory.3 → 0.21.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/brush/brush.js +2 -1
- package/cjs/brush/type.js +1 -2
- package/cjs/core/base.d.ts +0 -1
- package/cjs/core/base.js +3 -3
- package/cjs/core/base.js.map +1 -1
- package/cjs/index.d.ts +1 -3
- package/cjs/index.js +2 -3
- package/cjs/index.js.map +1 -1
- package/cjs/interface.d.ts +1 -2
- package/cjs/interface.js.map +1 -1
- package/cjs/poptip/poptip.d.ts +2 -14
- package/cjs/poptip/poptip.js +51 -137
- package/cjs/poptip/poptip.js.map +1 -1
- package/cjs/poptip/type.d.ts +0 -6
- package/cjs/poptip/type.js.map +1 -1
- package/dist/index.es.js +4982 -5777
- package/es/brush/brush.js +2 -1
- package/es/brush/type.js +1 -2
- package/es/core/base.d.ts +0 -1
- package/es/core/base.js +3 -4
- package/es/core/base.js.map +1 -1
- package/es/index.d.ts +1 -3
- package/es/index.js +1 -5
- package/es/index.js.map +1 -1
- package/es/interface.d.ts +1 -2
- package/es/interface.js.map +1 -1
- package/es/poptip/poptip.d.ts +2 -14
- package/es/poptip/poptip.js +49 -136
- package/es/poptip/poptip.js.map +1 -1
- package/es/poptip/type.d.ts +0 -6
- package/es/poptip/type.js.map +1 -1
- package/package.json +4 -4
- package/cjs/label-item/index.d.ts +0 -2
- package/cjs/label-item/index.js +0 -21
- package/cjs/label-item/index.js.map +0 -1
- package/cjs/label-item/label-item.d.ts +0 -29
- package/cjs/label-item/label-item.js +0 -265
- package/cjs/label-item/label-item.js.map +0 -1
- package/cjs/label-item/register.d.ts +0 -1
- package/cjs/label-item/register.js +0 -15
- package/cjs/label-item/register.js.map +0 -1
- package/cjs/label-item/type.d.ts +0 -31
- package/cjs/label-item/type.js +0 -6
- package/cjs/label-item/type.js.map +0 -1
- package/cjs/weather/index.d.ts +0 -1
- package/cjs/weather/index.js +0 -21
- package/cjs/weather/index.js.map +0 -1
- package/cjs/weather/register.d.ts +0 -1
- package/cjs/weather/register.js +0 -14
- package/cjs/weather/register.js.map +0 -1
- package/cjs/weather/type.d.ts +0 -24
- package/cjs/weather/type.js +0 -6
- package/cjs/weather/type.js.map +0 -1
- package/cjs/weather/weather-box.d.ts +0 -13
- package/cjs/weather/weather-box.js +0 -129
- package/cjs/weather/weather-box.js.map +0 -1
- package/es/label-item/index.d.ts +0 -2
- package/es/label-item/index.js +0 -4
- package/es/label-item/index.js.map +0 -1
- package/es/label-item/label-item.d.ts +0 -29
- package/es/label-item/label-item.js +0 -263
- package/es/label-item/label-item.js.map +0 -1
- package/es/label-item/register.d.ts +0 -1
- package/es/label-item/register.js +0 -6
- package/es/label-item/register.js.map +0 -1
- package/es/label-item/type.d.ts +0 -31
- package/es/label-item/type.js +0 -2
- package/es/label-item/type.js.map +0 -1
- package/es/weather/index.d.ts +0 -1
- package/es/weather/index.js +0 -2
- package/es/weather/index.js.map +0 -1
- package/es/weather/register.d.ts +0 -1
- package/es/weather/register.js +0 -6
- package/es/weather/register.js.map +0 -1
- package/es/weather/type.d.ts +0 -24
- package/es/weather/type.js +0 -2
- package/es/weather/type.js.map +0 -1
- package/es/weather/weather-box.d.ts +0 -13
- package/es/weather/weather-box.js +0 -127
- package/es/weather/weather-box.js.map +0 -1
package/cjs/brush/brush.js
CHANGED
|
@@ -188,4 +188,5 @@ class Brush extends base_1.AbstractComponent {
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
exports.Brush = Brush, Brush.defaultAttributes = config_1.DEFAULT_BRUSH_ATTRIBUTES;
|
|
191
|
+
exports.Brush = Brush, Brush.defaultAttributes = config_1.DEFAULT_BRUSH_ATTRIBUTES;
|
|
192
|
+
//# sourceMappingURL=brush.js.map
|
package/cjs/brush/type.js
CHANGED
|
@@ -8,5 +8,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
IOperateType.drawStart = "drawStart", IOperateType.drawEnd = "drawEnd", IOperateType.drawing = "drawing",
|
|
9
9
|
IOperateType.moving = "moving", IOperateType.moveStart = "moveStart", IOperateType.moveEnd = "moveEnd",
|
|
10
10
|
IOperateType.brushClear = "brushClear";
|
|
11
|
-
}(IOperateType = exports.IOperateType || (exports.IOperateType = {}));
|
|
12
|
-
//# sourceMappingURL=type.js.map
|
|
11
|
+
}(IOperateType = exports.IOperateType || (exports.IOperateType = {}));
|
package/cjs/core/base.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ export declare abstract class AbstractComponent<T extends IGroupGraphicAttribute
|
|
|
6
6
|
attribute: Partial<T>;
|
|
7
7
|
protected mode?: '2d' | '3d';
|
|
8
8
|
protected skipDefault?: boolean;
|
|
9
|
-
protected _skipRenderAttributes: string[];
|
|
10
9
|
constructor(attributes: T, options?: ComponentOptions);
|
|
11
10
|
setAttribute(key: string, value: any, forceUpdateTag?: boolean | undefined): void;
|
|
12
11
|
setAttributes(params: Partial<T>, forceUpdateTag?: boolean | undefined): void;
|
package/cjs/core/base.js
CHANGED
|
@@ -8,7 +8,7 @@ const vrender_core_1 = require("@visactor/vrender-core"), vutils_1 = require("@v
|
|
|
8
8
|
|
|
9
9
|
class AbstractComponent extends vrender_core_1.Group {
|
|
10
10
|
constructor(attributes, options) {
|
|
11
|
-
super(attributes),
|
|
11
|
+
super(attributes), (null == options ? void 0 : options.mode) && (this.mode = options.mode,
|
|
12
12
|
this.setMode(options.mode)), (null == options ? void 0 : options.skipDefault) && (this.skipDefault = !0),
|
|
13
13
|
this.setTheme({
|
|
14
14
|
common: {
|
|
@@ -21,13 +21,13 @@ class AbstractComponent extends vrender_core_1.Group {
|
|
|
21
21
|
setAttribute(key, value, forceUpdateTag) {
|
|
22
22
|
(0, vutils_1.isPlainObject)(this.attribute[key]) && (0, vutils_1.isPlainObject)(value) && !(0,
|
|
23
23
|
vutils_1.isFunction)(this.attribute[key]) && !(0, vutils_1.isFunction)(value) ? (0,
|
|
24
|
-
vutils_1.merge)(this.attribute[key], value) : this.attribute[key] = value,
|
|
24
|
+
vutils_1.merge)(this.attribute[key], value) : this.attribute[key] = value, GROUP_ATTRIBUTES.includes(key) || this.render(),
|
|
25
25
|
this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTag(key) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(),
|
|
26
26
|
this.addUpdatePositionTag(), this.onAttributeUpdate();
|
|
27
27
|
}
|
|
28
28
|
setAttributes(params, forceUpdateTag) {
|
|
29
29
|
const keys = Object.keys(params);
|
|
30
|
-
this._mergeAttributes(params, keys), keys.every((key =>
|
|
30
|
+
this._mergeAttributes(params, keys), keys.every((key => GROUP_ATTRIBUTES.includes(key))) || this.render(),
|
|
31
31
|
this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTags(keys) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(),
|
|
32
32
|
this.addUpdatePositionTag(), this.onAttributeUpdate();
|
|
33
33
|
}
|
package/cjs/core/base.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/core/base.ts"],"names":[],"mappings":";;;AAIA,yDAA4D;AAE5D,6CAA2E;AAG3E,MAAM,gBAAgB,GAAG;IACvB,GAAG;IACH,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,YAAY;IACZ,SAAS;IACT,MAAM;IACN,UAAU;IACV,kBAAkB;IAClB,QAAQ;IACR,QAAQ;CACT,CAAC;AAEF,MAAsB,iBAA6E,SAAQ,oBAAK;
|
|
1
|
+
{"version":3,"sources":["../src/core/base.ts"],"names":[],"mappings":"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","file":"base.js","sourcesContent":["/**\n * @description 组件基类\n */\nimport type { IGroupGraphicAttribute } from '@visactor/vrender-core';\nimport { Group, CustomEvent } from '@visactor/vrender-core';\nimport type { Dict } from '@visactor/vutils';\nimport { merge, isFunction, isPlainObject, isNil } from '@visactor/vutils';\nimport type { ComponentOptions } from '../interface';\n\nconst GROUP_ATTRIBUTES = [\n 'x',\n 'y',\n 'dx',\n 'dy',\n 'scaleX',\n 'scaleY',\n 'angle',\n 'anchor',\n 'postMatrix',\n 'visible',\n 'clip',\n 'pickable',\n 'childrenPickable',\n 'zIndex',\n 'cursor'\n];\n\nexport abstract class AbstractComponent<T extends IGroupGraphicAttribute = IGroupGraphicAttribute> extends Group {\n declare attribute: Partial<T>;\n\n protected mode?: '2d' | '3d';\n\n protected skipDefault?: boolean;\n\n constructor(attributes: T, options?: ComponentOptions) {\n super(attributes);\n\n if (options?.mode) {\n this.mode = options.mode;\n\n this.setMode(options.mode);\n }\n\n if (options?.skipDefault) {\n this.skipDefault = true;\n }\n // 组件需要精准 bounds,所以将这个 strokeBoundsBuffer 设置为 0,否则会影响包围盒的获取\n this.setTheme({\n common: {\n strokeBoundsBuffer: 0\n }\n });\n this.attribute = attributes;\n // 这里调用渲染和事件绑定逻辑\n this.onSetStage(() => {\n this.render();\n this.bindEvents();\n });\n }\n\n /**\n * @override\n * 更新单个属性值\n * @param key\n * @param value\n * @param forceUpdateTag\n */\n setAttribute(key: string, value: any, forceUpdateTag?: boolean | undefined): void {\n // overwrite when previous or next attribute is function\n if (\n isPlainObject(this.attribute[key]) &&\n isPlainObject(value) &&\n !isFunction(this.attribute[key]) &&\n !isFunction(value)\n ) {\n merge(this.attribute[key], value);\n } else {\n this.attribute[key] = value;\n }\n\n // HACK: 待优化\n if (!GROUP_ATTRIBUTES.includes(key as string)) {\n this.render();\n }\n\n this.valid = this.isValid();\n if (!this.updateShapeAndBoundsTagSetted() && (forceUpdateTag || this.needUpdateTag(key as string))) {\n this.addUpdateShapeAndBoundsTag();\n } else {\n this.addUpdateBoundTag();\n }\n this.addUpdatePositionTag();\n this.onAttributeUpdate();\n }\n\n // @ts-ignore\n setAttributes(params: Partial<T>, forceUpdateTag?: boolean | undefined): void {\n const keys = Object.keys(params) as (keyof T)[];\n this._mergeAttributes(params, keys);\n\n // HACK: 待优化\n if (!keys.every(key => GROUP_ATTRIBUTES.includes(key as string))) {\n this.render();\n }\n\n this.valid = this.isValid();\n // 没有设置shape&bounds的tag\n if (!this.updateShapeAndBoundsTagSetted() && (forceUpdateTag || this.needUpdateTags(keys as string[]))) {\n this.addUpdateShapeAndBoundsTag();\n } else {\n this.addUpdateBoundTag();\n }\n this.addUpdatePositionTag();\n this.onAttributeUpdate();\n }\n\n protected _mergeAttributes(params: Partial<T>, keys?: (keyof T)[]) {\n if (isNil(keys)) {\n keys = Object.keys(params) as (keyof T)[];\n }\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i] as keyof Partial<T>;\n // overwrite when previous or next attribute is function\n if (isPlainObject(this.attribute[key]) && !isFunction(this.attribute[key]) && !isFunction(params[key])) {\n merge(this.attribute[key], params[key]);\n } else {\n this.attribute[key] = params[key];\n }\n }\n }\n\n protected bindEvents() {\n // please override\n }\n\n protected abstract render(): void;\n\n // 图形元素 id\n protected _getNodeId(id: string) {\n return `${this.id ?? this._uid}-${this.name}-${id}`;\n }\n\n // 用于 emit 组件自己的事件\n protected _dispatchEvent(eventName: string, details?: Dict<any>) {\n // 封装事件\n const changeEvent = new CustomEvent(eventName, details);\n // FIXME: 需要在 vrender 的事件系统支持\n // @ts-ignore\n changeEvent.manager = this.stage?.eventSystem.manager;\n\n this.dispatchEvent(changeEvent);\n }\n}\n"]}
|
package/cjs/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const version = "0.21.2
|
|
1
|
+
export declare const version = "0.21.2";
|
|
2
2
|
export * from './core/base';
|
|
3
3
|
export * from './core/type';
|
|
4
4
|
export * from './scrollbar';
|
|
@@ -26,6 +26,4 @@ export * from './jsx';
|
|
|
26
26
|
export * from './checkbox';
|
|
27
27
|
export * from './radio';
|
|
28
28
|
export * from './empty-tip';
|
|
29
|
-
export * from './weather';
|
|
30
29
|
export * from './util';
|
|
31
|
-
export * from './label-item';
|
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.21.2
|
|
20
|
+
}), exports.version = void 0, exports.version = "0.21.2", __exportStar(require("./core/base"), exports),
|
|
21
21
|
__exportStar(require("./core/type"), exports), __exportStar(require("./scrollbar"), exports),
|
|
22
22
|
__exportStar(require("./tag"), exports), __exportStar(require("./poptip"), exports),
|
|
23
23
|
__exportStar(require("./crosshair"), exports), __exportStar(require("./label"), exports),
|
|
@@ -31,6 +31,5 @@ __exportStar(require("./brush"), exports), __exportStar(require("./tooltip"), ex
|
|
|
31
31
|
__exportStar(require("./timeline"), exports), __exportStar(require("./interface"), exports),
|
|
32
32
|
__exportStar(require("./jsx"), exports), __exportStar(require("./checkbox"), exports),
|
|
33
33
|
__exportStar(require("./radio"), exports), __exportStar(require("./empty-tip"), exports),
|
|
34
|
-
__exportStar(require("./
|
|
35
|
-
__exportStar(require("./label-item"), exports);
|
|
34
|
+
__exportStar(require("./util"), exports);
|
|
36
35
|
//# sourceMappingURL=index.js.map
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,8CAA4B;AAC5B,8CAA4B;AAC5B,8CAA4B;AAC5B,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,6CAA2B;AAC3B,8CAA4B;AAC5B,wCAAsB;AACtB,6CAA2B;AAC3B,0CAAwB;AACxB,8CAA4B;AAC5B,yCAAuB","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.21.2\";\n\nexport * from './core/base';\nexport * from './core/type';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './timeline';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\nexport * from './radio';\nexport * from './empty-tip';\nexport * from './util';\n"]}
|
package/cjs/interface.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ICustomPath2D, IGraphicAttribute, IGroup, IRectGraphicAttribute
|
|
1
|
+
import type { ICustomPath2D, IGraphicAttribute, IGroup, IRectGraphicAttribute } from '@visactor/vrender-core';
|
|
2
2
|
export type Direction = 'horizontal' | 'vertical';
|
|
3
3
|
export type OrientType = 'top' | 'right' | 'bottom' | 'left';
|
|
4
4
|
export type BackgroundAttributes = {
|
|
@@ -9,5 +9,4 @@ export type IDelayType = 'debounce' | 'throttle';
|
|
|
9
9
|
export interface ComponentOptions {
|
|
10
10
|
skipDefault?: boolean;
|
|
11
11
|
mode?: '2d' | '3d';
|
|
12
|
-
timeline?: ITimeline;
|
|
13
12
|
}
|
package/cjs/interface.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type {
|
|
1
|
+
{"version":3,"sources":["../src/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { ICustomPath2D, IGraphicAttribute, IGroup, IRectGraphicAttribute } from '@visactor/vrender-core';\n\nexport type Direction = 'horizontal' | 'vertical';\n\nexport type OrientType = 'top' | 'right' | 'bottom' | 'left';\n\nexport type BackgroundAttributes = {\n /**\n * 是否绘制背景层\n */\n visible: boolean;\n /**\n * 自定义路径\n * @since 0.19.19\n */\n customShape?: (container: IGroup, attrs: Partial<IGraphicAttribute>, path: ICustomPath2D) => ICustomPath2D;\n} & Partial<IRectGraphicAttribute>;\n\nexport type IDelayType = 'debounce' | 'throttle';\n\nexport interface ComponentOptions {\n /** skip default attributes of component */\n skipDefault?: boolean;\n /** the mode of component, only axis support 3d mode now */\n mode?: '2d' | '3d';\n}\n"]}
|
package/cjs/poptip/poptip.d.ts
CHANGED
|
@@ -1,27 +1,15 @@
|
|
|
1
|
-
import { type IGroup, type IText } from '@visactor/vrender-core';
|
|
2
1
|
import { AbstractComponent } from '../core/base';
|
|
3
2
|
import type { ComponentOptions } from '../interface';
|
|
4
3
|
import type { PopTipAttributes } from './type';
|
|
5
4
|
export declare class PopTip extends AbstractComponent<Required<PopTipAttributes>> {
|
|
6
5
|
name: string;
|
|
7
6
|
static defaultAttributes: Partial<PopTipAttributes>;
|
|
8
|
-
titleShape?: IText;
|
|
9
|
-
contentShape?: IText;
|
|
10
|
-
group?: IGroup;
|
|
11
7
|
constructor(attributes: PopTipAttributes, options?: ComponentOptions);
|
|
12
8
|
protected render(): void;
|
|
13
9
|
positionList: string[];
|
|
14
|
-
getAngleAndOffset(position: string, width: number, height: number, size: [number, number]
|
|
10
|
+
getAngleAndOffset(position: string, width: number, height: number, size: [number, number]): {
|
|
15
11
|
angle: number;
|
|
16
12
|
offset: [number, number];
|
|
13
|
+
rectOffset: [number, number];
|
|
17
14
|
};
|
|
18
|
-
appearAnimate(animateConfig: {
|
|
19
|
-
duration?: number;
|
|
20
|
-
easing?: string;
|
|
21
|
-
wave?: number;
|
|
22
|
-
}): void;
|
|
23
|
-
disappearAnimate(animateConfig: {
|
|
24
|
-
duration?: number;
|
|
25
|
-
easing?: string;
|
|
26
|
-
}): void;
|
|
27
15
|
}
|
package/cjs/poptip/poptip.js
CHANGED
|
@@ -14,29 +14,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
14
14
|
value: !0
|
|
15
15
|
}), exports.PopTip = void 0;
|
|
16
16
|
|
|
17
|
-
const
|
|
17
|
+
const vutils_1 = require("@visactor/vutils"), base_1 = require("../core/base"), register_1 = require("./register"), _tBounds = new vutils_1.AABBBounds;
|
|
18
18
|
|
|
19
19
|
(0, register_1.loadPoptipComponent)();
|
|
20
20
|
|
|
21
|
-
const tlStr = "M -0.5 -0.5, L -0.5 0.5, L 0.5 -0.5, Z", blStr = "M -0.5 -0.5, L -0.5 0.5, L 0.5 0.5, Z", trStr = "M -0.5 -0.5, L 0.5 -0.5, L 0.5 0.5, Z", brStr = "M 0.5 -0.5, L 0.5 0.5, L -0.5 0.5, Z", conciseSymbolMap = {
|
|
22
|
-
tl: tlStr,
|
|
23
|
-
tr: trStr,
|
|
24
|
-
bl: blStr,
|
|
25
|
-
br: brStr,
|
|
26
|
-
lt: tlStr,
|
|
27
|
-
lb: blStr,
|
|
28
|
-
rt: trStr,
|
|
29
|
-
rb: brStr
|
|
30
|
-
};
|
|
31
|
-
|
|
32
21
|
class PopTip extends base_1.AbstractComponent {
|
|
33
22
|
constructor(attributes, options) {
|
|
34
23
|
super((null == options ? void 0 : options.skipDefault) ? attributes : (0, vutils_1.merge)({}, PopTip.defaultAttributes, attributes)),
|
|
35
24
|
this.name = "poptip", this.positionList = [ "top", "tl", "tr", "bottom", "bl", "br", "left", "lt", "lb", "right", "rt", "rb" ];
|
|
36
25
|
}
|
|
37
26
|
render() {
|
|
38
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
39
|
-
const {titleStyle: titleStyle = {}, position: position, contentStyle: contentStyle = {}, panel: panel
|
|
27
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
28
|
+
const {titleStyle: titleStyle = {}, position: position, 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;
|
|
40
29
|
let {title: title = "", content: content = ""} = this.attribute;
|
|
41
30
|
title = this.attribute.titleFormatMethod ? this.attribute.titleFormatMethod(title) : title,
|
|
42
31
|
content = this.attribute.contentFormatMethod ? this.attribute.contentFormatMethod(content) : content;
|
|
@@ -44,9 +33,7 @@ class PopTip extends base_1.AbstractComponent {
|
|
|
44
33
|
x: 0,
|
|
45
34
|
y: 0,
|
|
46
35
|
zIndex: 1
|
|
47
|
-
}, "group")
|
|
48
|
-
this.group = group;
|
|
49
|
-
const maxLineWidth = maxWidth - parsedPadding[1] - parsedPadding[3], titleVisible = (0,
|
|
36
|
+
}, "group"), maxLineWidth = maxWidth - parsedPadding[1] - parsedPadding[3], titleVisible = (0,
|
|
50
37
|
vutils_1.isValid)(title) && !1 !== visible, titleAttrs = Object.assign(Object.assign({
|
|
51
38
|
text: (0, vutils_1.isArray)(title) ? title : [ title ],
|
|
52
39
|
visible: titleVisible,
|
|
@@ -75,22 +62,11 @@ class PopTip extends base_1.AbstractComponent {
|
|
|
75
62
|
}), contentShape = group.createOrUpdateChild("poptip-content", contentAttrs, "text");
|
|
76
63
|
(0, vutils_1.isEmpty)(null == state ? void 0 : state.content) || (contentShape.states = state.content);
|
|
77
64
|
const contentBounds = contentShape.AABBBounds, contentHeight = contentBounds.height(), contentWidth = contentBounds.width();
|
|
78
|
-
contentVisible && (height += contentHeight)
|
|
65
|
+
contentVisible && (height += contentHeight);
|
|
79
66
|
let popTipWidth = (0, vutils_1.max)(titleWidth + parsedPadding[1] + parsedPadding[3], contentWidth + parsedPadding[1] + parsedPadding[3]);
|
|
80
67
|
popTipWidth > maxWidth ? popTipWidth = maxWidth : popTipWidth < minWidth && (popTipWidth = minWidth);
|
|
81
68
|
let poptipHeight = parsedPadding[0] + parsedPadding[2] + height;
|
|
82
|
-
const {visible: bgVisible
|
|
83
|
-
if (square) {
|
|
84
|
-
const maxWH = (0, vutils_1.max)(popTipWidth, poptipHeight);
|
|
85
|
-
popTipWidth = maxWH;
|
|
86
|
-
const deltaH = maxWH - poptipHeight;
|
|
87
|
-
poptipHeight = maxWH, titleShape.setAttributes({
|
|
88
|
-
dy: deltaH / 2
|
|
89
|
-
}), contentShape.setAttributes({
|
|
90
|
-
dy: deltaH / 2
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
const symbolSize = null !== (_a = backgroundStyle.size) && void 0 !== _a ? _a : 12, spaceSize = (0,
|
|
69
|
+
const {visible: bgVisible} = panel, backgroundStyle = __rest(panel, [ "visible" ]), symbolSize = null !== (_a = backgroundStyle.size) && void 0 !== _a ? _a : 12, spaceSize = (0,
|
|
94
70
|
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;
|
|
95
71
|
if (range) {
|
|
96
72
|
const b = this.AABBBounds, leftWidth = null !== (_h = this.attribute.x) && void 0 !== _h ? _h : b.x1, rightWidth = range[0] - b.x1;
|
|
@@ -107,75 +83,38 @@ class PopTip extends base_1.AbstractComponent {
|
|
|
107
83
|
const layout = "auto" === position;
|
|
108
84
|
let maxBBoxI, maxBBoxSize = -1 / 0;
|
|
109
85
|
for (let i = 0; i < this.positionList.length + 1; i++) {
|
|
110
|
-
const p = layout ? this.positionList[i === this.positionList.length ? maxBBoxI : i] : position
|
|
111
|
-
|
|
112
|
-
"top" === p || "bottom" === p || "left" === p || "right" === p ? symbolType = "arrow2Left" : "concise" === triangleMode && (symbolType = conciseSymbolMap[p],
|
|
113
|
-
offsetX = [ "tl", "bl", "rt", "rb" ].includes(position) ? ((0, vutils_1.isArray)(symbolSize) ? symbolSize[0] : symbolSize) / 2 : -((0,
|
|
114
|
-
vutils_1.isArray)(symbolSize) ? symbolSize[0] : symbolSize) / 2, offsetY = [ "tl", "tr", "lb", "rb" ].includes(position) ? -((0,
|
|
115
|
-
vutils_1.isArray)(symbolSize) ? symbolSize[1] : symbolSize) / 2 : ((0, vutils_1.isArray)(symbolSize) ? symbolSize[1] : symbolSize) / 2);
|
|
116
|
-
const {angle: angle, offset: offset} = this.getAngleAndOffset(p, popTipWidth, poptipHeight, (0,
|
|
117
|
-
vutils_1.isArray)(spaceSize) ? spaceSize : [ spaceSize, spaceSize - lineWidth ], symbolType);
|
|
86
|
+
const p = layout ? this.positionList[i === this.positionList.length ? maxBBoxI : i] : position, {angle: angle, offset: offset, rectOffset: rectOffset} = this.getAngleAndOffset(p, popTipWidth, poptipHeight, (0,
|
|
87
|
+
vutils_1.isArray)(spaceSize) ? spaceSize : [ spaceSize, spaceSize - lineWidth ]);
|
|
118
88
|
if ((0, vutils_1.isBoolean)(bgVisible)) {
|
|
119
|
-
const bgSymbol = group.createOrUpdateChild("poptip-symbol-panel", Object.assign(Object.assign({}, backgroundStyle), {
|
|
89
|
+
const offsetX = ((0, vutils_1.isArray)(symbolSize) ? symbolSize[0] : symbolSize) / 4, bgSymbol = group.createOrUpdateChild("poptip-symbol-panel", Object.assign(Object.assign({}, backgroundStyle), {
|
|
120
90
|
visible: bgVisible && (contentVisible || titleVisible),
|
|
121
91
|
x: offsetX,
|
|
122
|
-
y:
|
|
92
|
+
y: 0,
|
|
123
93
|
strokeBoundsBuffer: -1,
|
|
124
94
|
boundsPadding: -2,
|
|
125
95
|
anchor: [ 0, 0 ],
|
|
126
|
-
symbolType:
|
|
96
|
+
symbolType: "arrow2Left",
|
|
127
97
|
angle: angle,
|
|
128
98
|
dx: offset[0],
|
|
129
|
-
dy: offset[1]
|
|
99
|
+
dy: offset[1],
|
|
130
100
|
size: symbolSize,
|
|
131
|
-
zIndex: 9
|
|
101
|
+
zIndex: -9
|
|
132
102
|
}), "symbol");
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
bgRect = panel.panelSymbolType ? group.createOrUpdateChild("poptip-rect-panel", Object.assign(Object.assign({}, backgroundStyle), {
|
|
136
|
-
visible: bgVisible && (contentVisible || titleVisible),
|
|
137
|
-
x: 0,
|
|
138
|
-
y: 0,
|
|
139
|
-
symbolType: "rect",
|
|
140
|
-
size: [ popTipWidth, poptipHeight ],
|
|
141
|
-
zIndex: -8
|
|
142
|
-
}), "symbol") : group.createOrUpdateChild("poptip-rect-panel", Object.assign(Object.assign({}, backgroundStyle), {
|
|
103
|
+
(0, vutils_1.isEmpty)(null == state ? void 0 : state.panel) || (bgSymbol.states = state.panel);
|
|
104
|
+
const bgRect = group.createOrUpdateChild("poptip-rect-panel", Object.assign(Object.assign({}, backgroundStyle), {
|
|
143
105
|
visible: bgVisible && (contentVisible || titleVisible),
|
|
144
106
|
x: 0,
|
|
145
107
|
y: 0,
|
|
146
108
|
width: popTipWidth,
|
|
147
109
|
height: poptipHeight,
|
|
148
110
|
zIndex: -8
|
|
149
|
-
}), "rect")
|
|
111
|
+
}), "rect");
|
|
112
|
+
(0, vutils_1.isEmpty)(null == state ? void 0 : state.panel) || (bgRect.states = state.panel);
|
|
150
113
|
}
|
|
151
114
|
if (group.setAttributes({
|
|
152
115
|
x: -offset[0] + dx,
|
|
153
|
-
y: -offset[1] + dy
|
|
154
|
-
|
|
155
|
-
}), logoSymbol) {
|
|
156
|
-
const {size: size = 12} = logoSymbol, sizeArray = (0, vutils_1.isArray)(size) ? size : [ size, size ];
|
|
157
|
-
"auto" === sizeArray[1] && (sizeArray[1] = poptipHeight), "auto" === sizeArray[0] && (sizeArray[0] = poptipHeight);
|
|
158
|
-
const sizeW = sizeArray[0];
|
|
159
|
-
group.createOrUpdateChild("poptip-logo", Object.assign(Object.assign({}, logoSymbol), {
|
|
160
|
-
x: 0,
|
|
161
|
-
y: poptipHeight / 2,
|
|
162
|
-
visible: bgVisible && (contentVisible || titleVisible),
|
|
163
|
-
zIndex: 10,
|
|
164
|
-
size: sizeArray
|
|
165
|
-
}), "symbol"), group.setAttributes({
|
|
166
|
-
x: -offset[0] + dx + sizeW / 2,
|
|
167
|
-
y: -offset[1] + dy
|
|
168
|
-
}), logoText && group.createOrUpdateChild("poptip-logo-text", Object.assign(Object.assign({}, logoTextStyle), {
|
|
169
|
-
x: 0,
|
|
170
|
-
y: poptipHeight / 2,
|
|
171
|
-
visible: bgVisible && (contentVisible || titleVisible),
|
|
172
|
-
text: logoText,
|
|
173
|
-
textAlign: "center",
|
|
174
|
-
textBaseline: "middle",
|
|
175
|
-
zIndex: 10
|
|
176
|
-
}), "text");
|
|
177
|
-
}
|
|
178
|
-
if (!layout || !range) break;
|
|
116
|
+
y: -offset[1] + dy
|
|
117
|
+
}), !layout || !range) break;
|
|
179
118
|
{
|
|
180
119
|
_tBounds.setValue(0, 0, popTipWidth, poptipHeight).transformWithMatrix(group.globalTransMatrix);
|
|
181
120
|
const b = _tBounds, stageBounds = (new vutils_1.Bounds).setValue(0, 0, range[0], range[1]);
|
|
@@ -187,118 +126,94 @@ class PopTip extends base_1.AbstractComponent {
|
|
|
187
126
|
}
|
|
188
127
|
}
|
|
189
128
|
}
|
|
190
|
-
getAngleAndOffset(position, width, height, size
|
|
191
|
-
const sizeH =
|
|
129
|
+
getAngleAndOffset(position, width, height, size) {
|
|
130
|
+
const sizeH = size[1] / 2;
|
|
192
131
|
switch (position) {
|
|
193
132
|
case "tl":
|
|
194
133
|
return {
|
|
195
|
-
angle:
|
|
196
|
-
offset:
|
|
134
|
+
angle: vutils_1.pi / 2 * 3,
|
|
135
|
+
offset: [ width / 4, height + sizeH ],
|
|
136
|
+
rectOffset: [ -width / 4, -height - size[1] ]
|
|
197
137
|
};
|
|
198
138
|
|
|
199
139
|
case "top":
|
|
200
140
|
return {
|
|
201
141
|
angle: vutils_1.pi / 2 * 3,
|
|
202
|
-
offset: [ width / 2, height + sizeH ]
|
|
142
|
+
offset: [ width / 2, height + sizeH ],
|
|
143
|
+
rectOffset: [ 0, -height - size[1] ]
|
|
203
144
|
};
|
|
204
145
|
|
|
205
146
|
case "tr":
|
|
206
147
|
return {
|
|
207
|
-
angle:
|
|
208
|
-
offset:
|
|
148
|
+
angle: vutils_1.pi / 2 * 3,
|
|
149
|
+
offset: [ width / 4 * 3, height + sizeH ],
|
|
150
|
+
rectOffset: [ width / 4 * 3, -height - size[1] ]
|
|
209
151
|
};
|
|
210
152
|
|
|
211
153
|
case "rt":
|
|
212
154
|
return {
|
|
213
155
|
angle: 0,
|
|
214
|
-
offset:
|
|
156
|
+
offset: [ -sizeH, height / 5 ],
|
|
157
|
+
rectOffset: [ width / 4 * 3, -height - size[1] ]
|
|
215
158
|
};
|
|
216
159
|
|
|
217
160
|
case "right":
|
|
218
161
|
return {
|
|
219
162
|
angle: 0,
|
|
220
|
-
offset: [ -sizeH, height / 2 ]
|
|
163
|
+
offset: [ -sizeH, height / 2 ],
|
|
164
|
+
rectOffset: [ width / 4 * 3, -height - size[1] ]
|
|
221
165
|
};
|
|
222
166
|
|
|
223
167
|
case "rb":
|
|
224
168
|
return {
|
|
225
169
|
angle: 0,
|
|
226
|
-
offset:
|
|
170
|
+
offset: [ -sizeH, height / 5 * 4 ],
|
|
171
|
+
rectOffset: [ width / 4 * 3, -height - size[1] ]
|
|
227
172
|
};
|
|
228
173
|
|
|
229
174
|
case "bl":
|
|
230
175
|
return {
|
|
231
|
-
angle:
|
|
232
|
-
offset:
|
|
176
|
+
angle: vutils_1.pi / 2,
|
|
177
|
+
offset: [ width / 4, -sizeH ],
|
|
178
|
+
rectOffset: [ -width / 4, -height - size[1] ]
|
|
233
179
|
};
|
|
234
180
|
|
|
235
181
|
case "bottom":
|
|
236
182
|
return {
|
|
237
183
|
angle: vutils_1.pi / 2,
|
|
238
|
-
offset: [ width / 2, -sizeH ]
|
|
184
|
+
offset: [ width / 2, -sizeH ],
|
|
185
|
+
rectOffset: [ 0, -height - size[1] ]
|
|
239
186
|
};
|
|
240
187
|
|
|
241
188
|
case "br":
|
|
242
189
|
return {
|
|
243
|
-
angle:
|
|
244
|
-
offset:
|
|
190
|
+
angle: vutils_1.pi / 2,
|
|
191
|
+
offset: [ width / 4 * 3, -sizeH ],
|
|
192
|
+
rectOffset: [ width / 4 * 3, -height - size[1] ]
|
|
245
193
|
};
|
|
246
194
|
|
|
247
195
|
case "lt":
|
|
248
196
|
return {
|
|
249
|
-
angle:
|
|
250
|
-
offset:
|
|
197
|
+
angle: vutils_1.pi,
|
|
198
|
+
offset: [ width + sizeH, height / 5 ],
|
|
199
|
+
rectOffset: [ -width / 4, -height - size[1] ]
|
|
251
200
|
};
|
|
252
201
|
|
|
253
202
|
case "left":
|
|
254
203
|
return {
|
|
255
204
|
angle: vutils_1.pi,
|
|
256
|
-
offset: [ width + sizeH, height / 2 ]
|
|
205
|
+
offset: [ width + sizeH, height / 2 ],
|
|
206
|
+
rectOffset: [ 0, -height - size[1] ]
|
|
257
207
|
};
|
|
258
208
|
|
|
259
209
|
case "lb":
|
|
260
210
|
return {
|
|
261
|
-
angle:
|
|
262
|
-
offset:
|
|
211
|
+
angle: vutils_1.pi,
|
|
212
|
+
offset: [ width + sizeH, height / 5 * 4 ],
|
|
213
|
+
rectOffset: [ width / 4 * 3, -height - size[1] ]
|
|
263
214
|
};
|
|
264
215
|
}
|
|
265
216
|
}
|
|
266
|
-
appearAnimate(animateConfig) {
|
|
267
|
-
const {duration: duration = 1e3, easing: easing = "quadOut"} = animateConfig;
|
|
268
|
-
if (this.setAttributes({
|
|
269
|
-
scaleX: 0,
|
|
270
|
-
scaleY: 0
|
|
271
|
-
}), this.animate().to({
|
|
272
|
-
scaleX: 1,
|
|
273
|
-
scaleY: 1
|
|
274
|
-
}, duration / 3 * 2, easing), this.titleShape && this.titleShape.animate().play(new vrender_core_1.InputText({
|
|
275
|
-
text: ""
|
|
276
|
-
}, {
|
|
277
|
-
text: this.titleShape.attribute.text
|
|
278
|
-
}, duration, easing)), this.contentShape && this.contentShape.animate().play(new vrender_core_1.InputText({
|
|
279
|
-
text: ""
|
|
280
|
-
}, {
|
|
281
|
-
text: this.contentShape.attribute.text
|
|
282
|
-
}, duration, easing)), animateConfig.wave) {
|
|
283
|
-
const dur = duration / 6;
|
|
284
|
-
this.group.animate().to({
|
|
285
|
-
angle: animateConfig.wave
|
|
286
|
-
}, dur, easing).to({
|
|
287
|
-
angle: -animateConfig.wave
|
|
288
|
-
}, 2 * dur, easing).to({
|
|
289
|
-
angle: animateConfig.wave
|
|
290
|
-
}, 2 * dur, easing).to({
|
|
291
|
-
angle: 0
|
|
292
|
-
}, dur, easing);
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
disappearAnimate(animateConfig) {
|
|
296
|
-
const {duration: duration = 1e3, easing: easing = "quadOut"} = animateConfig;
|
|
297
|
-
this.animate().to({
|
|
298
|
-
scaleX: 0,
|
|
299
|
-
scaleY: 0
|
|
300
|
-
}, duration, easing);
|
|
301
|
-
}
|
|
302
217
|
}
|
|
303
218
|
|
|
304
219
|
exports.PopTip = PopTip, PopTip.defaultAttributes = {
|
|
@@ -318,7 +233,6 @@ exports.PopTip = PopTip, PopTip.defaultAttributes = {
|
|
|
318
233
|
textAlign: "left",
|
|
319
234
|
textBaseline: "top"
|
|
320
235
|
},
|
|
321
|
-
panel: {},
|
|
322
236
|
maxWidthPercent: .8,
|
|
323
237
|
space: 8,
|
|
324
238
|
padding: 10
|