@antv/g 5.0.1 → 5.0.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/LICENSE +21 -0
- package/dist/index.umd.js +2 -2
- package/es/AbstractRenderer.d.ts +7 -7
- package/es/Canvas.d.ts +1 -1
- package/es/Canvas.js +1 -1
- package/es/camera/Camera.js +3 -5
- package/es/components/Geometry.d.ts +1 -1
- package/es/components/Renderable.d.ts +1 -1
- package/es/display-objects/CustomElement.d.ts +3 -3
- package/es/display-objects/CustomElement.js +4 -1
- package/es/display-objects/DisplayObject.d.ts +4 -3
- package/es/display-objects/DisplayObject.js +4 -3
- package/es/display-objects/Group.d.ts +1 -1
- package/es/display-objects/HTML.d.ts +1 -1
- package/es/display-objects/Image.d.ts +1 -1
- package/es/display-objects/Path.d.ts +1 -1
- package/es/display-objects/Polygon.d.ts +1 -1
- package/es/display-objects/Polyline.d.ts +1 -1
- package/es/display-objects/Text.d.ts +1 -1
- package/es/display-objects/Text.js +1 -1
- package/es/dom/Animation.js +9 -4
- package/es/dom/AnimationEffectTiming.d.ts +0 -1
- package/es/dom/AnimationTimeline.js +2 -1
- package/es/dom/CustomElementRegistry.d.ts +1 -1
- package/es/dom/CustomEvent.js +2 -1
- package/es/dom/Document.d.ts +2 -2
- package/es/dom/Document.js +13 -6
- package/es/dom/Element.d.ts +3 -4
- package/es/dom/Element.js +5 -4
- package/es/dom/EventTarget.js +1 -0
- package/es/dom/FederatedEvent.d.ts +1 -1
- package/es/dom/KeyframeEffect.js +1 -1
- package/es/dom/Node.d.ts +1 -1
- package/es/dom/Node.js +11 -5
- package/es/dom/interfaces.d.ts +57 -57
- package/es/plugins/CullingPlugin.d.ts +3 -3
- package/es/plugins/DirtyCheckPlugin.d.ts +1 -1
- package/es/plugins/EventPlugin.d.ts +2 -1
- package/es/plugins/FrustumCullingStrategy.d.ts +1 -2
- package/es/plugins/FrustumCullingStrategy.js +29 -32
- package/es/plugins/PrepareRendererPlugin.d.ts +1 -1
- package/es/plugins/PrepareRendererPlugin.js +7 -20
- package/es/property-handlers/aabb.js +16 -19
- package/es/property-handlers/anchor.d.ts +2 -1
- package/es/property-handlers/anchor.js +2 -2
- package/es/property-handlers/clipPath.js +2 -2
- package/es/property-handlers/color.d.ts +3 -4
- package/es/property-handlers/color.js +2 -2
- package/es/property-handlers/filter.d.ts +3 -4
- package/es/property-handlers/filter.js +2 -2
- package/es/property-handlers/interfaces.d.ts +1 -1
- package/es/property-handlers/lineDash.d.ts +1 -2
- package/es/property-handlers/lineDash.js +1 -1
- package/es/property-handlers/path.d.ts +2 -3
- package/es/property-handlers/path.js +2 -2
- package/es/property-handlers/points.d.ts +1 -2
- package/es/property-handlers/points.js +1 -1
- package/es/property-handlers/transform.d.ts +1 -1
- package/es/property-handlers/transform.js +0 -5
- package/es/services/ContextService.d.ts +8 -8
- package/es/services/EventService.d.ts +2 -2
- package/es/services/RenderingContext.d.ts +2 -2
- package/es/services/RenderingService.d.ts +18 -18
- package/es/services/RenderingService.js +3 -3
- package/es/services/SceneGraphSelector.d.ts +5 -5
- package/es/services/SceneGraphSelector.js +3 -2
- package/es/services/SceneGraphService.d.ts +36 -34
- package/es/services/SceneGraphService.js +33 -4
- package/es/services/aabb/PathUpdater.d.ts +1 -2
- package/es/services/aabb/PathUpdater.js +1 -1
- package/es/services/aabb/interfaces.d.ts +1 -1
- package/es/services/text/index.js +1 -1
- package/es/shapes/AABB.d.ts +3 -2
- package/es/shapes/Frustum.d.ts +1 -1
- package/es/shapes/Polygon.d.ts +1 -1
- package/es/shapes/Ray.d.ts +3 -3
- package/es/types.d.ts +1 -1
- package/es/utils/custom-easing.d.ts +3 -5
- package/es/utils/custom-easing.js +2 -1
- package/es/utils/event.d.ts +1 -1
- package/es/utils/interpolation.js +6 -9
- package/es/utils/math.d.ts +2 -1
- package/es/utils/math.js +1 -2
- package/es/utils/path.d.ts +1 -1
- package/es/utils/path.js +4 -7
- package/es/utils/raf.js +2 -1
- package/lib/AbstractRenderer.d.ts +7 -7
- package/lib/Canvas.d.ts +1 -1
- package/lib/Canvas.js +1 -1
- package/lib/camera/Camera.js +4 -5
- package/lib/components/Geometry.d.ts +1 -1
- package/lib/components/Renderable.d.ts +1 -1
- package/lib/display-objects/CustomElement.d.ts +3 -3
- package/lib/display-objects/CustomElement.js +4 -1
- package/lib/display-objects/DisplayObject.d.ts +4 -3
- package/lib/display-objects/DisplayObject.js +6 -3
- package/lib/display-objects/Group.d.ts +1 -1
- package/lib/display-objects/HTML.d.ts +1 -1
- package/lib/display-objects/Image.d.ts +1 -1
- package/lib/display-objects/Path.d.ts +1 -1
- package/lib/display-objects/Polygon.d.ts +1 -1
- package/lib/display-objects/Polyline.d.ts +1 -1
- package/lib/display-objects/Text.d.ts +1 -1
- package/lib/display-objects/Text.js +1 -1
- package/lib/dom/Animation.js +9 -4
- package/lib/dom/AnimationEffectTiming.d.ts +0 -1
- package/lib/dom/AnimationTimeline.js +2 -1
- package/lib/dom/CustomElementRegistry.d.ts +1 -1
- package/lib/dom/CustomEvent.js +1 -1
- package/lib/dom/Document.d.ts +2 -2
- package/lib/dom/Document.js +13 -6
- package/lib/dom/Element.d.ts +3 -4
- package/lib/dom/Element.js +5 -4
- package/lib/dom/EventTarget.js +1 -0
- package/lib/dom/FederatedEvent.d.ts +1 -1
- package/lib/dom/KeyframeEffect.js +1 -1
- package/lib/dom/Node.d.ts +1 -1
- package/lib/dom/Node.js +11 -5
- package/lib/dom/interfaces.d.ts +57 -57
- package/lib/plugins/CullingPlugin.d.ts +3 -3
- package/lib/plugins/DirtyCheckPlugin.d.ts +1 -1
- package/lib/plugins/EventPlugin.d.ts +2 -1
- package/lib/plugins/FrustumCullingStrategy.d.ts +1 -2
- package/lib/plugins/FrustumCullingStrategy.js +26 -30
- package/lib/plugins/PrepareRendererPlugin.d.ts +1 -1
- package/lib/plugins/PrepareRendererPlugin.js +6 -19
- package/lib/property-handlers/aabb.js +15 -19
- package/lib/property-handlers/anchor.d.ts +2 -1
- package/lib/property-handlers/anchor.js +2 -2
- package/lib/property-handlers/clipPath.js +2 -2
- package/lib/property-handlers/color.d.ts +3 -4
- package/lib/property-handlers/color.js +2 -2
- package/lib/property-handlers/filter.d.ts +3 -4
- package/lib/property-handlers/filter.js +2 -2
- package/lib/property-handlers/interfaces.d.ts +1 -1
- package/lib/property-handlers/lineDash.d.ts +1 -2
- package/lib/property-handlers/lineDash.js +1 -1
- package/lib/property-handlers/path.d.ts +2 -3
- package/lib/property-handlers/path.js +2 -2
- package/lib/property-handlers/points.d.ts +1 -2
- package/lib/property-handlers/points.js +1 -1
- package/lib/property-handlers/transform.d.ts +1 -1
- package/lib/property-handlers/transform.js +0 -4
- package/lib/services/ContextService.d.ts +8 -8
- package/lib/services/EventService.d.ts +2 -2
- package/lib/services/RenderingContext.d.ts +2 -2
- package/lib/services/RenderingService.d.ts +18 -18
- package/lib/services/RenderingService.js +3 -3
- package/lib/services/SceneGraphSelector.d.ts +5 -5
- package/lib/services/SceneGraphSelector.js +3 -2
- package/lib/services/SceneGraphService.d.ts +36 -34
- package/lib/services/SceneGraphService.js +35 -4
- package/lib/services/aabb/PathUpdater.d.ts +1 -2
- package/lib/services/aabb/PathUpdater.js +1 -1
- package/lib/services/aabb/interfaces.d.ts +1 -1
- package/lib/services/text/index.js +1 -1
- package/lib/shapes/AABB.d.ts +3 -2
- package/lib/shapes/Frustum.d.ts +1 -1
- package/lib/shapes/Polygon.d.ts +1 -1
- package/lib/shapes/Ray.d.ts +3 -3
- package/lib/types.d.ts +1 -1
- package/lib/utils/custom-easing.d.ts +3 -5
- package/lib/utils/custom-easing.js +2 -1
- package/lib/utils/event.d.ts +1 -1
- package/lib/utils/interpolation.js +6 -9
- package/lib/utils/math.d.ts +2 -1
- package/lib/utils/math.js +1 -2
- package/lib/utils/path.d.ts +2 -2
- package/lib/utils/path.js +4 -7
- package/lib/utils/raf.js +2 -1
- package/package.json +6 -6
- package/lib/dom/__tests__/utils/easing.d.ts +0 -14
- package/lib/dom/__tests__/utils/keyframe.d.ts +0 -38
package/es/dom/interfaces.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import EventEmitter from 'eventemitter3';
|
|
1
|
+
import type EventEmitter from 'eventemitter3';
|
|
2
2
|
import type { AnimationTimeline } from './AnimationTimeline';
|
|
3
|
-
import { BaseStyleProps, ParsedBaseStyleProps, SHAPE } from '../types';
|
|
3
|
+
import type { BaseStyleProps, ParsedBaseStyleProps, SHAPE } from '../types';
|
|
4
4
|
import type { FederatedEvent } from './FederatedEvent';
|
|
5
|
-
import { CustomElementRegistry } from './CustomElementRegistry';
|
|
6
|
-
import { DisplayObject } from '..';
|
|
5
|
+
import type { CustomElementRegistry } from './CustomElementRegistry';
|
|
6
|
+
import type { DisplayObject } from '..';
|
|
7
7
|
import type { PointLike } from '../shapes';
|
|
8
8
|
import type { Camera } from '../camera';
|
|
9
|
-
import { ContextService } from '../services';
|
|
9
|
+
import type { ContextService } from '../services';
|
|
10
10
|
/**
|
|
11
11
|
* built-in events for element
|
|
12
12
|
*/
|
|
@@ -35,13 +35,13 @@ export declare enum ElementEvent {
|
|
|
35
35
|
}
|
|
36
36
|
export interface IEventTarget {
|
|
37
37
|
emitter: EventEmitter;
|
|
38
|
-
on(type: string, listener: EventListenerOrEventListenerObject | ((...args: any[]) => void), options?: boolean | AddEventListenerOptions)
|
|
39
|
-
addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions)
|
|
40
|
-
off(type: string, listener: EventListenerOrEventListenerObject | ((...args: any[]) => void), options?: boolean | AddEventListenerOptions)
|
|
41
|
-
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions)
|
|
42
|
-
removeAllEventListeners()
|
|
43
|
-
dispatchEvent<T extends FederatedEvent>(e: T)
|
|
44
|
-
emit(eventName: string, object: object)
|
|
38
|
+
on: (type: string, listener: EventListenerOrEventListenerObject | ((...args: any[]) => void), options?: boolean | AddEventListenerOptions) => this;
|
|
39
|
+
addEventListener: (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions) => this;
|
|
40
|
+
off: (type: string, listener: EventListenerOrEventListenerObject | ((...args: any[]) => void), options?: boolean | AddEventListenerOptions) => this;
|
|
41
|
+
removeEventListener: (type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions) => this;
|
|
42
|
+
removeAllEventListeners: () => void;
|
|
43
|
+
dispatchEvent: <T extends FederatedEvent>(e: T) => boolean;
|
|
44
|
+
emit: (eventName: string, object: object) => void;
|
|
45
45
|
}
|
|
46
46
|
export interface INode extends IEventTarget {
|
|
47
47
|
shadow: boolean;
|
|
@@ -95,54 +95,54 @@ export interface INode extends IEventTarget {
|
|
|
95
95
|
*/
|
|
96
96
|
readonly previousSibling: (IChildNode & INode) | null;
|
|
97
97
|
textContent: string | null;
|
|
98
|
-
appendChild<T extends INode>(newChild: T, index?: number)
|
|
98
|
+
appendChild: <T extends INode>(newChild: T, index?: number) => T;
|
|
99
99
|
/**
|
|
100
100
|
* Returns a copy of node. If deep is true, the copy also includes the node's descendants.
|
|
101
101
|
*/
|
|
102
|
-
cloneNode(deep?: boolean)
|
|
102
|
+
cloneNode: (deep?: boolean) => INode;
|
|
103
103
|
/**
|
|
104
104
|
* Returns a bitmask indicating the position of other relative to node.
|
|
105
105
|
*/
|
|
106
|
-
compareDocumentPosition(other: INode)
|
|
106
|
+
compareDocumentPosition: (other: INode) => number;
|
|
107
107
|
/**
|
|
108
108
|
* Returns true if other is an inclusive descendant of node, and false otherwise.
|
|
109
109
|
*/
|
|
110
|
-
contains(other: INode | null)
|
|
110
|
+
contains: (other: INode | null) => boolean;
|
|
111
111
|
/**
|
|
112
112
|
* Returns node's root.
|
|
113
113
|
*/
|
|
114
|
-
getRootNode(options?: GetRootNodeOptions)
|
|
114
|
+
getRootNode: (options?: GetRootNodeOptions) => INode;
|
|
115
115
|
/**
|
|
116
116
|
* Returns node's ancestor.
|
|
117
117
|
*/
|
|
118
|
-
getAncestor(n: number)
|
|
118
|
+
getAncestor: (n: number) => INode | null;
|
|
119
119
|
/**
|
|
120
120
|
* Traverse in sub tree.
|
|
121
121
|
*/
|
|
122
|
-
forEach(callback: (o: INode) => void | boolean)
|
|
122
|
+
forEach: (callback: (o: INode) => void | boolean) => void;
|
|
123
123
|
/**
|
|
124
124
|
* Returns whether node has children.
|
|
125
125
|
*/
|
|
126
|
-
hasChildNodes()
|
|
127
|
-
insertBefore<T extends INode>(newChild: T, refChild: INode | null)
|
|
128
|
-
isDefaultNamespace(namespace: string | null)
|
|
126
|
+
hasChildNodes: () => boolean;
|
|
127
|
+
insertBefore: <T extends INode>(newChild: T, refChild: INode | null) => T;
|
|
128
|
+
isDefaultNamespace: (namespace: string | null) => boolean;
|
|
129
129
|
/**
|
|
130
130
|
* Returns whether node and otherNode have the same properties.
|
|
131
131
|
*/
|
|
132
|
-
isEqualNode(otherNode: INode | null)
|
|
133
|
-
isSameNode(otherNode: INode | null)
|
|
134
|
-
lookupNamespaceURI(prefix: string | null)
|
|
135
|
-
lookupPrefix(namespace: string | null)
|
|
132
|
+
isEqualNode: (otherNode: INode | null) => boolean;
|
|
133
|
+
isSameNode: (otherNode: INode | null) => boolean;
|
|
134
|
+
lookupNamespaceURI: (prefix: string | null) => string | null;
|
|
135
|
+
lookupPrefix: (namespace: string | null) => string | null;
|
|
136
136
|
/**
|
|
137
137
|
* Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.
|
|
138
138
|
*/
|
|
139
|
-
normalize()
|
|
140
|
-
removeChild<T extends INode>(oldChild: T, destroy?: boolean)
|
|
141
|
-
replaceChild<T extends INode & IChildNode>(newChild: INode, oldChild: T, destroy?: boolean)
|
|
139
|
+
normalize: () => void;
|
|
140
|
+
removeChild: <T extends INode>(oldChild: T, destroy?: boolean) => T;
|
|
141
|
+
replaceChild: <T extends INode & IChildNode>(newChild: INode, oldChild: T, destroy?: boolean) => T;
|
|
142
142
|
/**
|
|
143
143
|
* Destroy itself.
|
|
144
144
|
*/
|
|
145
|
-
destroy()
|
|
145
|
+
destroy: () => void;
|
|
146
146
|
}
|
|
147
147
|
export interface IParentNode {
|
|
148
148
|
readonly childElementCount: number;
|
|
@@ -163,29 +163,29 @@ export interface IParentNode {
|
|
|
163
163
|
*
|
|
164
164
|
* Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
|
|
165
165
|
*/
|
|
166
|
-
append(...nodes: INode[])
|
|
166
|
+
append: (...nodes: INode[]) => void;
|
|
167
167
|
/**
|
|
168
168
|
* Inserts nodes before the first child of node, while replacing strings in nodes with equivalent Text nodes.
|
|
169
169
|
*
|
|
170
170
|
* Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
|
|
171
171
|
*/
|
|
172
|
-
prepend(...nodes: INode[])
|
|
172
|
+
prepend: (...nodes: INode[]) => void;
|
|
173
173
|
/**
|
|
174
174
|
* Returns the first element that is a descendant of node that matches selectors.
|
|
175
175
|
*/
|
|
176
|
-
querySelector<E extends IElement = IElement>(selectors: string)
|
|
176
|
+
querySelector: <E extends IElement = IElement>(selectors: string) => E | null;
|
|
177
177
|
/**
|
|
178
178
|
* Returns all element descendants of node that match selectors.
|
|
179
179
|
*/
|
|
180
|
-
querySelectorAll<E extends IElement = IElement>(selectors: string)
|
|
180
|
+
querySelectorAll: <E extends IElement = IElement>(selectors: string) => E[];
|
|
181
181
|
/**
|
|
182
182
|
* Similar to querySelector, use custom filter instead of selectors.
|
|
183
183
|
*/
|
|
184
|
-
find<E extends IElement = IElement>(filter: (node: E) => boolean)
|
|
184
|
+
find: <E extends IElement = IElement>(filter: (node: E) => boolean) => E | null;
|
|
185
185
|
/**
|
|
186
186
|
* Similar to querySelectorAll, use custom filter instead of selectors.
|
|
187
187
|
*/
|
|
188
|
-
findAll<E extends IElement = IElement>(filter: (node: E) => boolean)
|
|
188
|
+
findAll: <E extends IElement = IElement>(filter: (node: E) => boolean) => E[];
|
|
189
189
|
}
|
|
190
190
|
export interface IChildNode extends INode {
|
|
191
191
|
/**
|
|
@@ -193,23 +193,23 @@ export interface IChildNode extends INode {
|
|
|
193
193
|
*
|
|
194
194
|
* Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
|
|
195
195
|
*/
|
|
196
|
-
after(...nodes: INode[])
|
|
196
|
+
after: (...nodes: INode[]) => void;
|
|
197
197
|
/**
|
|
198
198
|
* Inserts nodes just before node, while replacing strings in nodes with equivalent Text nodes.
|
|
199
199
|
*
|
|
200
200
|
* Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
|
|
201
201
|
*/
|
|
202
|
-
before(...nodes: INode[])
|
|
202
|
+
before: (...nodes: INode[]) => void;
|
|
203
203
|
/**
|
|
204
204
|
* Removes node.
|
|
205
205
|
*/
|
|
206
|
-
remove()
|
|
206
|
+
remove: () => void;
|
|
207
207
|
/**
|
|
208
208
|
* Replaces node with nodes, while replacing strings in nodes with equivalent Text nodes.
|
|
209
209
|
*
|
|
210
210
|
* Throws a "HierarchyRequestError" DOMException if the constraints of the node tree are violated.
|
|
211
211
|
*/
|
|
212
|
-
replaceWith(...nodes: INode[])
|
|
212
|
+
replaceWith: (...nodes: INode[]) => void;
|
|
213
213
|
}
|
|
214
214
|
export interface DisplayObjectConfig<StyleProps> {
|
|
215
215
|
/**
|
|
@@ -274,24 +274,24 @@ export interface IElement<StyleProps extends BaseStyleProps = any, ParsedStylePr
|
|
|
274
274
|
*/
|
|
275
275
|
style: StyleProps;
|
|
276
276
|
parsedStyle: ParsedStyleProps;
|
|
277
|
-
getElementById<E extends IElement = IElement>(id: string)
|
|
278
|
-
getElementsByName<E extends IElement = IElement>(name: string)
|
|
279
|
-
getElementsByClassName<E extends IElement = IElement>(className: string)
|
|
280
|
-
getElementsByTagName<E extends IElement = IElement>(tagName: string)
|
|
277
|
+
getElementById: <E extends IElement = IElement>(id: string) => E | null;
|
|
278
|
+
getElementsByName: <E extends IElement = IElement>(name: string) => E[];
|
|
279
|
+
getElementsByClassName: <E extends IElement = IElement>(className: string) => E[];
|
|
280
|
+
getElementsByTagName: <E extends IElement = IElement>(tagName: string) => E[];
|
|
281
281
|
scrollLeft: number;
|
|
282
282
|
scrollTop: number;
|
|
283
283
|
/**
|
|
284
284
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute
|
|
285
285
|
*/
|
|
286
|
-
setAttribute<Key extends keyof StyleProps>(attributeName: Key, value: StyleProps[Key], force?: boolean)
|
|
286
|
+
setAttribute: <Key extends keyof StyleProps>(attributeName: Key, value: StyleProps[Key], force?: boolean) => void;
|
|
287
287
|
/**
|
|
288
288
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute
|
|
289
289
|
*/
|
|
290
|
-
getAttribute(attributeName: keyof StyleProps)
|
|
290
|
+
getAttribute: (attributeName: keyof StyleProps) => StyleProps[keyof StyleProps] | undefined;
|
|
291
291
|
/**
|
|
292
292
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute
|
|
293
293
|
*/
|
|
294
|
-
removeAttribute(attributeName: keyof StyleProps)
|
|
294
|
+
removeAttribute: (attributeName: keyof StyleProps) => void;
|
|
295
295
|
}
|
|
296
296
|
export interface IDocument extends INode, IParentNode {
|
|
297
297
|
/**
|
|
@@ -307,18 +307,18 @@ export interface IDocument extends INode, IParentNode {
|
|
|
307
307
|
/**
|
|
308
308
|
* Creates an instance of the element for the specified tag.
|
|
309
309
|
*/
|
|
310
|
-
createElement<T extends DisplayObject<StyleProps>, StyleProps extends BaseStyleProps>(tagName: string, options: DisplayObjectConfig<StyleProps>)
|
|
310
|
+
createElement: <T extends DisplayObject<StyleProps>, StyleProps extends BaseStyleProps>(tagName: string, options: DisplayObjectConfig<StyleProps>) => T;
|
|
311
311
|
}
|
|
312
312
|
export interface ICanvas extends IEventTarget {
|
|
313
313
|
document: IDocument;
|
|
314
314
|
customElements: CustomElementRegistry;
|
|
315
|
-
render()
|
|
316
|
-
destroy(destroyScenegraph?: boolean)
|
|
317
|
-
resize(width: number, height: number)
|
|
318
|
-
getCamera()
|
|
319
|
-
getContextService()
|
|
320
|
-
client2Viewport(client: PointLike)
|
|
321
|
-
viewport2Client(viewport: PointLike)
|
|
322
|
-
canvas2Viewport(canvas: PointLike)
|
|
323
|
-
viewport2Canvas(viewport: PointLike)
|
|
315
|
+
render: () => void;
|
|
316
|
+
destroy: (destroyScenegraph?: boolean) => void;
|
|
317
|
+
resize: (width: number, height: number) => void;
|
|
318
|
+
getCamera: () => Camera;
|
|
319
|
+
getContextService: () => ContextService<unknown>;
|
|
320
|
+
client2Viewport: (client: PointLike) => PointLike;
|
|
321
|
+
viewport2Client: (viewport: PointLike) => PointLike;
|
|
322
|
+
canvas2Viewport: (canvas: PointLike) => PointLike;
|
|
323
|
+
viewport2Canvas: (viewport: PointLike) => PointLike;
|
|
324
324
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Syringe } from 'mana-syringe';
|
|
2
|
-
import { DisplayObject } from '../display-objects/DisplayObject';
|
|
3
|
-
import { RenderingService, RenderingPlugin } from '../services/RenderingService';
|
|
2
|
+
import type { DisplayObject } from '../display-objects/DisplayObject';
|
|
3
|
+
import type { RenderingService, RenderingPlugin } from '../services/RenderingService';
|
|
4
4
|
export declare const CullingStrategyContribution: Syringe.DefinedToken;
|
|
5
5
|
export interface CullingStrategyContribution {
|
|
6
|
-
isVisible(object: DisplayObject)
|
|
6
|
+
isVisible: (object: DisplayObject) => boolean;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* apply following rules:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RenderingService, RenderingPlugin } from '../services/RenderingService';
|
|
1
|
+
import type { RenderingService, RenderingPlugin } from '../services/RenderingService';
|
|
2
2
|
/**
|
|
3
3
|
* Filter dirty renderables and calculate the "dirty rectangle" which will be clear when frame began
|
|
4
4
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { RenderingPlugin
|
|
1
|
+
import type { RenderingPlugin } from '../services';
|
|
2
|
+
import { RenderingService } from '../services';
|
|
2
3
|
/**
|
|
3
4
|
* support mouse & touch events
|
|
4
5
|
* @see https://github.com/pixijs/pixi.js/blob/dev/packages/interaction/README.md
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { CullingStrategyContribution } from './CullingPlugin';
|
|
2
|
-
import { DisplayObject } from '../display-objects/DisplayObject';
|
|
2
|
+
import type { DisplayObject } from '../display-objects/DisplayObject';
|
|
3
3
|
export declare class FrustumCullingStrategy implements CullingStrategyContribution {
|
|
4
|
-
private camera;
|
|
5
4
|
isVisible(object: DisplayObject): boolean;
|
|
6
5
|
/**
|
|
7
6
|
*
|
|
@@ -1,40 +1,39 @@
|
|
|
1
|
-
import { __decorate
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { vec3 } from 'gl-matrix';
|
|
3
|
+
import { singleton } from 'mana-syringe';
|
|
4
4
|
import { CullingStrategyContribution } from './CullingPlugin';
|
|
5
|
-
import { Mask } from '../shapes';
|
|
6
|
-
import { DefaultCamera, Camera } from '../camera/Camera';
|
|
5
|
+
import { Mask } from '../shapes'; // import type { Element } from '../dom';
|
|
7
6
|
|
|
8
7
|
var FrustumCullingStrategy =
|
|
9
8
|
/** @class */
|
|
10
9
|
function () {
|
|
11
|
-
function FrustumCullingStrategy() {}
|
|
10
|
+
function FrustumCullingStrategy() {} // @inject(DefaultCamera)
|
|
11
|
+
// private camera: Camera;
|
|
12
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
12
13
|
|
|
13
|
-
FrustumCullingStrategy.prototype.isVisible = function (object) {
|
|
14
|
-
var _a, _b;
|
|
15
|
-
|
|
16
|
-
var entity = object.entity;
|
|
17
|
-
var cullable = object.cullable;
|
|
18
|
-
return true;
|
|
19
|
-
|
|
20
|
-
if (!cullable.enable) {
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
var renderBounds = object.getRenderBounds();
|
|
25
14
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
15
|
+
FrustumCullingStrategy.prototype.isVisible = function (object) {
|
|
16
|
+
return true; // const entity = object.entity;
|
|
17
|
+
// const cullable = object.cullable;
|
|
18
|
+
// if (!cullable.enable) {
|
|
19
|
+
// return true;
|
|
20
|
+
// }
|
|
21
|
+
// const renderBounds = object.getRenderBounds();
|
|
22
|
+
// if (!renderBounds) {
|
|
23
|
+
// return false;
|
|
24
|
+
// }
|
|
25
|
+
// const viewMatrix = this.camera.getViewTransform();
|
|
26
|
+
// const vpMatrix = mat4.multiply(mat4.create(), this.camera.getPerspective(), viewMatrix);
|
|
27
|
+
// // get VP matrix from camera
|
|
28
|
+
// this.camera.getFrustum().extractFromVPMatrix(vpMatrix);
|
|
29
|
+
// const parentVisibilityPlaneMask = (object.parentNode as Element)?.cullable?.visibilityPlaneMask;
|
|
30
|
+
// cullable.visibilityPlaneMask = this.computeVisibilityWithPlaneMask(
|
|
31
|
+
// renderBounds,
|
|
32
|
+
// parentVisibilityPlaneMask || Mask.INDETERMINATE,
|
|
33
|
+
// this.camera.getFrustum().planes,
|
|
34
|
+
// );
|
|
35
|
+
// cullable.visible = cullable.visibilityPlaneMask !== Mask.OUTSIDE;
|
|
36
|
+
// return cullable.visible;
|
|
38
37
|
};
|
|
39
38
|
/**
|
|
40
39
|
*
|
|
@@ -90,8 +89,6 @@ function () {
|
|
|
90
89
|
return mask;
|
|
91
90
|
};
|
|
92
91
|
|
|
93
|
-
__decorate([inject(DefaultCamera), __metadata("design:type", Camera)], FrustumCullingStrategy.prototype, "camera", void 0);
|
|
94
|
-
|
|
95
92
|
FrustumCullingStrategy = __decorate([singleton({
|
|
96
93
|
contrib: CullingStrategyContribution
|
|
97
94
|
})], FrustumCullingStrategy);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RenderingService, RenderingPlugin } from '../services/RenderingService';
|
|
1
|
+
import type { RenderingService, RenderingPlugin } from '../services/RenderingService';
|
|
2
2
|
export declare class PrepareRendererPlugin implements RenderingPlugin {
|
|
3
3
|
static tag: string;
|
|
4
4
|
private renderingContext;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
2
|
import { inject, singleton } from 'mana-syringe';
|
|
3
3
|
import { ElementEvent } from '../dom';
|
|
4
|
-
import { RenderingContext, RENDER_REASON, RenderingPluginContribution } from '../services';
|
|
4
|
+
import { RenderingContext, RENDER_REASON, RenderingPluginContribution, dirtifyToRoot } from '../services';
|
|
5
5
|
|
|
6
6
|
var PrepareRendererPlugin =
|
|
7
7
|
/** @class */
|
|
@@ -13,35 +13,22 @@ function () {
|
|
|
13
13
|
PrepareRendererPlugin.prototype.apply = function (renderingService) {
|
|
14
14
|
var _this = this;
|
|
15
15
|
|
|
16
|
-
var handleAttributeChanged = function handleAttributeChanged(
|
|
16
|
+
var handleAttributeChanged = function handleAttributeChanged() {
|
|
17
17
|
_this.renderingContext.renderReasons.add(RENDER_REASON.DisplayObjectChanged);
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
var
|
|
21
|
-
// skip Document & Canvas
|
|
22
|
-
var path = e.composedPath().slice(0, -2);
|
|
23
|
-
path.forEach(function (node) {
|
|
24
|
-
var renderable = node.renderable;
|
|
25
|
-
|
|
26
|
-
if (renderable) {
|
|
27
|
-
renderable.renderBoundsDirty = true;
|
|
28
|
-
renderable.boundsDirty = true;
|
|
29
|
-
renderable.dirty = true;
|
|
30
|
-
}
|
|
31
|
-
});
|
|
20
|
+
var handleBoundsChanged = function handleBoundsChanged() {
|
|
32
21
|
renderingService.dirtify();
|
|
33
22
|
};
|
|
34
23
|
|
|
35
|
-
var handleBoundsChanged = function handleBoundsChanged(e) {
|
|
36
|
-
dirtifyToRoot(e);
|
|
37
|
-
};
|
|
38
|
-
|
|
39
24
|
var handleMounted = function handleMounted(e) {
|
|
40
|
-
dirtifyToRoot(e);
|
|
25
|
+
dirtifyToRoot(e.target);
|
|
26
|
+
renderingService.dirtify();
|
|
41
27
|
};
|
|
42
28
|
|
|
43
29
|
var handleUnmounted = function handleUnmounted(e) {
|
|
44
|
-
dirtifyToRoot(e);
|
|
30
|
+
dirtifyToRoot(e.target);
|
|
31
|
+
renderingService.dirtify();
|
|
45
32
|
};
|
|
46
33
|
|
|
47
34
|
renderingService.hooks.init.tap(PrepareRendererPlugin_1.tag, function () {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { vec3 } from 'gl-matrix';
|
|
2
2
|
import { AABB } from '../shapes';
|
|
3
|
-
import { GeometryUpdaterFactory } from '../services';
|
|
3
|
+
import { dirtifyToRoot, GeometryUpdaterFactory } from '../services';
|
|
4
4
|
import { SHAPE } from '../types';
|
|
5
5
|
import { PARSED_COLOR_TYPE } from './color';
|
|
6
6
|
import { globalContainer } from '../global-module';
|
|
7
|
-
import { ElementEvent } from '../dom';
|
|
8
7
|
export function updateGeometry(oldValue, newValue, object) {
|
|
9
8
|
var geometryUpdaterFactory = globalContainer.get(GeometryUpdaterFactory);
|
|
10
9
|
var geometryUpdater = geometryUpdaterFactory(object.nodeName);
|
|
@@ -59,13 +58,11 @@ export function updateGeometry(oldValue, newValue, object) {
|
|
|
59
58
|
var _h = object.parsedStyle,
|
|
60
59
|
_j = _h.lineWidth,
|
|
61
60
|
lineWidth = _j === void 0 ? 0 : _j,
|
|
62
|
-
_k = _h.
|
|
63
|
-
|
|
64
|
-
_l = _h.anchor,
|
|
65
|
-
anchor = _l === void 0 ? [0, 0] : _l,
|
|
61
|
+
_k = _h.anchor,
|
|
62
|
+
anchor = _k === void 0 ? [0, 0] : _k,
|
|
66
63
|
shadowColor = _h.shadowColor,
|
|
67
|
-
|
|
68
|
-
filter =
|
|
64
|
+
_l = _h.filter,
|
|
65
|
+
filter = _l === void 0 ? [] : _l; // <Text> use textAlign & textBaseline instead of anchor
|
|
69
66
|
|
|
70
67
|
if (object.nodeName === SHAPE.Text) {
|
|
71
68
|
delete object.parsedStyle.anchor;
|
|
@@ -83,16 +80,16 @@ export function updateGeometry(oldValue, newValue, object) {
|
|
|
83
80
|
geometry_1.renderBounds.update(center, halfExtents); // account for shadow, only support constant value now
|
|
84
81
|
|
|
85
82
|
if (shadowColor && shadowColor.type === PARSED_COLOR_TYPE.Constant) {
|
|
86
|
-
var
|
|
87
|
-
min =
|
|
88
|
-
max =
|
|
89
|
-
var
|
|
90
|
-
|
|
91
|
-
shadowBlur =
|
|
92
|
-
|
|
93
|
-
shadowOffsetX =
|
|
94
|
-
|
|
95
|
-
shadowOffsetY =
|
|
83
|
+
var _m = geometry_1.renderBounds,
|
|
84
|
+
min = _m.min,
|
|
85
|
+
max = _m.max;
|
|
86
|
+
var _o = object.parsedStyle,
|
|
87
|
+
_p = _o.shadowBlur,
|
|
88
|
+
shadowBlur = _p === void 0 ? 0 : _p,
|
|
89
|
+
_q = _o.shadowOffsetX,
|
|
90
|
+
shadowOffsetX = _q === void 0 ? 0 : _q,
|
|
91
|
+
_r = _o.shadowOffsetY,
|
|
92
|
+
shadowOffsetY = _r === void 0 ? 0 : _r;
|
|
96
93
|
var shadowLeft = min[0] - shadowBlur + shadowOffsetX;
|
|
97
94
|
var shadowRight = max[0] + shadowBlur + shadowOffsetX;
|
|
98
95
|
var shadowTop = min[1] - shadowBlur + shadowOffsetY;
|
|
@@ -130,6 +127,6 @@ export function updateGeometry(oldValue, newValue, object) {
|
|
|
130
127
|
geometry_1.renderBounds.setMinMax(min, max);
|
|
131
128
|
}
|
|
132
129
|
});
|
|
133
|
-
object
|
|
130
|
+
dirtifyToRoot(object);
|
|
134
131
|
}
|
|
135
132
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { vec2
|
|
1
|
+
import type { vec2 } from 'gl-matrix';
|
|
2
|
+
import { vec3 } from 'gl-matrix';
|
|
2
3
|
import type { DisplayObject } from '../display-objects/DisplayObject';
|
|
3
4
|
export declare function updateAnchor(oldValue: vec2 | vec3, newValue: vec2 | vec3, object: DisplayObject): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __read, __spreadArray } from "tslib";
|
|
2
2
|
import { vec3 } from 'gl-matrix';
|
|
3
|
-
import {
|
|
3
|
+
import { dirtifyToRoot } from '../services';
|
|
4
4
|
import { createVec3 } from '../utils';
|
|
5
5
|
export function updateAnchor(oldValue, newValue, object) {
|
|
6
6
|
var bounds = object.getGeometryBounds();
|
|
@@ -14,7 +14,7 @@ export function updateAnchor(oldValue, newValue, object) {
|
|
|
14
14
|
})), false)), vec3.subtract(vec3.create(), createVec3(newValue || vec3.create()), createVec3(oldValue || vec3.create())));
|
|
15
15
|
geometry.contentBounds.update(vec3.subtract(geometry.contentBounds.center, geometry.contentBounds.center, offset), geometry.contentBounds.halfExtents);
|
|
16
16
|
geometry.renderBounds.update(vec3.subtract(geometry.renderBounds.center, geometry.renderBounds.center, offset), geometry.renderBounds.halfExtents);
|
|
17
|
-
object
|
|
17
|
+
dirtifyToRoot(object);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dirtifyToRoot } from '../services';
|
|
2
2
|
/**
|
|
3
3
|
* @see /zh/docs/api/basic/display-object#clippath
|
|
4
4
|
* @example
|
|
@@ -32,5 +32,5 @@ export function updateClipPath(oldClipPath, newClipPath, object) {
|
|
|
32
32
|
newClipPath.style.clipPathTargets.push(object);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
object
|
|
35
|
+
dirtifyToRoot(object);
|
|
36
36
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { DisplayObject } from '../display-objects/DisplayObject';
|
|
2
1
|
import type { Tuple4Number } from '../types';
|
|
3
|
-
import { ParsedStyleProperty } from '.';
|
|
2
|
+
import type { ParsedStyleProperty } from '.';
|
|
4
3
|
export interface LinearGradient {
|
|
5
4
|
x0: number;
|
|
6
5
|
y0: number;
|
|
@@ -31,5 +30,5 @@ export declare enum PARSED_COLOR_TYPE {
|
|
|
31
30
|
Pattern = 3
|
|
32
31
|
}
|
|
33
32
|
export declare type ParsedColorStyleProperty = ParsedStyleProperty<PARSED_COLOR_TYPE.Constant, Tuple4Number> | ParsedStyleProperty<PARSED_COLOR_TYPE.LinearGradient, LinearGradient> | ParsedStyleProperty<PARSED_COLOR_TYPE.RadialGradient, RadialGradient> | ParsedStyleProperty<PARSED_COLOR_TYPE.Pattern, Pattern>;
|
|
34
|
-
export declare function parseColor(colorStr
|
|
35
|
-
export declare function mergeColors(left: ParsedColorStyleProperty, right: ParsedColorStyleProperty
|
|
33
|
+
export declare function parseColor(colorStr?: string): ParsedColorStyleProperty;
|
|
34
|
+
export declare function mergeColors(left: ParsedColorStyleProperty, right: ParsedColorStyleProperty): [number[], number[], (color: number[]) => string] | undefined;
|
|
@@ -14,7 +14,7 @@ var regexLG = /^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i;
|
|
|
14
14
|
var regexRG = /^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i;
|
|
15
15
|
var regexPR = /^p\s*\(\s*([axyn])\s*\)\s*(.*)/i;
|
|
16
16
|
var regexColorStop = /[\d.]+:(#[^\s]+|[^\)]+\))/gi;
|
|
17
|
-
export function parseColor(colorStr
|
|
17
|
+
export function parseColor(colorStr) {
|
|
18
18
|
if (colorStr === void 0) {
|
|
19
19
|
colorStr = '';
|
|
20
20
|
}
|
|
@@ -84,7 +84,7 @@ export function parseColor(colorStr, displayObject) {
|
|
|
84
84
|
formatted: color && "rgba(" + color.r + "," + color.g + "," + color.b + "," + color.opacity + ")" || 'rgba(0,0,0,0)'
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
|
-
export function mergeColors(left, right
|
|
87
|
+
export function mergeColors(left, right) {
|
|
88
88
|
// only support constant value, exclude gradient & pattern
|
|
89
89
|
if (left.type !== PARSED_COLOR_TYPE.Constant || right.type !== PARSED_COLOR_TYPE.Constant) {
|
|
90
90
|
return;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
3
|
-
import { ParsedElement } from './dimension';
|
|
1
|
+
import type { ParsedColorStyleProperty } from './color';
|
|
2
|
+
import type { ParsedElement } from './dimension';
|
|
4
3
|
export interface ParsedFilterStyleProperty {
|
|
5
4
|
name: string;
|
|
6
5
|
params: (ParsedElement | ParsedColorStyleProperty)[];
|
|
7
6
|
}
|
|
8
7
|
export declare const parseParam: any;
|
|
9
|
-
export declare function parseFilter(filterStr
|
|
8
|
+
export declare function parseFilter(filterStr?: string): ParsedFilterStyleProperty[];
|
|
@@ -2,7 +2,7 @@ import { parseColor } from './color';
|
|
|
2
2
|
import { parseDimension } from './dimension';
|
|
3
3
|
export var parseParam = parseDimension.bind(null, /deg|rad|grad|turn|px|%/g);
|
|
4
4
|
var supportedFilters = ['blur', 'brightness', 'drop-shadow', 'contrast', 'grayscale', 'sepia', 'saturate', 'hue-rotate', 'invert'];
|
|
5
|
-
export function parseFilter(filterStr
|
|
5
|
+
export function parseFilter(filterStr) {
|
|
6
6
|
if (filterStr === void 0) {
|
|
7
7
|
filterStr = '';
|
|
8
8
|
}
|
|
@@ -29,7 +29,7 @@ export function parseFilter(filterStr, displayObject) {
|
|
|
29
29
|
result.push({
|
|
30
30
|
name: match[1],
|
|
31
31
|
params: match[2].split(' ').map(function (p) {
|
|
32
|
-
return parseParam(p) || parseColor(p
|
|
32
|
+
return parseParam(p) || parseColor(p);
|
|
33
33
|
})
|
|
34
34
|
});
|
|
35
35
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IElement } from '../dom/interfaces';
|
|
2
|
-
import { SceneGraphService } from '../services/SceneGraphService';
|
|
2
|
+
import type { SceneGraphService } from '../services/SceneGraphService';
|
|
3
3
|
export declare const StylePropertyParser = "StylePropertyParser";
|
|
4
4
|
export declare type StylePropertyParser<Original, Parsed> = (value: Original, displayObject: IElement | null) => Parsed;
|
|
5
5
|
export declare const StylePropertyParserFactory = "StylePropertyParserFactory";
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function parseLineDash(lineDash: number[], displayObject: DisplayObject | null): number[];
|
|
1
|
+
export declare function parseLineDash(lineDash: number[]): number[];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { DisplayObject } from '../display-objects/DisplayObject';
|
|
2
1
|
import type { PathCommand } from '../types';
|
|
3
2
|
import type { ParsedPathStyleProps } from '../display-objects';
|
|
4
|
-
export declare function parsePath(path: string
|
|
5
|
-
export declare function mergePaths(left: ParsedPathStyleProps, right: ParsedPathStyleProps
|
|
3
|
+
export declare function parsePath(path: string): ParsedPathStyleProps;
|
|
4
|
+
export declare function mergePaths(left: ParsedPathStyleProps, right: ParsedPathStyleProps): ((string[] | ["a" | "A", number, number, number, number, number, number, number] | ["C" | "c", number, number, number, number, number, number] | ["o" | "O", number, number] | ["h" | "H", number] | ["l" | "L", number, number] | ["M" | "m", number, number] | ["r" | "R", number, number, number, number] | ["q" | "Q", number, number, number, number] | ["s" | "S", number, number, number, number, number, number, number] | ["t" | "T", number, number] | ["v" | "V", number] | ["u" | "U", number, number, number])[] | ((pathArray: PathCommand[]) => PathCommand[]))[];
|
|
@@ -3,7 +3,7 @@ import { path2Absolute, path2Segments, path2Curve } from '@antv/path-util';
|
|
|
3
3
|
import { Cubic as CubicUtil } from '@antv/g-math';
|
|
4
4
|
import { clonePath, equalizeSegments, getDrawDirection, getRotatedCurve, reverseCurve } from '../utils/path';
|
|
5
5
|
import { Rect } from '../shapes/Rect';
|
|
6
|
-
export function parsePath(path
|
|
6
|
+
export function parsePath(path) {
|
|
7
7
|
var absolutePath = path2Absolute(path);
|
|
8
8
|
var hasArc = hasArcOrBezier(absolutePath);
|
|
9
9
|
var clonedAbsolutePath = absolutePath.slice();
|
|
@@ -183,7 +183,7 @@ function getPathBBox(segments) {
|
|
|
183
183
|
return new Rect(xTop, yTop, width, height);
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
export function mergePaths(left, right
|
|
186
|
+
export function mergePaths(left, right) {
|
|
187
187
|
var curve1 = left.curve;
|
|
188
188
|
var curve2 = right.curve;
|
|
189
189
|
var curves = [curve1, curve2];
|