@antv/g6 5.0.20 → 5.0.22
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/README.en-US.md +1 -1
- package/README.md +1 -1
- package/dist/g6.min.js +2 -2
- package/dist/lib/behaviors/base-behavior.d.ts +10 -0
- package/dist/lib/behaviors/collapse-expand.d.ts +4 -4
- package/dist/lib/behaviors/drag-canvas.d.ts +1 -1
- package/dist/lib/behaviors/hover-activate.d.ts +3 -2
- package/dist/lib/elements/edges/line.d.ts +0 -2
- package/dist/lib/elements/shapes/base-shape.d.ts +29 -14
- package/dist/lib/exports.d.ts +4 -4
- package/dist/lib/layouts/base-layout.d.ts +5 -0
- package/dist/lib/plugins/background/index.d.ts +1 -0
- package/dist/lib/plugins/base-plugin.d.ts +5 -0
- package/dist/lib/plugins/bubble-sets.d.ts +1 -0
- package/dist/lib/plugins/contextmenu/index.d.ts +1 -0
- package/dist/lib/plugins/grid-line.d.ts +1 -0
- package/dist/lib/plugins/history/index.d.ts +1 -0
- package/dist/lib/plugins/hull/index.d.ts +1 -0
- package/dist/lib/plugins/legend.d.ts +1 -0
- package/dist/lib/plugins/minimap/index.d.ts +17 -2
- package/dist/lib/plugins/snapline/index.d.ts +10 -0
- package/dist/lib/plugins/timebar.d.ts +1 -0
- package/dist/lib/plugins/toolbar/index.d.ts +1 -0
- package/dist/lib/plugins/tooltip.d.ts +11 -0
- package/dist/lib/plugins/watermark/index.d.ts +1 -0
- package/dist/lib/transforms/base-transform.d.ts +5 -0
- package/dist/lib/transforms/index.d.ts +2 -2
- package/dist/lib/transforms/{position-radial-labels.d.ts → place-radial-labels.d.ts} +4 -4
- package/dist/lib/transforms/process-parallel-edges.d.ts +7 -9
- package/dist/lib/transforms/utils.d.ts +5 -5
- package/dist/lib/utils/bbox.d.ts +12 -3
- package/dist/lib/utils/padding.d.ts +4 -4
- package/dist/lib/utils/prefix.d.ts +1 -1
- package/dist/lib/utils/router/orth.d.ts +1 -1
- package/dist/lib/utils/size.d.ts +3 -1
- package/dist/lib/utils/transform.d.ts +5 -5
- package/dist/lib/version.d.ts +1 -1
- package/esm/behaviors/base-behavior.d.ts +10 -0
- package/esm/behaviors/base-behavior.js +5 -0
- package/esm/behaviors/base-behavior.js.map +1 -1
- package/esm/behaviors/collapse-expand.d.ts +4 -4
- package/esm/behaviors/collapse-expand.js +4 -4
- package/esm/behaviors/drag-canvas.d.ts +1 -1
- package/esm/behaviors/drag-canvas.js +1 -1
- package/esm/behaviors/drag-canvas.js.map +1 -1
- package/esm/behaviors/drag-element.js +1 -0
- package/esm/behaviors/drag-element.js.map +1 -1
- package/esm/behaviors/hover-activate.d.ts +3 -2
- package/esm/behaviors/hover-activate.js +24 -14
- package/esm/behaviors/hover-activate.js.map +1 -1
- package/esm/elements/edges/line.d.ts +0 -2
- package/esm/elements/edges/line.js +0 -2
- package/esm/elements/edges/line.js.map +1 -1
- package/esm/elements/edges/polyline.js.map +1 -1
- package/esm/elements/nodes/html.js +4 -1
- package/esm/elements/nodes/html.js.map +1 -1
- package/esm/elements/shapes/base-shape.d.ts +29 -14
- package/esm/elements/shapes/base-shape.js +29 -14
- package/esm/elements/shapes/base-shape.js.map +1 -1
- package/esm/exports.d.ts +4 -4
- package/esm/exports.js +2 -2
- package/esm/exports.js.map +1 -1
- package/esm/layouts/base-layout.d.ts +5 -0
- package/esm/layouts/base-layout.js +5 -0
- package/esm/layouts/base-layout.js.map +1 -1
- package/esm/plugins/background/index.d.ts +1 -0
- package/esm/plugins/background/index.js +1 -0
- package/esm/plugins/background/index.js.map +1 -1
- package/esm/plugins/base-plugin.d.ts +5 -0
- package/esm/plugins/base-plugin.js +5 -0
- package/esm/plugins/base-plugin.js.map +1 -1
- package/esm/plugins/bubble-sets.d.ts +1 -0
- package/esm/plugins/bubble-sets.js +1 -0
- package/esm/plugins/bubble-sets.js.map +1 -1
- package/esm/plugins/contextmenu/index.d.ts +1 -0
- package/esm/plugins/contextmenu/index.js +1 -0
- package/esm/plugins/contextmenu/index.js.map +1 -1
- package/esm/plugins/grid-line.d.ts +1 -0
- package/esm/plugins/grid-line.js +1 -0
- package/esm/plugins/grid-line.js.map +1 -1
- package/esm/plugins/history/index.d.ts +1 -0
- package/esm/plugins/history/index.js +1 -0
- package/esm/plugins/history/index.js.map +1 -1
- package/esm/plugins/hull/index.d.ts +1 -0
- package/esm/plugins/hull/index.js +1 -0
- package/esm/plugins/hull/index.js.map +1 -1
- package/esm/plugins/legend.d.ts +1 -0
- package/esm/plugins/legend.js +1 -0
- package/esm/plugins/legend.js.map +1 -1
- package/esm/plugins/minimap/index.d.ts +17 -2
- package/esm/plugins/minimap/index.js +25 -6
- package/esm/plugins/minimap/index.js.map +1 -1
- package/esm/plugins/snapline/index.d.ts +10 -0
- package/esm/plugins/snapline/index.js +5 -0
- package/esm/plugins/snapline/index.js.map +1 -1
- package/esm/plugins/timebar.d.ts +1 -0
- package/esm/plugins/timebar.js +1 -0
- package/esm/plugins/timebar.js.map +1 -1
- package/esm/plugins/toolbar/index.d.ts +1 -0
- package/esm/plugins/toolbar/index.js +1 -0
- package/esm/plugins/toolbar/index.js.map +1 -1
- package/esm/plugins/tooltip.d.ts +11 -0
- package/esm/plugins/tooltip.js +6 -0
- package/esm/plugins/tooltip.js.map +1 -1
- package/esm/plugins/watermark/index.d.ts +1 -0
- package/esm/plugins/watermark/index.js +1 -0
- package/esm/plugins/watermark/index.js.map +1 -1
- package/esm/registry/build-in.js +2 -2
- package/esm/registry/build-in.js.map +1 -1
- package/esm/runtime/data.js +14 -2
- package/esm/runtime/data.js.map +1 -1
- package/esm/transforms/base-transform.d.ts +5 -0
- package/esm/transforms/base-transform.js +5 -0
- package/esm/transforms/base-transform.js.map +1 -1
- package/esm/transforms/index.d.ts +2 -2
- package/esm/transforms/index.js +1 -1
- package/esm/transforms/index.js.map +1 -1
- package/esm/transforms/{position-radial-labels.d.ts → place-radial-labels.d.ts} +4 -4
- package/esm/transforms/{position-radial-labels.js → place-radial-labels.js} +3 -3
- package/esm/transforms/place-radial-labels.js.map +1 -0
- package/esm/transforms/process-parallel-edges.d.ts +7 -9
- package/esm/transforms/process-parallel-edges.js.map +1 -1
- package/esm/transforms/utils.d.ts +5 -5
- package/esm/transforms/utils.js +5 -5
- package/esm/utils/bbox.d.ts +12 -3
- package/esm/utils/bbox.js +16 -4
- package/esm/utils/bbox.js.map +1 -1
- package/esm/utils/edge.js +4 -4
- package/esm/utils/edge.js.map +1 -1
- package/esm/utils/padding.d.ts +4 -4
- package/esm/utils/padding.js +4 -4
- package/esm/utils/point.js +3 -0
- package/esm/utils/point.js.map +1 -1
- package/esm/utils/prefix.d.ts +1 -1
- package/esm/utils/prefix.js +1 -1
- package/esm/utils/router/orth.d.ts +1 -1
- package/esm/utils/router/orth.js +27 -11
- package/esm/utils/router/orth.js.map +1 -1
- package/esm/utils/size.d.ts +3 -1
- package/esm/utils/size.js +3 -1
- package/esm/utils/size.js.map +1 -1
- package/esm/utils/transform.d.ts +5 -5
- package/esm/utils/transform.js +5 -5
- package/esm/utils/visibility.js.map +1 -1
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/lib/behaviors/base-behavior.d.ts +10 -0
- package/lib/behaviors/base-behavior.js +5 -0
- package/lib/behaviors/base-behavior.js.map +1 -1
- package/lib/behaviors/collapse-expand.d.ts +4 -4
- package/lib/behaviors/collapse-expand.js +4 -4
- package/lib/behaviors/drag-canvas.d.ts +1 -1
- package/lib/behaviors/drag-canvas.js +1 -1
- package/lib/behaviors/drag-canvas.js.map +1 -1
- package/lib/behaviors/drag-element.js +1 -0
- package/lib/behaviors/drag-element.js.map +1 -1
- package/lib/behaviors/hover-activate.d.ts +3 -2
- package/lib/behaviors/hover-activate.js +24 -14
- package/lib/behaviors/hover-activate.js.map +1 -1
- package/lib/elements/edges/line.d.ts +0 -2
- package/lib/elements/edges/line.js +0 -2
- package/lib/elements/edges/line.js.map +1 -1
- package/lib/elements/edges/polyline.js.map +1 -1
- package/lib/elements/nodes/html.js +3 -0
- package/lib/elements/nodes/html.js.map +1 -1
- package/lib/elements/shapes/base-shape.d.ts +29 -14
- package/lib/elements/shapes/base-shape.js +29 -14
- package/lib/elements/shapes/base-shape.js.map +1 -1
- package/lib/exports.d.ts +4 -4
- package/lib/exports.js +4 -3
- package/lib/exports.js.map +1 -1
- package/lib/layouts/base-layout.d.ts +5 -0
- package/lib/layouts/base-layout.js +5 -0
- package/lib/layouts/base-layout.js.map +1 -1
- package/lib/plugins/background/index.d.ts +1 -0
- package/lib/plugins/background/index.js +1 -0
- package/lib/plugins/background/index.js.map +1 -1
- package/lib/plugins/base-plugin.d.ts +5 -0
- package/lib/plugins/base-plugin.js +5 -0
- package/lib/plugins/base-plugin.js.map +1 -1
- package/lib/plugins/bubble-sets.d.ts +1 -0
- package/lib/plugins/bubble-sets.js +1 -0
- package/lib/plugins/bubble-sets.js.map +1 -1
- package/lib/plugins/contextmenu/index.d.ts +1 -0
- package/lib/plugins/contextmenu/index.js +1 -0
- package/lib/plugins/contextmenu/index.js.map +1 -1
- package/lib/plugins/grid-line.d.ts +1 -0
- package/lib/plugins/grid-line.js +1 -0
- package/lib/plugins/grid-line.js.map +1 -1
- package/lib/plugins/history/index.d.ts +1 -0
- package/lib/plugins/history/index.js +1 -0
- package/lib/plugins/history/index.js.map +1 -1
- package/lib/plugins/hull/index.d.ts +1 -0
- package/lib/plugins/hull/index.js +1 -0
- package/lib/plugins/hull/index.js.map +1 -1
- package/lib/plugins/legend.d.ts +1 -0
- package/lib/plugins/legend.js +1 -0
- package/lib/plugins/legend.js.map +1 -1
- package/lib/plugins/minimap/index.d.ts +17 -2
- package/lib/plugins/minimap/index.js +24 -5
- package/lib/plugins/minimap/index.js.map +1 -1
- package/lib/plugins/snapline/index.d.ts +10 -0
- package/lib/plugins/snapline/index.js +5 -0
- package/lib/plugins/snapline/index.js.map +1 -1
- package/lib/plugins/timebar.d.ts +1 -0
- package/lib/plugins/timebar.js +1 -0
- package/lib/plugins/timebar.js.map +1 -1
- package/lib/plugins/toolbar/index.d.ts +1 -0
- package/lib/plugins/toolbar/index.js +1 -0
- package/lib/plugins/toolbar/index.js.map +1 -1
- package/lib/plugins/tooltip.d.ts +11 -0
- package/lib/plugins/tooltip.js +6 -0
- package/lib/plugins/tooltip.js.map +1 -1
- package/lib/plugins/watermark/index.d.ts +1 -0
- package/lib/plugins/watermark/index.js +1 -0
- package/lib/plugins/watermark/index.js.map +1 -1
- package/lib/registry/build-in.js +1 -1
- package/lib/registry/build-in.js.map +1 -1
- package/lib/runtime/data.js +13 -1
- package/lib/runtime/data.js.map +1 -1
- package/lib/transforms/base-transform.d.ts +5 -0
- package/lib/transforms/base-transform.js +5 -0
- package/lib/transforms/base-transform.js.map +1 -1
- package/lib/transforms/index.d.ts +2 -2
- package/lib/transforms/index.js +3 -3
- package/lib/transforms/index.js.map +1 -1
- package/lib/transforms/{position-radial-labels.d.ts → place-radial-labels.d.ts} +4 -4
- package/lib/transforms/{position-radial-labels.js → place-radial-labels.js} +5 -5
- package/lib/transforms/place-radial-labels.js.map +1 -0
- package/lib/transforms/process-parallel-edges.d.ts +7 -9
- package/lib/transforms/process-parallel-edges.js.map +1 -1
- package/lib/transforms/utils.d.ts +5 -5
- package/lib/transforms/utils.js +5 -5
- package/lib/utils/bbox.d.ts +12 -3
- package/lib/utils/bbox.js +19 -6
- package/lib/utils/bbox.js.map +1 -1
- package/lib/utils/edge.js +3 -3
- package/lib/utils/edge.js.map +1 -1
- package/lib/utils/padding.d.ts +4 -4
- package/lib/utils/padding.js +4 -4
- package/lib/utils/point.js +3 -0
- package/lib/utils/point.js.map +1 -1
- package/lib/utils/prefix.d.ts +1 -1
- package/lib/utils/prefix.js +1 -1
- package/lib/utils/router/orth.d.ts +1 -1
- package/lib/utils/router/orth.js +25 -9
- package/lib/utils/router/orth.js.map +1 -1
- package/lib/utils/size.d.ts +3 -1
- package/lib/utils/size.js +3 -1
- package/lib/utils/size.js.map +1 -1
- package/lib/utils/transform.d.ts +5 -5
- package/lib/utils/transform.js +5 -5
- package/lib/utils/visibility.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +11 -11
- package/src/behaviors/base-behavior.ts +10 -0
- package/src/behaviors/collapse-expand.ts +4 -4
- package/src/behaviors/drag-canvas.ts +2 -2
- package/src/behaviors/drag-element.ts +1 -0
- package/src/behaviors/hover-activate.ts +33 -17
- package/src/elements/edges/line.ts +0 -2
- package/src/elements/edges/polyline.ts +2 -0
- package/src/elements/nodes/html.ts +4 -1
- package/src/elements/shapes/base-shape.ts +31 -16
- package/src/exports.ts +4 -2
- package/src/layouts/base-layout.ts +5 -0
- package/src/plugins/background/index.ts +1 -0
- package/src/plugins/base-plugin.ts +5 -0
- package/src/plugins/bubble-sets.ts +1 -0
- package/src/plugins/contextmenu/index.ts +1 -0
- package/src/plugins/grid-line.ts +1 -0
- package/src/plugins/history/index.ts +1 -0
- package/src/plugins/hull/index.ts +1 -0
- package/src/plugins/legend.ts +1 -0
- package/src/plugins/minimap/index.ts +39 -12
- package/src/plugins/snapline/index.ts +10 -0
- package/src/plugins/timebar.ts +1 -0
- package/src/plugins/toolbar/index.ts +1 -0
- package/src/plugins/tooltip.ts +11 -0
- package/src/plugins/watermark/index.ts +1 -0
- package/src/registry/build-in.ts +2 -2
- package/src/runtime/data.ts +15 -3
- package/src/transforms/base-transform.ts +5 -0
- package/src/transforms/index.ts +2 -2
- package/src/transforms/{position-radial-labels.ts → place-radial-labels.ts} +5 -5
- package/src/transforms/process-parallel-edges.ts +7 -9
- package/src/transforms/utils.ts +5 -5
- package/src/utils/bbox.ts +17 -4
- package/src/utils/edge.ts +4 -4
- package/src/utils/padding.ts +4 -4
- package/src/utils/point.ts +2 -0
- package/src/utils/prefix.ts +1 -1
- package/src/utils/router/orth.ts +29 -11
- package/src/utils/size.ts +3 -1
- package/src/utils/transform.ts +5 -5
- package/src/utils/visibility.ts +2 -2
- package/src/version.ts +1 -1
- package/esm/transforms/position-radial-labels.js.map +0 -1
- package/lib/transforms/position-radial-labels.js.map +0 -1
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { BaseExtension } from '../registry/extension';
|
|
2
2
|
import type { CustomBehaviorOption } from '../spec/behavior';
|
|
3
|
+
/**
|
|
4
|
+
* <zh/> 交互通用配置项
|
|
5
|
+
*
|
|
6
|
+
* <en/> Base options for behaviors
|
|
7
|
+
*/
|
|
3
8
|
export interface BaseBehaviorOptions extends CustomBehaviorOption {
|
|
4
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* <zh/> 交互的基类
|
|
12
|
+
*
|
|
13
|
+
* <en/> Base class for behaviors
|
|
14
|
+
*/
|
|
5
15
|
export declare abstract class BaseBehavior<T extends BaseBehaviorOptions = BaseBehaviorOptions> extends BaseExtension<T> {
|
|
6
16
|
}
|
|
@@ -44,13 +44,13 @@ export interface CollapseExpandOptions extends BaseBehaviorOptions {
|
|
|
44
44
|
onExpand?: (id: ID) => void;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
|
-
* <zh/>
|
|
47
|
+
* <zh/> 展开/收起元素交互
|
|
48
48
|
*
|
|
49
|
-
* <en/> Collapse/Expand
|
|
49
|
+
* <en/> Collapse/Expand Element behavior
|
|
50
50
|
* @remarks
|
|
51
|
-
* <zh/>
|
|
51
|
+
* <zh/> 通过操作展开/收起元素。
|
|
52
52
|
*
|
|
53
|
-
* <en/> Expand
|
|
53
|
+
* <en/> Expand/collapse elements by operation.
|
|
54
54
|
*/
|
|
55
55
|
export declare class CollapseExpand extends BaseBehavior<CollapseExpandOptions> {
|
|
56
56
|
static defaultOptions: Partial<CollapseExpandOptions>;
|
|
@@ -39,7 +39,7 @@ export interface DragCanvasOptions extends BaseBehaviorOptions {
|
|
|
39
39
|
* <zh/> 可拖拽的视口范围,默认最多可拖拽一屏。可以分别设置上、右、下、左四个方向的范围,每个方向的范围在 [0, Infinity] 之间
|
|
40
40
|
*
|
|
41
41
|
* <en/> The draggable viewport range allows you to drag up to one screen by default. You can set the range for each direction (top, right, bottom, left) individually, with each direction's range between [0, Infinity]
|
|
42
|
-
* @defaultValue
|
|
42
|
+
* @defaultValue Infinity
|
|
43
43
|
*/
|
|
44
44
|
range?: number | number[];
|
|
45
45
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RuntimeContext } from '../runtime/types';
|
|
2
|
-
import type { EdgeDirection, IPointerEvent, State } from '../types';
|
|
2
|
+
import type { EdgeDirection, Element, IPointerEvent, State } from '../types';
|
|
3
3
|
import type { BaseBehaviorOptions } from './base-behavior';
|
|
4
4
|
import { BaseBehavior } from './base-behavior';
|
|
5
5
|
/**
|
|
@@ -32,7 +32,7 @@ export interface HoverActivateOptions extends BaseBehaviorOptions {
|
|
|
32
32
|
* - `1` means the current node and its directly adjacent nodes and edges are activated, etc
|
|
33
33
|
* @defaultValue 0
|
|
34
34
|
*/
|
|
35
|
-
degree?: number;
|
|
35
|
+
degree?: number | ((event: IPointerEvent) => number);
|
|
36
36
|
/**
|
|
37
37
|
* <zh/> 指定边的方向
|
|
38
38
|
* - `'both'`: 表示激活当前节点的所有关系
|
|
@@ -88,6 +88,7 @@ export declare class HoverActivate extends BaseBehavior<HoverActivateOptions> {
|
|
|
88
88
|
private toggleFrozen;
|
|
89
89
|
private bindEvents;
|
|
90
90
|
private hoverElement;
|
|
91
|
+
protected getActiveIds(event: IPointerEvent<Element>): string[];
|
|
91
92
|
private updateElementsState;
|
|
92
93
|
private getElementsState;
|
|
93
94
|
private validate;
|
|
@@ -14,8 +14,6 @@ type ParsedLineStyleProps = Required<LineStyleProps>;
|
|
|
14
14
|
* <zh/> 直线
|
|
15
15
|
*
|
|
16
16
|
* <en/> Line
|
|
17
|
-
* @remarks
|
|
18
|
-
* <img width="300" src="https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*YbpvTa4liAEAAAAAAAAAAAAADmJ7AQ/original" />
|
|
19
17
|
*/
|
|
20
18
|
export declare class Line extends BaseEdge {
|
|
21
19
|
static defaultStyleProps: Partial<LineStyleProps>;
|
|
@@ -3,31 +3,45 @@ import { CustomElement } from '@antv/g';
|
|
|
3
3
|
import type { Keyframe } from '../../types';
|
|
4
4
|
export interface BaseShapeStyleProps extends BaseStyleProps {
|
|
5
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* <zh/> 图形基类
|
|
8
|
+
*
|
|
9
|
+
* <en/> Base class for shapes
|
|
10
|
+
*/
|
|
6
11
|
export declare abstract class BaseShape<StyleProps extends BaseShapeStyleProps> extends CustomElement<StyleProps> {
|
|
7
12
|
constructor(options: DisplayObjectConfig<StyleProps>);
|
|
13
|
+
/**
|
|
14
|
+
* <zh/> 解析后的属性
|
|
15
|
+
*
|
|
16
|
+
* <en/> parsed attributes
|
|
17
|
+
* @returns <zh/> 解析后的属性 | <en/> parsed attributes
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
8
20
|
protected get parsedAttributes(): Required<StyleProps>;
|
|
9
21
|
/**
|
|
10
|
-
* <zh
|
|
22
|
+
* <zh/> 图形实例映射表
|
|
11
23
|
*
|
|
12
|
-
* <en
|
|
24
|
+
* <en/> shape instance map
|
|
25
|
+
* @internal
|
|
13
26
|
*/
|
|
14
27
|
protected shapeMap: Record<string, DisplayObject>;
|
|
15
28
|
/**
|
|
16
|
-
* <zh
|
|
29
|
+
* <zh/> 动画实例映射表
|
|
17
30
|
*
|
|
18
|
-
* <en
|
|
31
|
+
* <en/> animation instance map
|
|
32
|
+
* @internal
|
|
19
33
|
*/
|
|
20
34
|
protected animateMap: Record<string, IAnimation>;
|
|
21
35
|
/**
|
|
22
|
-
* <zh
|
|
36
|
+
* <zh/> 创建、更新或删除图形
|
|
23
37
|
*
|
|
24
|
-
* <en
|
|
25
|
-
* @param className - <zh
|
|
26
|
-
* @param Ctor - <zh
|
|
27
|
-
* @param style - <zh
|
|
28
|
-
* @param container - <zh
|
|
29
|
-
* @param hooks - <zh
|
|
30
|
-
* @returns <zh
|
|
38
|
+
* <en/> create, update or remove shape
|
|
39
|
+
* @param className - <zh/> 图形名称 | <en/> shape name
|
|
40
|
+
* @param Ctor - <zh/> 图形类型 | <en/> shape type
|
|
41
|
+
* @param style - <zh/> 图形样式。若要删除图形,传入 false | <en/> shape style. Pass false to remove the shape
|
|
42
|
+
* @param container - <zh/> 容器 | <en/> container
|
|
43
|
+
* @param hooks - <zh/> 钩子函数 | <en/> hooks
|
|
44
|
+
* @returns <zh/> 图形实例 | <en/> shape instance
|
|
31
45
|
*/
|
|
32
46
|
protected upsert<T extends DisplayObject>(className: string, Ctor: string | {
|
|
33
47
|
new (...args: any[]): T;
|
|
@@ -41,9 +55,9 @@ export declare abstract class BaseShape<StyleProps extends BaseShapeStyleProps>
|
|
|
41
55
|
protected transformPosition(attributes: Partial<StyleProps>): void;
|
|
42
56
|
update(attr?: Partial<StyleProps>): void;
|
|
43
57
|
/**
|
|
44
|
-
* <zh
|
|
58
|
+
* <zh/> 在初始化时会被自动调用
|
|
45
59
|
*
|
|
46
|
-
* <en
|
|
60
|
+
* <en/> will be called automatically when initializing
|
|
47
61
|
* @param attributes
|
|
48
62
|
* @param container
|
|
49
63
|
*/
|
|
@@ -61,6 +75,7 @@ export declare abstract class BaseShape<StyleProps extends BaseShapeStyleProps>
|
|
|
61
75
|
/**
|
|
62
76
|
* Get the prefix pairs for composite shapes used to handle animation
|
|
63
77
|
* @returns tuples array where each tuple contains a key corresponding to a method `get${key}Style` and its shape prefix
|
|
78
|
+
* @internal
|
|
64
79
|
*/
|
|
65
80
|
protected get compositeShapes(): [string, string][];
|
|
66
81
|
animate(keyframes: Keyframe[], options?: number | KeyframeAnimationOptions): IAnimation | null;
|
package/dist/lib/exports.d.ts
CHANGED
|
@@ -6,11 +6,11 @@ export { effect } from './elements/effect';
|
|
|
6
6
|
export { BaseNode, Circle, Diamond, Donut, Ellipse, HTML, Hexagon, Image, Rect, Star, Triangle, } from './elements/nodes';
|
|
7
7
|
export { Badge, BaseShape, Icon, Label } from './elements/shapes';
|
|
8
8
|
export { AntVDagreLayout, BaseLayout, CircularLayout, ComboCombinedLayout, compactBox as CompactBoxLayout, ConcentricLayout, D3ForceLayout, DagreLayout, dendrogram as DendrogramLayout, ForceAtlas2Layout, ForceLayout, FruchtermanLayout, GridLayout, indented as IndentedLayout, MDSLayout, mindmap as MindmapLayout, RadialLayout, RandomLayout, } from './layouts';
|
|
9
|
-
export { BasePlugin, BubbleSets, CameraSetting, Contextmenu, EdgeFilterLens, Fisheye, Fullscreen, GridLine, History, Hull, Legend, Minimap, Snapline, Timebar, Toolbar, Tooltip, Watermark, } from './plugins';
|
|
9
|
+
export { Background, BasePlugin, BubbleSets, CameraSetting, Contextmenu, EdgeFilterLens, Fisheye, Fullscreen, GridLine, History, Hull, Legend, Minimap, Snapline, Timebar, Toolbar, Tooltip, Watermark, } from './plugins';
|
|
10
10
|
export { getExtension, getExtensions } from './registry/get';
|
|
11
11
|
export { register } from './registry/register';
|
|
12
12
|
export { Graph } from './runtime/graph';
|
|
13
|
-
export { BaseTransform,
|
|
13
|
+
export { BaseTransform, PlaceRadialLabels, ProcessParallelEdges } from './transforms';
|
|
14
14
|
export { isCollapsed } from './utils/collapsibility';
|
|
15
15
|
export { idOf } from './utils/id';
|
|
16
16
|
export { invokeLayoutMethod } from './utils/layout';
|
|
@@ -34,7 +34,7 @@ export type { UpsertHooks } from './elements/shapes/base-shape';
|
|
|
34
34
|
export type { ContourLabelStyleProps, ContourStyleProps } from './elements/shapes/contour';
|
|
35
35
|
export type { BaseLayoutOptions, WebWorkerLayoutOptions } from './layouts/types';
|
|
36
36
|
export type { CategoricalPalette } from './palettes/types';
|
|
37
|
-
export type { BasePluginOptions, BubbleSetsOptions, CameraSettingOptions, ContextmenuOptions, EdgeFilterLensOptions, FisheyeOptions, FullscreenOptions, GridLineOptions, HistoryOptions, HullOptions, LegendOptions, MinimapOptions, SnaplineOptions, TimebarOptions, ToolbarOptions, TooltipOptions, WatermarkOptions, } from './plugins';
|
|
37
|
+
export type { BackgroundOptions, BasePluginOptions, BubbleSetsOptions, CameraSettingOptions, ContextmenuOptions, EdgeFilterLensOptions, FisheyeOptions, FullscreenOptions, GridLineOptions, HistoryOptions, HullOptions, LegendOptions, MinimapOptions, SnaplineOptions, TimebarOptions, ToolbarOptions, TooltipOptions, WatermarkOptions, } from './plugins';
|
|
38
38
|
export type { DataURLOptions } from './runtime/canvas';
|
|
39
39
|
export type { RuntimeContext } from './runtime/types';
|
|
40
40
|
export type { BehaviorOptions, CanvasOptions, ComboData, ComboOptions, EdgeData, EdgeOptions, GraphData, GraphOptions, NodeData, NodeOptions, PluginOptions, ThemeOptions, ViewportOptions, } from './spec';
|
|
@@ -42,7 +42,7 @@ export type { CustomBehaviorOption } from './spec/behavior';
|
|
|
42
42
|
export type { AnimationStage } from './spec/element/animation';
|
|
43
43
|
export type { LayoutOptions, STDLayoutOptions, SingleLayoutOptions } from './spec/layout';
|
|
44
44
|
export type { CustomPluginOption } from './spec/plugin';
|
|
45
|
-
export type { BaseTransformOptions,
|
|
45
|
+
export type { BaseTransformOptions, PlaceRadialLabelsOptions, ProcessParallelEdgesOptions } from './transforms';
|
|
46
46
|
export type { DrawData } from './transforms/types';
|
|
47
47
|
export type { BaseElementStyleProps, CardinalPlacement, CollapsedMarkerStyleProps, Combo, CornerPlacement, DirectionalPlacement, Edge, EdgeArrowStyleProps, EdgeDirection, EdgeLabelStyleProps, Element, ElementDatum, ElementHooks, ElementMethods, ElementType, FitViewOptions, HierarchyKey, IAnimateEvent, ID, IDragEvent, IElementDragEvent, IElementEvent, IElementLifeCycleEvent, IEvent, IGraphLifeCycleEvent, IKeyboardEvent, IPointerEvent, IViewportEvent, IWheelEvent, LoopPlacement, LoopStyleProps, Node, NodeBadgeStyleProps, NodeLabelStyleProps, NodeLikeData, NodePortStyleProps, Padding, Placement, Point, PortStyleProps, Prefix, PrefixKey, RelativePlacement, Size, State, TransformOptions, TreeData, TriangleDirection, Vector2, Vector3, ViewportAnimationEffectTiming, } from './types';
|
|
48
48
|
export type { Command, CommandData } from './types/history';
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import type { RuntimeContext } from '../runtime/types';
|
|
2
2
|
import type { GraphData } from '../spec';
|
|
3
3
|
import type { BaseLayoutOptions } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* <zh/> 布局的基类
|
|
6
|
+
*
|
|
7
|
+
* <en/> Base class for layout
|
|
8
|
+
*/
|
|
4
9
|
export declare abstract class BaseLayout<O extends BaseLayoutOptions = any> {
|
|
5
10
|
abstract id: string;
|
|
6
11
|
options: O;
|
|
@@ -2,5 +2,10 @@ import { BaseExtension } from '../registry/extension';
|
|
|
2
2
|
import type { CustomPluginOption } from '../spec/plugin';
|
|
3
3
|
export interface BasePluginOptions extends CustomPluginOption {
|
|
4
4
|
}
|
|
5
|
+
/**
|
|
6
|
+
* <zh/> 插件的基类
|
|
7
|
+
*
|
|
8
|
+
* <en/> Base class for plugins
|
|
9
|
+
*/
|
|
5
10
|
export declare abstract class BasePlugin<T extends BasePluginOptions> extends BaseExtension<T> {
|
|
6
11
|
}
|
|
@@ -4,15 +4,16 @@ import type { ElementType, Padding, Placement } from '../../types';
|
|
|
4
4
|
import type { BasePluginOptions } from '../base-plugin';
|
|
5
5
|
import { BasePlugin } from '../base-plugin';
|
|
6
6
|
/**
|
|
7
|
-
* <zh/>
|
|
7
|
+
* <zh/> 缩略图插件配置项
|
|
8
8
|
*
|
|
9
|
-
* <en/>
|
|
9
|
+
* <en/> Minimap plugin options
|
|
10
10
|
*/
|
|
11
11
|
export interface MinimapOptions extends BasePluginOptions {
|
|
12
12
|
/**
|
|
13
13
|
* <zh/> 宽度和高度
|
|
14
14
|
*
|
|
15
15
|
* <en/> Width and height
|
|
16
|
+
* @defaultValue [240, 160]
|
|
16
17
|
*/
|
|
17
18
|
size?: [number, number];
|
|
18
19
|
/**
|
|
@@ -83,11 +84,25 @@ export interface MinimapOptions extends BasePluginOptions {
|
|
|
83
84
|
* <en/> Renderer, default to use Canvas renderer
|
|
84
85
|
*/
|
|
85
86
|
renderer?: IRenderer;
|
|
87
|
+
/**
|
|
88
|
+
* <zh/> 延迟更新时间(毫秒),用于性能优化
|
|
89
|
+
*
|
|
90
|
+
* <en/> Delay update time(ms), used for performance optimization
|
|
91
|
+
* @defaultValue 128
|
|
92
|
+
*/
|
|
93
|
+
delay?: number;
|
|
86
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* <zh/> 缩略图插件
|
|
97
|
+
*
|
|
98
|
+
* <en/> Minimap plugin
|
|
99
|
+
*/
|
|
87
100
|
export declare class Minimap extends BasePlugin<MinimapOptions> {
|
|
88
101
|
static defaultOptions: Partial<MinimapOptions>;
|
|
89
102
|
private canvas;
|
|
90
103
|
constructor(context: RuntimeContext, options: MinimapOptions);
|
|
104
|
+
update(options: Partial<MinimapOptions>): void;
|
|
105
|
+
private setOnRender;
|
|
91
106
|
private bindEvents;
|
|
92
107
|
private unbindEvents;
|
|
93
108
|
private onDraw;
|
|
@@ -3,6 +3,11 @@ import type { RuntimeContext } from '../../runtime/types';
|
|
|
3
3
|
import type { IDragEvent, Node } from '../../types';
|
|
4
4
|
import type { BasePluginOptions } from '../base-plugin';
|
|
5
5
|
import { BasePlugin } from '../base-plugin';
|
|
6
|
+
/**
|
|
7
|
+
* <zh/> 对齐线插件配置项
|
|
8
|
+
*
|
|
9
|
+
* <en/> Snapline plugin options
|
|
10
|
+
*/
|
|
6
11
|
export interface SnaplineOptions extends BasePluginOptions {
|
|
7
12
|
/**
|
|
8
13
|
* <zh/> 对齐精度,即移动节点时与目标位置的距离小于 tolerance 时触发显示对齐线
|
|
@@ -62,6 +67,11 @@ export interface SnaplineOptions extends BasePluginOptions {
|
|
|
62
67
|
*/
|
|
63
68
|
filter?: (node: Node) => boolean;
|
|
64
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* <zh/> 对齐线插件
|
|
72
|
+
*
|
|
73
|
+
* <en/> Snapline plugin
|
|
74
|
+
*/
|
|
65
75
|
export declare class Snapline extends BasePlugin<SnaplineOptions> {
|
|
66
76
|
static defaultOptions: Partial<SnaplineOptions>;
|
|
67
77
|
private horizontalLine;
|
|
@@ -3,6 +3,11 @@ import type { RuntimeContext } from '../runtime/types';
|
|
|
3
3
|
import type { ElementDatum, ID, IElementEvent } from '../types';
|
|
4
4
|
import type { BasePluginOptions } from './base-plugin';
|
|
5
5
|
import { BasePlugin } from './base-plugin';
|
|
6
|
+
/**
|
|
7
|
+
* <zh/> 提示框插件配置项
|
|
8
|
+
*
|
|
9
|
+
* <en/> Tooltip plugin options
|
|
10
|
+
*/
|
|
6
11
|
export interface TooltipOptions extends BasePluginOptions, Pick<TooltipStyleProps, 'position' | 'offset' | 'enterable' | 'style' | 'container' | 'title'> {
|
|
7
12
|
/**
|
|
8
13
|
* <zh/> 触发行为,可选 hover | click
|
|
@@ -29,6 +34,11 @@ export interface TooltipOptions extends BasePluginOptions, Pick<TooltipStyleProp
|
|
|
29
34
|
*/
|
|
30
35
|
enable?: boolean | ((event: IElementEvent) => boolean);
|
|
31
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* <zh/> 提示框插件
|
|
39
|
+
*
|
|
40
|
+
* <en/> Tooltip plugin
|
|
41
|
+
*/
|
|
32
42
|
export declare class Tooltip extends BasePlugin<TooltipOptions> {
|
|
33
43
|
static defaultOptions: Partial<TooltipOptions>;
|
|
34
44
|
private currentTarget;
|
|
@@ -112,6 +122,7 @@ export declare class Tooltip extends BasePlugin<TooltipOptions> {
|
|
|
112
122
|
* <zh/> 销毁tooltip
|
|
113
123
|
*
|
|
114
124
|
* <en/> Destroy tooltip
|
|
125
|
+
* @internal
|
|
115
126
|
*/
|
|
116
127
|
destroy(): void;
|
|
117
128
|
}
|
|
@@ -3,6 +3,11 @@ import type { DrawContext } from '../runtime/element';
|
|
|
3
3
|
import type { CustomBehaviorOption } from '../spec/behavior';
|
|
4
4
|
import type { DrawData } from './types';
|
|
5
5
|
export type BaseTransformOptions = CustomBehaviorOption;
|
|
6
|
+
/**
|
|
7
|
+
* <zh/> 数据转换的基类
|
|
8
|
+
*
|
|
9
|
+
* <en/> Base class for data transforms
|
|
10
|
+
*/
|
|
6
11
|
export declare abstract class BaseTransform<T extends BaseTransformOptions = BaseTransformOptions> extends BaseExtension<T> {
|
|
7
12
|
beforeDraw(data: DrawData, context: DrawContext): DrawData;
|
|
8
13
|
afterLayout(): void;
|
|
@@ -3,9 +3,9 @@ export { BaseTransform } from './base-transform';
|
|
|
3
3
|
export { CollapseExpandCombo } from './collapse-expand-combo';
|
|
4
4
|
export { CollapseExpandNode } from './collapse-expand-node';
|
|
5
5
|
export { GetEdgeActualEnds } from './get-edge-actual-ends';
|
|
6
|
-
export {
|
|
6
|
+
export { PlaceRadialLabels } from './place-radial-labels';
|
|
7
7
|
export { ProcessParallelEdges } from './process-parallel-edges';
|
|
8
8
|
export { UpdateRelatedEdge } from './update-related-edge';
|
|
9
9
|
export type { BaseTransformOptions } from './base-transform';
|
|
10
|
-
export type {
|
|
10
|
+
export type { PlaceRadialLabelsOptions } from './place-radial-labels';
|
|
11
11
|
export type { ProcessParallelEdgesOptions } from './process-parallel-edges';
|
|
@@ -6,7 +6,7 @@ import { BaseTransform } from './base-transform';
|
|
|
6
6
|
*
|
|
7
7
|
* <en/> Options for automatically adjusting the style of node labels according to the radial layout
|
|
8
8
|
*/
|
|
9
|
-
export interface
|
|
9
|
+
export interface PlaceRadialLabelsOptions extends BaseTransformOptions {
|
|
10
10
|
/**
|
|
11
11
|
* <zh/> 偏移量
|
|
12
12
|
*
|
|
@@ -19,9 +19,9 @@ export interface PositionRadialLabelsOptions extends BaseTransformOptions {
|
|
|
19
19
|
*
|
|
20
20
|
* <en/> Automatically adjust the style of node labels according to the radial layout, including position and rotation angle
|
|
21
21
|
*/
|
|
22
|
-
export declare class
|
|
23
|
-
static defaultOptions: Partial<
|
|
24
|
-
constructor(context: RuntimeContext, options:
|
|
22
|
+
export declare class PlaceRadialLabels extends BaseTransform<PlaceRadialLabelsOptions> {
|
|
23
|
+
static defaultOptions: Partial<PlaceRadialLabelsOptions>;
|
|
24
|
+
constructor(context: RuntimeContext, options: PlaceRadialLabelsOptions);
|
|
25
25
|
private get ref();
|
|
26
26
|
afterLayout(): void;
|
|
27
27
|
}
|
|
@@ -7,16 +7,14 @@ import { BaseTransform } from './base-transform';
|
|
|
7
7
|
import type { DrawData } from './types';
|
|
8
8
|
export interface ProcessParallelEdgesOptions extends BaseTransformOptions {
|
|
9
9
|
/**
|
|
10
|
-
* <zh/>
|
|
10
|
+
* <zh/> 处理模式
|
|
11
|
+
* - `'merge'`: 将平行边合并为一条边,适用于不需要区分平行边的情况
|
|
12
|
+
* - '`bundle`': 每条边都会与其他所有平行边捆绑在一起,并通过改变曲率与其他边分开。如果一组平行边的数量是奇数,那么中心的边将被绘制为直线,其他的边将被绘制为曲线
|
|
11
13
|
*
|
|
12
|
-
* <en/> Processing mode
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* - bundle: 每条边都会与其他所有平行边捆绑在一起,并通过改变曲率与其他边分开。如果一组平行边的数量是奇数,那么中心的边将被绘制为直线,其他的边将被绘制为曲线
|
|
17
|
-
* <en/>
|
|
18
|
-
* - merge: Merge parallel edges into one edge which is suitable for cases where parallel edges do not need to be distinguished
|
|
19
|
-
* - bundle: Each edge will be bundled with all other parallel edges and separated from them by varying the curvature. If the number of parallel edges in a group is odd, the central edge will be drawn as a straight line, and the others will be drawn as curves
|
|
14
|
+
* <en/> Processing mode
|
|
15
|
+
* - '`merge`': Merge parallel edges into one edge which is suitable for cases where parallel edges do not need to be distinguished
|
|
16
|
+
* - '`bundle`': Each edge will be bundled with all other parallel edges and separated from them by varying the curvature. If the number of parallel edges in a group is odd, the central edge will be drawn as a straight line, and the others will be drawn as curves
|
|
17
|
+
* @defaultValue 'bundle'
|
|
20
18
|
*/
|
|
21
19
|
mode: 'bundle' | 'merge';
|
|
22
20
|
/**
|
|
@@ -4,10 +4,10 @@ import type { DrawData } from './types';
|
|
|
4
4
|
* <zh/> 重新分配绘制任务
|
|
5
5
|
*
|
|
6
6
|
* <en/> Reassign drawing tasks
|
|
7
|
-
* @param input - <zh
|
|
8
|
-
* @param type - <zh
|
|
9
|
-
* @param elementType - <zh
|
|
10
|
-
* @param datum - <zh
|
|
11
|
-
* @param overwrite - <zh
|
|
7
|
+
* @param input - <zh/>绘制数据 | <en/>DrawData
|
|
8
|
+
* @param type - <zh/>类型 | <en/>type
|
|
9
|
+
* @param elementType - <zh/>元素类型 | <en/>element type
|
|
10
|
+
* @param datum - <zh/>数据 | <en/>data
|
|
11
|
+
* @param overwrite - <zh/>是否覆盖现有数据 | <en/>whether to overwrite existing data
|
|
12
12
|
*/
|
|
13
13
|
export declare function reassignTo(input: DrawData, type: 'add' | 'update' | 'remove', elementType: ElementType, datum: ElementDatum, overwrite?: boolean): void;
|
package/dist/lib/utils/bbox.d.ts
CHANGED
|
@@ -84,6 +84,15 @@ export declare function isPointOnBBoxBoundary(point: Point, bbox: AABB, extended
|
|
|
84
84
|
* @returns <zh/> 如果点在包围盒外返回 true,否则返回 false | <en/> Returns true if the point is outside the bounding box, false otherwise
|
|
85
85
|
*/
|
|
86
86
|
export declare function isPointOutsideBBox(point: Point, bbox: AABB): boolean;
|
|
87
|
+
/**
|
|
88
|
+
* <zh/> 判断点是否位于包围盒中心
|
|
89
|
+
*
|
|
90
|
+
* <en/> When the point is at the center of the bounding box
|
|
91
|
+
* @param point - <zh/> 点 | <en/> Point
|
|
92
|
+
* @param bbox - <zh/> 包围盒 | <en/> Bounding box
|
|
93
|
+
* @returns <zh/> 如果点在包围盒中心返回 true,否则返回 false | <en/> Returns true if the point is at the center of the bounding box, false otherwise
|
|
94
|
+
*/
|
|
95
|
+
export declare function isPointBBoxCenter(point: Point, bbox: AABB): boolean;
|
|
87
96
|
/**
|
|
88
97
|
* <zh/> 获取包围盒上离点 `p` 最近的边
|
|
89
98
|
*
|
|
@@ -92,16 +101,16 @@ export declare function isPointOutsideBBox(point: Point, bbox: AABB): boolean;
|
|
|
92
101
|
* @param p - <zh/> 点 | <en/> Point
|
|
93
102
|
* @returns <zh/> 离点 `p` 最近的边 | <en/> The side nearest to the point `p`
|
|
94
103
|
*/
|
|
95
|
-
export declare function
|
|
104
|
+
export declare function getNearestBoundarySide(p: Point, bbox: AABB): 'left' | 'right' | 'top' | 'bottom';
|
|
96
105
|
/**
|
|
97
|
-
* <zh/> 获取包围盒上离点 `p`
|
|
106
|
+
* <zh/> 获取包围盒上离点 `p` 最近的边界点
|
|
98
107
|
*
|
|
99
108
|
* <en/> Get a point on the boundary nearest to the point `p`
|
|
100
109
|
* @param bbox - <zh/> 包围盒 | <en/> Bounding box
|
|
101
110
|
* @param p - <zh/> 点 | <en/> Point
|
|
102
111
|
* @returns <zh/> 离点 `p` 最近的点 | <en/> The point nearest to the point `p`
|
|
103
112
|
*/
|
|
104
|
-
export declare function
|
|
113
|
+
export declare function getNearestBoundaryPoint(p: Point, bbox: AABB): Point;
|
|
105
114
|
/**
|
|
106
115
|
* The triangle center point of the bounding box
|
|
107
116
|
* @param bbox - bounding box
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Padding, STDPadding } from '../types/padding';
|
|
2
2
|
/**
|
|
3
|
-
* <zh
|
|
3
|
+
* <zh/> 解析 padding
|
|
4
4
|
*
|
|
5
|
-
* <en
|
|
6
|
-
* @param padding - <zh
|
|
7
|
-
* @returns <zh
|
|
5
|
+
* <en/> parse padding
|
|
6
|
+
* @param padding - <zh/> padding | <en/> padding
|
|
7
|
+
* @returns <zh/> 标准 padding | <en/> standard padding
|
|
8
8
|
*/
|
|
9
9
|
export declare function parsePadding(padding?: Padding): STDPadding;
|
|
@@ -55,7 +55,7 @@ export declare function subObject(obj: Record<string, any>, prefix: string): Rec
|
|
|
55
55
|
*/
|
|
56
56
|
export declare function omitStyleProps<T extends Record<string, any>>(style: Record<string, any>, prefix: string | string[]): T;
|
|
57
57
|
/**
|
|
58
|
-
* <zh
|
|
58
|
+
* <zh/> 替换前缀
|
|
59
59
|
*
|
|
60
60
|
* <en/> Replace prefix
|
|
61
61
|
* @param style - <zh/> 样式 | <en/> style
|
|
@@ -17,7 +17,7 @@ type Route = {
|
|
|
17
17
|
* @param options - <zh/> 配置项 | <en/> options
|
|
18
18
|
* @returns <zh/> 路径点集 | <en/> vertices
|
|
19
19
|
*/
|
|
20
|
-
export declare function orth(sourcePoint: Point, targetPoint: Point, sourceNode: Node, targetNode: Node, controlPoints: Point[], options: OrthRouterOptions):
|
|
20
|
+
export declare function orth(sourcePoint: Point, targetPoint: Point, sourceNode: Node, targetNode: Node, controlPoints: Point[], options: OrthRouterOptions): import("../../types").Vector2[];
|
|
21
21
|
/**
|
|
22
22
|
* <zh/> 获取两点之间的方向,从 `from` 到 `to` 的方向
|
|
23
23
|
*
|
package/dist/lib/utils/size.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { STDSize, Size } from '../types';
|
|
2
2
|
/**
|
|
3
|
-
* <zh/> 解析尺寸配置
|
|
3
|
+
* <zh/> 解析尺寸配置
|
|
4
|
+
*
|
|
5
|
+
* <en/> Parse size configuration
|
|
4
6
|
* @param size - <zh/> 尺寸配置 | <en/> size configuration
|
|
5
7
|
* @returns <zh/> 标准尺寸格式 | <en/> standard size format
|
|
6
8
|
*/
|
|
@@ -15,10 +15,10 @@ export declare function replaceTranslateInTransform(x: number, y: number, z: num
|
|
|
15
15
|
* <zh/> 重新分配绘制任务
|
|
16
16
|
*
|
|
17
17
|
* <en/> Reassign drawing tasks
|
|
18
|
-
* @param input - <zh
|
|
19
|
-
* @param type - <zh
|
|
20
|
-
* @param elementType - <zh
|
|
21
|
-
* @param datum - <zh
|
|
22
|
-
* @param merge - <zh
|
|
18
|
+
* @param input - <zh/>绘制数据 | <en/>DrawData
|
|
19
|
+
* @param type - <zh/>类型 | <en/>type
|
|
20
|
+
* @param elementType - <zh/>元素类型 | <en/>element type
|
|
21
|
+
* @param datum - <zh/>数据 | <en/>data
|
|
22
|
+
* @param merge - <zh/>是否合并 | <en/>whether to merge
|
|
23
23
|
*/
|
|
24
24
|
export declare const reassignTo: (input: DrawData, type: "add" | "update" | "remove", elementType: ElementType, datum: ElementDatum, merge?: boolean) => void;
|
package/dist/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "5.0.
|
|
1
|
+
export declare const version = "5.0.22";
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { BaseExtension } from '../registry/extension';
|
|
2
2
|
import type { CustomBehaviorOption } from '../spec/behavior';
|
|
3
|
+
/**
|
|
4
|
+
* <zh/> 交互通用配置项
|
|
5
|
+
*
|
|
6
|
+
* <en/> Base options for behaviors
|
|
7
|
+
*/
|
|
3
8
|
export interface BaseBehaviorOptions extends CustomBehaviorOption {
|
|
4
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* <zh/> 交互的基类
|
|
12
|
+
*
|
|
13
|
+
* <en/> Base class for behaviors
|
|
14
|
+
*/
|
|
5
15
|
export declare abstract class BaseBehavior<T extends BaseBehaviorOptions = BaseBehaviorOptions> extends BaseExtension<T> {
|
|
6
16
|
}
|