@antv/g6 5.0.13 → 5.0.15
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/dist/g6.min.js +2 -2
- package/dist/lib/behaviors/drag-canvas.d.ts +0 -1
- package/dist/lib/elements/shapes/badge.d.ts +1 -1
- package/dist/lib/elements/shapes/base-shape.d.ts +1 -1
- package/dist/lib/exports.d.ts +1 -0
- package/dist/lib/plugins/contextmenu/index.d.ts +3 -1
- package/dist/lib/plugins/minimap/index.d.ts +2 -0
- package/dist/lib/runtime/canvas.d.ts +17 -1
- package/dist/lib/spec/canvas.d.ts +7 -1
- package/dist/lib/utils/style.d.ts +1 -1
- package/dist/lib/utils/visibility.d.ts +2 -2
- package/dist/lib/version.d.ts +1 -1
- package/esm/behaviors/click-select.js +2 -3
- package/esm/behaviors/click-select.js.map +1 -1
- package/esm/behaviors/drag-canvas.d.ts +0 -1
- package/esm/behaviors/drag-canvas.js +7 -10
- package/esm/behaviors/drag-canvas.js.map +1 -1
- package/esm/behaviors/optimize-viewport-transform.js +1 -1
- package/esm/behaviors/optimize-viewport-transform.js.map +1 -1
- package/esm/elements/shapes/badge.d.ts +1 -1
- package/esm/elements/shapes/base-shape.d.ts +1 -1
- package/esm/elements/shapes/base-shape.js.map +1 -1
- package/esm/exports.d.ts +1 -0
- package/esm/exports.js +1 -0
- package/esm/exports.js.map +1 -1
- package/esm/plugins/contextmenu/index.d.ts +3 -1
- package/esm/plugins/contextmenu/index.js +4 -1
- package/esm/plugins/contextmenu/index.js.map +1 -1
- package/esm/plugins/history/util.js +1 -1
- package/esm/plugins/history/util.js.map +1 -1
- package/esm/plugins/minimap/index.d.ts +2 -0
- package/esm/plugins/minimap/index.js +24 -12
- package/esm/plugins/minimap/index.js.map +1 -1
- package/esm/runtime/canvas.d.ts +17 -1
- package/esm/runtime/canvas.js +26 -3
- package/esm/runtime/canvas.js.map +1 -1
- package/esm/runtime/element.js +1 -1
- package/esm/runtime/element.js.map +1 -1
- package/esm/runtime/graph.js +7 -2
- package/esm/runtime/graph.js.map +1 -1
- package/esm/spec/canvas.d.ts +7 -1
- package/esm/utils/style.d.ts +1 -1
- package/esm/utils/style.js +1 -1
- package/esm/utils/style.js.map +1 -1
- package/esm/utils/visibility.d.ts +2 -2
- package/esm/utils/visibility.js +35 -18
- package/esm/utils/visibility.js.map +1 -1
- package/esm/version.d.ts +1 -1
- package/esm/version.js +1 -1
- package/lib/behaviors/click-select.js +2 -3
- package/lib/behaviors/click-select.js.map +1 -1
- package/lib/behaviors/drag-canvas.d.ts +0 -1
- package/lib/behaviors/drag-canvas.js +6 -9
- package/lib/behaviors/drag-canvas.js.map +1 -1
- package/lib/behaviors/optimize-viewport-transform.js +1 -1
- package/lib/behaviors/optimize-viewport-transform.js.map +1 -1
- package/lib/elements/shapes/badge.d.ts +1 -1
- package/lib/elements/shapes/base-shape.d.ts +1 -1
- package/lib/elements/shapes/base-shape.js.map +1 -1
- package/lib/exports.d.ts +1 -0
- package/lib/exports.js +3 -1
- package/lib/exports.js.map +1 -1
- package/lib/plugins/contextmenu/index.d.ts +3 -1
- package/lib/plugins/contextmenu/index.js +4 -1
- package/lib/plugins/contextmenu/index.js.map +1 -1
- package/lib/plugins/history/util.js +1 -1
- package/lib/plugins/history/util.js.map +1 -1
- package/lib/plugins/minimap/index.d.ts +2 -0
- package/lib/plugins/minimap/index.js +24 -12
- package/lib/plugins/minimap/index.js.map +1 -1
- package/lib/runtime/canvas.d.ts +17 -1
- package/lib/runtime/canvas.js +26 -3
- package/lib/runtime/canvas.js.map +1 -1
- package/lib/runtime/element.js +1 -1
- package/lib/runtime/element.js.map +1 -1
- package/lib/runtime/graph.js +7 -2
- package/lib/runtime/graph.js.map +1 -1
- package/lib/spec/canvas.d.ts +7 -1
- package/lib/utils/style.d.ts +1 -1
- package/lib/utils/style.js +1 -1
- package/lib/utils/style.js.map +1 -1
- package/lib/utils/visibility.d.ts +2 -2
- package/lib/utils/visibility.js +35 -18
- package/lib/utils/visibility.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/behaviors/click-select.ts +2 -3
- package/src/behaviors/drag-canvas.ts +7 -11
- package/src/behaviors/optimize-viewport-transform.ts +1 -1
- package/src/elements/shapes/base-shape.ts +4 -1
- package/src/exports.ts +1 -0
- package/src/plugins/contextmenu/index.ts +8 -3
- package/src/plugins/history/util.ts +1 -1
- package/src/plugins/minimap/index.ts +28 -15
- package/src/runtime/canvas.ts +26 -3
- package/src/runtime/element.ts +1 -1
- package/src/runtime/graph.ts +6 -3
- package/src/spec/canvas.ts +7 -1
- package/src/utils/style.ts +5 -2
- package/src/utils/visibility.ts +33 -16
- package/src/version.ts +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { RuntimeContext } from '../../runtime/types';
|
|
2
|
+
import type { Element } from '../../types';
|
|
2
3
|
import type { IElementEvent } from '../../types/event';
|
|
3
4
|
import { createPluginContainer, insertDOM } from '../../utils/dom';
|
|
4
5
|
import type { BasePluginOptions } from '../base-plugin';
|
|
5
6
|
import { BasePlugin } from '../base-plugin';
|
|
6
7
|
import type { Item } from './util';
|
|
7
8
|
import { CONTEXTMENU_CSS, getContentFromItems } from './util';
|
|
8
|
-
|
|
9
9
|
/**
|
|
10
10
|
* <zh/> 上下文菜单配置项
|
|
11
11
|
*
|
|
@@ -42,7 +42,7 @@ export interface ContextmenuOptions extends BasePluginOptions {
|
|
|
42
42
|
*
|
|
43
43
|
* <en/> The callback method triggered when the menu is clicked
|
|
44
44
|
*/
|
|
45
|
-
onClick?: (value: string, target: HTMLElement) => void;
|
|
45
|
+
onClick?: (value: string, target: HTMLElement, current: Element) => void;
|
|
46
46
|
/**
|
|
47
47
|
* <zh/> 返回菜单的项目列表,支持 `Promise` 类型的返回值。是 `getContent` 的快捷配置
|
|
48
48
|
*
|
|
@@ -90,6 +90,8 @@ export class Contextmenu extends BasePlugin<ContextmenuOptions> {
|
|
|
90
90
|
|
|
91
91
|
private $element!: HTMLElement;
|
|
92
92
|
|
|
93
|
+
private targetElement: Element | null = null;
|
|
94
|
+
|
|
93
95
|
constructor(context: RuntimeContext, options: ContextmenuOptions) {
|
|
94
96
|
super(context, Object.assign({}, Contextmenu.defaultOptions, options));
|
|
95
97
|
|
|
@@ -138,6 +140,8 @@ export class Contextmenu extends BasePlugin<ContextmenuOptions> {
|
|
|
138
140
|
this.$element.style.left = `${event.client.x - clientRect.left + offset[0]}px`;
|
|
139
141
|
this.$element.style.top = `${event.client.y - clientRect.top + offset[1]}px`;
|
|
140
142
|
this.$element.style.display = 'block';
|
|
143
|
+
|
|
144
|
+
this.targetElement = event.target;
|
|
141
145
|
}
|
|
142
146
|
|
|
143
147
|
/**
|
|
@@ -147,6 +151,7 @@ export class Contextmenu extends BasePlugin<ContextmenuOptions> {
|
|
|
147
151
|
*/
|
|
148
152
|
public hide() {
|
|
149
153
|
this.$element.style.display = 'none';
|
|
154
|
+
this.targetElement = null;
|
|
150
155
|
}
|
|
151
156
|
|
|
152
157
|
/**
|
|
@@ -218,7 +223,7 @@ export class Contextmenu extends BasePlugin<ContextmenuOptions> {
|
|
|
218
223
|
if (event.target instanceof HTMLElement) {
|
|
219
224
|
if (event.target.className.includes('g6-contextmenu-li')) {
|
|
220
225
|
const value = event.target.getAttribute('value') as string;
|
|
221
|
-
onClick?.(value, event.target);
|
|
226
|
+
onClick?.(value, event.target, this.targetElement!);
|
|
222
227
|
this.hide();
|
|
223
228
|
}
|
|
224
229
|
}
|
|
@@ -18,7 +18,7 @@ export function alignFields(refObject: Record<string, any>, targetObject: Record
|
|
|
18
18
|
if (isObject(refObject[key]) && !Array.isArray(refObject[key]) && refObject[key] !== null) {
|
|
19
19
|
if (!targetObject[key]) targetObject[key] = {};
|
|
20
20
|
alignFields(refObject[key], targetObject[key]);
|
|
21
|
-
} else if (
|
|
21
|
+
} else if (targetObject[key] === undefined) {
|
|
22
22
|
targetObject[key] = inferDefaultValue(key);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Canvas, DisplayObject, IRenderer } from '@antv/g';
|
|
1
|
+
import { Canvas, DisplayObject, IRenderer, Landmark } from '@antv/g';
|
|
2
2
|
import { Renderer } from '@antv/g-canvas';
|
|
3
3
|
import { throttle } from '@antv/util';
|
|
4
4
|
import { GraphEvent } from '../../constants';
|
|
5
5
|
import type { RuntimeContext } from '../../runtime/types';
|
|
6
6
|
import { GraphData } from '../../spec';
|
|
7
|
-
import type { ElementDatum, ElementType, ID, IGraphLifeCycleEvent, Padding, Placement } from '../../types';
|
|
7
|
+
import type { ElementDatum, ElementType, ID, IGraphLifeCycleEvent, Padding, Placement, Vector3 } from '../../types';
|
|
8
8
|
import { idOf } from '../../utils/id';
|
|
9
9
|
import { parsePadding } from '../../utils/padding';
|
|
10
10
|
import { parsePlacement } from '../../utils/placement';
|
|
@@ -201,7 +201,11 @@ export class Minimap extends BasePlugin<MinimapOptions> {
|
|
|
201
201
|
if (!this.shapes.has(id)) {
|
|
202
202
|
canvas.appendChild(cloneShape);
|
|
203
203
|
this.shapes.set(id, cloneShape);
|
|
204
|
-
} else
|
|
204
|
+
} else {
|
|
205
|
+
Object.entries(shape.attributes).forEach(([key, value]) => {
|
|
206
|
+
if (cloneShape.style[key] !== value) cloneShape.style[key] = value;
|
|
207
|
+
});
|
|
208
|
+
}
|
|
205
209
|
};
|
|
206
210
|
|
|
207
211
|
// 注意执行顺序 / Note the execution order
|
|
@@ -308,6 +312,23 @@ export class Minimap extends BasePlugin<MinimapOptions> {
|
|
|
308
312
|
return this.canvas;
|
|
309
313
|
}
|
|
310
314
|
|
|
315
|
+
private landmarkMap = new Map<string, Landmark>();
|
|
316
|
+
|
|
317
|
+
private createLandmark(position: Vector3, focalPoint: Vector3, zoom: number) {
|
|
318
|
+
const key = `${position.join(',')}-${focalPoint.join(',')}-${zoom}`;
|
|
319
|
+
|
|
320
|
+
if (this.landmarkMap.has(key)) return this.landmarkMap.get(key)!;
|
|
321
|
+
|
|
322
|
+
const camera = this.canvas.getCamera();
|
|
323
|
+
const landmark = camera.createLandmark(key, {
|
|
324
|
+
position,
|
|
325
|
+
focalPoint,
|
|
326
|
+
zoom,
|
|
327
|
+
});
|
|
328
|
+
this.landmarkMap.set(key, landmark);
|
|
329
|
+
return landmark;
|
|
330
|
+
}
|
|
331
|
+
|
|
311
332
|
private setCamera() {
|
|
312
333
|
const { canvas } = this.context;
|
|
313
334
|
|
|
@@ -319,7 +340,7 @@ export class Minimap extends BasePlugin<MinimapOptions> {
|
|
|
319
340
|
padding,
|
|
320
341
|
} = this.options;
|
|
321
342
|
const [top, right, bottom, left] = parsePadding(padding);
|
|
322
|
-
const { min: boundsMin, max: boundsMax, center } = canvas.getBounds();
|
|
343
|
+
const { min: boundsMin, max: boundsMax, center } = canvas.getBounds('elements');
|
|
323
344
|
const boundsWidth = boundsMax[0] - boundsMin[0];
|
|
324
345
|
const boundsHeight = boundsMax[1] - boundsMin[1];
|
|
325
346
|
|
|
@@ -330,9 +351,8 @@ export class Minimap extends BasePlugin<MinimapOptions> {
|
|
|
330
351
|
const scaleY = availableHeight / boundsHeight;
|
|
331
352
|
const scale = Math.min(scaleX, scaleY);
|
|
332
353
|
|
|
333
|
-
|
|
334
|
-
camera.
|
|
335
|
-
camera.setZoom(scale);
|
|
354
|
+
const landmark = this.createLandmark(center, center, scale);
|
|
355
|
+
camera.gotoLandmark(landmark, 0);
|
|
336
356
|
}
|
|
337
357
|
|
|
338
358
|
private mask: HTMLElement | null = null;
|
|
@@ -349,14 +369,7 @@ export class Minimap extends BasePlugin<MinimapOptions> {
|
|
|
349
369
|
const width = maskMax.x - maskMin.x;
|
|
350
370
|
const height = maskMax.y - maskMin.y;
|
|
351
371
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
// magic number
|
|
355
|
-
const ratio = zoom * 0.5;
|
|
356
|
-
const x = maskMin.x - width * ratio;
|
|
357
|
-
const y = maskMin.y - height * ratio;
|
|
358
|
-
|
|
359
|
-
return [x, y, width, height];
|
|
372
|
+
return [maskMin.x, maskMin.y, width, height];
|
|
360
373
|
}
|
|
361
374
|
|
|
362
375
|
/**
|
package/src/runtime/canvas.ts
CHANGED
|
@@ -159,11 +159,34 @@ export class Canvas {
|
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
|
|
162
|
+
/**
|
|
163
|
+
* <zh/> 获取画布边界
|
|
164
|
+
*
|
|
165
|
+
* <en/> Get canvas boundary
|
|
166
|
+
* @param group
|
|
167
|
+
* <zh/> 元素分组
|
|
168
|
+
* - undefined: 获取整个画布边界
|
|
169
|
+
* - 'elements': 仅获取元素边界
|
|
170
|
+
* - 'plugins': 仅获取插件边界
|
|
171
|
+
*
|
|
172
|
+
* <en/> Element group
|
|
173
|
+
* - undefined: Get the entire canvas boundary
|
|
174
|
+
* - 'elements': Get only the element boundary
|
|
175
|
+
* - 'plugins': Get only the plugin boundary
|
|
176
|
+
* @returns <zh/> 边界 <en/> Boundary
|
|
177
|
+
*/
|
|
178
|
+
public getBounds(group?: 'elements' | 'plugins') {
|
|
163
179
|
return getCombinedBBox(
|
|
164
180
|
Object.values(this.getLayers())
|
|
165
|
-
.map((canvas) =>
|
|
166
|
-
|
|
181
|
+
.map((canvas) => {
|
|
182
|
+
const g = group
|
|
183
|
+
? (canvas
|
|
184
|
+
.getRoot()
|
|
185
|
+
.childNodes.find((node) => (node as DisplayObject).classList.includes(group)) as DisplayObject)
|
|
186
|
+
: canvas.getRoot();
|
|
187
|
+
return g;
|
|
188
|
+
})
|
|
189
|
+
.filter((el) => el?.childNodes.length > 0)
|
|
167
190
|
.map((el) => el.getBounds()),
|
|
168
191
|
);
|
|
169
192
|
}
|
package/src/runtime/element.ts
CHANGED
package/src/runtime/graph.ts
CHANGED
|
@@ -117,7 +117,8 @@ export class Graph extends EventEmitter {
|
|
|
117
117
|
* @apiCategory option
|
|
118
118
|
*/
|
|
119
119
|
public setOptions(options: GraphOptions): void {
|
|
120
|
-
const { behaviors, combo, data, edge, height, layout, node, plugins, theme, transforms, width, renderer } =
|
|
120
|
+
const { behaviors, combo, data, edge, height, layout, node, plugins, theme, transforms, width, cursor, renderer } =
|
|
121
|
+
options;
|
|
121
122
|
|
|
122
123
|
if (renderer) {
|
|
123
124
|
const canvas = this.context.canvas;
|
|
@@ -130,6 +131,7 @@ export class Graph extends EventEmitter {
|
|
|
130
131
|
|
|
131
132
|
Object.assign(this.options, options);
|
|
132
133
|
|
|
134
|
+
if (cursor) this.context.canvas?.setCursor(cursor);
|
|
133
135
|
if (behaviors) this.setBehaviors(behaviors);
|
|
134
136
|
if (combo) this.setCombo(combo);
|
|
135
137
|
if (data) this.setData(data);
|
|
@@ -1013,10 +1015,10 @@ export class Graph extends EventEmitter {
|
|
|
1013
1015
|
private async initCanvas() {
|
|
1014
1016
|
if (this.context.canvas) return await this.context.canvas.ready;
|
|
1015
1017
|
|
|
1016
|
-
const { container = 'container', width, height, renderer, background } = this.options;
|
|
1017
|
-
|
|
1018
|
+
const { container = 'container', width, height, renderer, cursor, background } = this.options;
|
|
1018
1019
|
if (container instanceof Canvas) {
|
|
1019
1020
|
this.context.canvas = container;
|
|
1021
|
+
if (cursor) container.setCursor(cursor);
|
|
1020
1022
|
await container.ready;
|
|
1021
1023
|
} else {
|
|
1022
1024
|
const $container = isString(container) ? document.getElementById(container!) : container;
|
|
@@ -1030,6 +1032,7 @@ export class Graph extends EventEmitter {
|
|
|
1030
1032
|
height: height || containerSize[1],
|
|
1031
1033
|
background,
|
|
1032
1034
|
renderer,
|
|
1035
|
+
cursor,
|
|
1033
1036
|
});
|
|
1034
1037
|
|
|
1035
1038
|
this.context.canvas = canvas;
|
package/src/spec/canvas.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IRenderer } from '@antv/g';
|
|
1
|
+
import type { Cursor, IRenderer } from '@antv/g';
|
|
2
2
|
import type { Canvas } from '../runtime/canvas';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -51,4 +51,10 @@ export interface CanvasOptions {
|
|
|
51
51
|
* <en/> device pixel ratio
|
|
52
52
|
*/
|
|
53
53
|
devicePixelRatio?: number;
|
|
54
|
+
/**
|
|
55
|
+
* <zh/> 指针样式
|
|
56
|
+
*
|
|
57
|
+
* <en/> cursor style
|
|
58
|
+
*/
|
|
59
|
+
cursor?: Cursor;
|
|
54
60
|
}
|
package/src/utils/style.ts
CHANGED
|
@@ -61,7 +61,10 @@ export function mergeOptions(opt1: DisplayObjectConfig<any>, opt2: DisplayObject
|
|
|
61
61
|
*/
|
|
62
62
|
export function getSubShapeStyle<T extends Record<string, any>>(
|
|
63
63
|
style: T,
|
|
64
|
-
): Omit<
|
|
65
|
-
|
|
64
|
+
): Omit<
|
|
65
|
+
T,
|
|
66
|
+
'x' | 'y' | 'z' | 'transform' | 'transformOrigin' | 'className' | 'class' | 'context' | 'zIndex' | 'visibility'
|
|
67
|
+
> {
|
|
68
|
+
const { x, y, z, class: cls, className, transform, transformOrigin, context, zIndex, visibility, ...rest } = style;
|
|
66
69
|
return rest;
|
|
67
70
|
}
|
package/src/utils/visibility.ts
CHANGED
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import type { BaseStyleProps, DisplayObject } from '@antv/g';
|
|
2
|
-
import { cacheStyle, getCachedStyle, hasCachedStyle } from './cache';
|
|
3
|
-
import { getDescendantShapes } from './shape';
|
|
4
2
|
|
|
5
|
-
const
|
|
3
|
+
const ORIGINAL_MAP = new WeakMap<DisplayObject, BaseStyleProps['visibility']>();
|
|
6
4
|
|
|
7
5
|
/**
|
|
8
6
|
* <zh/> 设置图形实例的可见性
|
|
9
7
|
*
|
|
10
8
|
* <en/> Set the visibility of the shape instance
|
|
11
9
|
* @param shape - <zh/> 图形实例 | <en/> shape instance
|
|
12
|
-
* @param
|
|
10
|
+
* @param value - <zh/> 可见性 | <en/> visibility
|
|
13
11
|
* @param filter - <zh/> 筛选出需要设置可见性的图形 | <en/> Filter out the shapes that need to set visibility
|
|
14
12
|
* @remarks
|
|
15
13
|
* <zh/> 在设置 enableCSSParsing 为 false 的情况下,复合图形无法继承父属性,因此需要对所有子图形应用相同的可见性
|
|
@@ -18,21 +16,40 @@ const PropertyKey = 'visibility';
|
|
|
18
16
|
*/
|
|
19
17
|
export function setVisibility(
|
|
20
18
|
shape: DisplayObject,
|
|
21
|
-
|
|
22
|
-
filter?: (
|
|
19
|
+
value: BaseStyleProps['visibility'],
|
|
20
|
+
filter?: (shape: DisplayObject) => boolean,
|
|
23
21
|
) {
|
|
24
|
-
|
|
22
|
+
if (value === undefined) return;
|
|
25
23
|
|
|
26
|
-
|
|
24
|
+
const traverse = (current: DisplayObject, scope = value) => {
|
|
25
|
+
const walk = (val = scope) => (current.childNodes as DisplayObject[]).forEach((node) => traverse(node, val));
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
if (!hasCachedStyle(sp, PropertyKey)) cacheStyle(sp, PropertyKey);
|
|
30
|
-
const cachedVisibility = getCachedStyle(sp, PropertyKey);
|
|
27
|
+
if (filter && !filter(current)) return walk();
|
|
31
28
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
if (current === shape) {
|
|
30
|
+
shape.style.visibility = value;
|
|
31
|
+
ORIGINAL_MAP.delete(shape);
|
|
32
|
+
walk(value);
|
|
33
|
+
} else {
|
|
34
|
+
if (!ORIGINAL_MAP.has(current)) ORIGINAL_MAP.set(current, current.style.visibility);
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
const computedValue = scope === 'hidden' || getOriginalValue(current) === 'hidden' ? 'hidden' : 'visible';
|
|
37
|
+
current.style.visibility = computedValue;
|
|
38
|
+
walk(computedValue);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
traverse(shape);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* <zh/> 获取图形原本的可见性
|
|
47
|
+
*
|
|
48
|
+
* <en/> Get the original visibility of the shape
|
|
49
|
+
* @param shape - <zh/> 图形实例 | <en/> shape instance
|
|
50
|
+
* @returns <zh/> 可见性 | <en/> visibility
|
|
51
|
+
*/
|
|
52
|
+
function getOriginalValue(shape: DisplayObject) {
|
|
53
|
+
if (ORIGINAL_MAP.has(shape)) return ORIGINAL_MAP.get(shape);
|
|
54
|
+
return shape.style.visibility;
|
|
38
55
|
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '5.0.
|
|
1
|
+
export const version = '5.0.15';
|