@wcardinal/wcardinal-ui 0.148.0 → 0.150.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/dist/types/wcardinal/ui/d-view.d.ts +4 -4
- package/dist/types/wcardinal/ui/shape/e-shape-connector-bodies.d.ts +3 -0
- package/dist/types/wcardinal/ui/shape/e-shape-connector-body-impl.d.ts +24 -0
- package/dist/types/wcardinal/ui/shape/e-shape-connector-body.d.ts +14 -0
- package/dist/types/wcardinal/ui/shape/e-shape-connector-edge-container.d.ts +3 -0
- package/dist/types/wcardinal/ui/shape/index.d.ts +3 -0
- package/dist/types/wcardinal/ui/shape/variant/e-shape-connector-line.d.ts +9 -2
- package/dist/wcardinal/ui/d-view.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-bodies.js +57 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-bodies.js.map +1 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-body-impl.js +88 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-body-impl.js.map +1 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-body.js +6 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-body.js.map +1 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-container.js.map +1 -1
- package/dist/wcardinal/ui/shape/index.js +3 -0
- package/dist/wcardinal/ui/shape/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js +21 -2
- package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js +106 -81
- package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +1 -1
- package/dist/wcardinal-ui-theme-dark.min.js +1 -1
- package/dist/wcardinal-ui-theme-white.js +1 -1
- package/dist/wcardinal-ui-theme-white.min.js +1 -1
- package/dist/wcardinal-ui.cjs.js +271 -84
- package/dist/wcardinal-ui.js +271 -84
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -73,7 +73,7 @@ export interface DViewTranslationWheelOptions {
|
|
|
73
73
|
* {@link DView} translation options.
|
|
74
74
|
*/
|
|
75
75
|
export interface DViewTranslationOptions {
|
|
76
|
-
/** Wheel
|
|
76
|
+
/** Wheel translation options */
|
|
77
77
|
wheel?: DViewTranslationWheelOptions;
|
|
78
78
|
}
|
|
79
79
|
/**
|
|
@@ -144,7 +144,7 @@ export interface DView {
|
|
|
144
144
|
*/
|
|
145
145
|
zoomOut(duration?: number, stop?: boolean): void;
|
|
146
146
|
/**
|
|
147
|
-
* Zooms into the
|
|
147
|
+
* Zooms into the given position.
|
|
148
148
|
*
|
|
149
149
|
* @param x a local X coordinate position
|
|
150
150
|
* @param y a local Y coordinate position
|
|
@@ -175,7 +175,7 @@ export interface DView {
|
|
|
175
175
|
*/
|
|
176
176
|
zoom(scaleX: number, scaleY: number, duration?: number, stop?: boolean): void;
|
|
177
177
|
/**
|
|
178
|
-
* Moves to the
|
|
178
|
+
* Moves to the given position.
|
|
179
179
|
*
|
|
180
180
|
* @param x a local X coordinate position
|
|
181
181
|
* @param y a local Y coordinate position
|
|
@@ -186,7 +186,7 @@ export interface DView {
|
|
|
186
186
|
/**
|
|
187
187
|
* Sets to the specified position and scale.
|
|
188
188
|
*
|
|
189
|
-
* @param x a local X coordinate
|
|
189
|
+
* @param x a local X coordinate position
|
|
190
190
|
* @param y a local Y coordinate position
|
|
191
191
|
* @param scaleX a X coordinate scale
|
|
192
192
|
* @param scaleY a Y coordinate scale
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { EShapeConnector } from "./e-shape-connector";
|
|
2
|
+
import { EShapeConnectorBody } from "./e-shape-connector-body";
|
|
3
|
+
import { EShapeResourceManagerDeserialization } from "./e-shape-resource-manager-deserialization";
|
|
4
|
+
import { EShapeResourceManagerSerialization } from "./e-shape-resource-manager-serialization";
|
|
5
|
+
import { EShapeUuidMapping } from "./e-shape-uuid-mapping";
|
|
6
|
+
export declare class EShapeConnectorBodyImpl implements EShapeConnectorBody {
|
|
7
|
+
protected _parent: EShapeConnector;
|
|
8
|
+
protected _id: number;
|
|
9
|
+
protected _values: number[];
|
|
10
|
+
protected _lockCount: number;
|
|
11
|
+
protected _isChanged: boolean;
|
|
12
|
+
protected _onChange: () => void;
|
|
13
|
+
constructor(parent: EShapeConnector, onChange: () => void);
|
|
14
|
+
lock(): void;
|
|
15
|
+
unlock(): void;
|
|
16
|
+
get id(): number;
|
|
17
|
+
get values(): number[];
|
|
18
|
+
set values(newValues: number[]);
|
|
19
|
+
set(newValues?: number[]): this;
|
|
20
|
+
copy(source: EShapeConnectorBody): this;
|
|
21
|
+
serialize(manager: EShapeResourceManagerSerialization): number;
|
|
22
|
+
deserialize(resourceId: number, mapping: EShapeUuidMapping, manager: EShapeResourceManagerDeserialization): void;
|
|
23
|
+
protected onChange(): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EShapeResourceManagerDeserialization } from "./e-shape-resource-manager-deserialization";
|
|
2
|
+
import { EShapeResourceManagerSerialization } from "./e-shape-resource-manager-serialization";
|
|
3
|
+
import { EShapeUuidMapping } from "./e-shape-uuid-mapping";
|
|
4
|
+
export declare type EShapeConnectorBodySerialized = number[];
|
|
5
|
+
export interface EShapeConnectorBody {
|
|
6
|
+
readonly id: number;
|
|
7
|
+
values: number[];
|
|
8
|
+
lock(): void;
|
|
9
|
+
unlock(): void;
|
|
10
|
+
set(values?: number[]): this;
|
|
11
|
+
copy(source: EShapeConnectorBody): this;
|
|
12
|
+
serialize(manager: EShapeResourceManagerSerialization): number;
|
|
13
|
+
deserialize(resourceId: number, mapping: EShapeUuidMapping, manager: EShapeResourceManagerDeserialization): void;
|
|
14
|
+
}
|
|
@@ -2,9 +2,12 @@ import { EShapeConnectorEdge } from "./e-shape-connector-edge";
|
|
|
2
2
|
import { EShapeResourceManagerDeserialization } from "./e-shape-resource-manager-deserialization";
|
|
3
3
|
import { EShapeResourceManagerSerialization } from "./e-shape-resource-manager-serialization";
|
|
4
4
|
import { EShapeUuidMapping } from "./e-shape-uuid-mapping";
|
|
5
|
+
export declare type EShapeConnectorEdgeContainerSerialized = [number, number];
|
|
5
6
|
export interface EShapeConnectorEdgeContainer {
|
|
6
7
|
tail: EShapeConnectorEdge;
|
|
7
8
|
head: EShapeConnectorEdge;
|
|
9
|
+
lock(): void;
|
|
10
|
+
unlock(): void;
|
|
8
11
|
copy(source: EShapeConnectorEdgeContainer): this;
|
|
9
12
|
fit(forcibly?: boolean): this;
|
|
10
13
|
serialize(manager: EShapeResourceManagerSerialization): number;
|
|
@@ -10,6 +10,9 @@ export * from "./e-shape-buffer-unit";
|
|
|
10
10
|
export * from "./e-shape-buffer";
|
|
11
11
|
export * from "./e-shape-capabilities";
|
|
12
12
|
export * from "./e-shape-capability";
|
|
13
|
+
export * from "./e-shape-connector-bodies";
|
|
14
|
+
export * from "./e-shape-connector-body-impl";
|
|
15
|
+
export * from "./e-shape-connector-body";
|
|
13
16
|
export * from "./e-shape-connector-container-impl";
|
|
14
17
|
export * from "./e-shape-connector-container";
|
|
15
18
|
export * from "./e-shape-connector-edge-acceptor-impl";
|
|
@@ -7,21 +7,28 @@ import { EShapeCopyPart } from "../e-shape-copy-part";
|
|
|
7
7
|
import { DDiagramSerializedItem } from "../../d-diagram-serialized";
|
|
8
8
|
import { EShapeResourceManagerSerialization } from "../e-shape-resource-manager-serialization";
|
|
9
9
|
import { EShape } from "../e-shape";
|
|
10
|
+
import { EShapeConnectorBody } from "../e-shape-connector-body";
|
|
10
11
|
export declare class EShapeConnectorLine extends EShapeLineBase implements EShapeConnector {
|
|
11
12
|
protected static WORK_BOUNDARY: [number, number, number, number];
|
|
12
13
|
protected _edge: EShapeConnectorEdgeContainer;
|
|
14
|
+
protected _body: EShapeConnectorBody;
|
|
13
15
|
protected _points: EShapeLinePoints;
|
|
14
16
|
protected _tailLocalId: number;
|
|
15
17
|
protected _tailMargin: number;
|
|
16
18
|
protected _headLocalId: number;
|
|
17
19
|
protected _headMargin: number;
|
|
20
|
+
protected _bodyId: number;
|
|
21
|
+
protected _lockCount: number;
|
|
22
|
+
protected _isChanged: boolean;
|
|
18
23
|
constructor(type?: EShapeType);
|
|
24
|
+
lock(): void;
|
|
25
|
+
unlock(): void;
|
|
19
26
|
get points(): EShapeLinePoints;
|
|
20
27
|
get edge(): EShapeConnectorEdgeContainer;
|
|
28
|
+
get body(): EShapeConnectorBody;
|
|
21
29
|
onAttach(): void;
|
|
22
30
|
onDetach(): void;
|
|
23
|
-
protected
|
|
24
|
-
protected toValues(x0: number, y0: number, x1: number, y1: number, margin0: number, margin1: number, result: number[]): number[];
|
|
31
|
+
protected onChange(): void;
|
|
25
32
|
copy(source: EShape, part?: EShapeCopyPart): this;
|
|
26
33
|
clone(): EShapeConnectorLine;
|
|
27
34
|
serialize(manager: EShapeResourceManagerSerialization): DDiagramSerializedItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-view.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-view.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { IPoint } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { UtilGestureModifier } from \"./util/util-gesture-modifier\";\nimport { DThemeViewGesture, DViewGesture, DViewGestureOptions } from \"./d-view-gesture\";\nimport { DViewTargetPoint } from \"./d-view-to-target\";\n\nexport type DViewChecker = (\n\te: WheelEvent | MouseEvent | TouchEvent,\n\tmodifier: UtilGestureModifier,\n\ttarget: DBase\n) => boolean;\n\n/**\n * {@link DView} wheel zoom options.\n */\nexport interface DViewZoomWheelOptions {\n\t/** True to enable wheel zoom */\n\tenable?: boolean;\n\n\t/** Zoom speed */\n\tspeed?: number;\n\n\t/** Mouse modifiers */\n\tmodifier?: keyof typeof UtilGestureModifier | UtilGestureModifier;\n\n\t/**\n\t * Wheel zoom checker.\n\t * If a checker returns false, wheel zooms will be canceled.\n\t */\n\tchecker?: DViewChecker;\n}\n\n/**\n * {@link DView} double-click zoom options.\n */\nexport interface DViewZoomDblClickOptions {\n\t/** True to enable double click zoom */\n\tenable?: boolean;\n\n\t/** Zoom amount */\n\tamount?: number;\n\n\t/** Mouse modifiers */\n\tmodifier?: keyof typeof UtilGestureModifier | UtilGestureModifier;\n\n\t/**\n\t * Double click zoom checker.\n\t * If a checker returns false, double click zooms will be canceled.\n\t */\n\tchecker?: DViewChecker;\n\n\t/** Zoom duration */\n\tduration?: number;\n}\n\n/**\n * {@link DView} zoom options.\n */\nexport interface DViewZoomOptions {\n\t/** Minimum scale */\n\tmin?: number;\n\n\t/** Maximum scale */\n\tmax?: number;\n\n\t/** True to keep size ratio */\n\tkeepRatio?: boolean;\n\n\t/** Wheel zoom options */\n\twheel?: DViewZoomWheelOptions;\n\n\t/** Double click zoom options */\n\tdblclick?: DViewZoomDblClickOptions;\n}\n\n/**\n * {@link DView} wheel translation options.\n */\nexport interface DViewTranslationWheelOptions {\n\t/** True to enable wheel translation */\n\tenable?: boolean;\n\n\t/** Translation speed */\n\tspeed?: number;\n\n\t/** Mouse modifiers */\n\tmodifier?: keyof typeof UtilGestureModifier | UtilGestureModifier;\n\n\t/**\n\t * Wheel translation checker.\n\t * If a checker returns false, wheel translations will be canceled.\n\t */\n\tchecker?: DViewChecker;\n}\n\n/**\n * {@link DView} translation options.\n */\nexport interface DViewTranslationOptions {\n\t/** Wheel
|
|
1
|
+
{"version":3,"file":"d-view.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-view.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { IPoint } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { UtilGestureModifier } from \"./util/util-gesture-modifier\";\nimport { DThemeViewGesture, DViewGesture, DViewGestureOptions } from \"./d-view-gesture\";\nimport { DViewTargetPoint } from \"./d-view-to-target\";\n\nexport type DViewChecker = (\n\te: WheelEvent | MouseEvent | TouchEvent,\n\tmodifier: UtilGestureModifier,\n\ttarget: DBase\n) => boolean;\n\n/**\n * {@link DView} wheel zoom options.\n */\nexport interface DViewZoomWheelOptions {\n\t/** True to enable wheel zoom */\n\tenable?: boolean;\n\n\t/** Zoom speed */\n\tspeed?: number;\n\n\t/** Mouse modifiers */\n\tmodifier?: keyof typeof UtilGestureModifier | UtilGestureModifier;\n\n\t/**\n\t * Wheel zoom checker.\n\t * If a checker returns false, wheel zooms will be canceled.\n\t */\n\tchecker?: DViewChecker;\n}\n\n/**\n * {@link DView} double-click zoom options.\n */\nexport interface DViewZoomDblClickOptions {\n\t/** True to enable double click zoom */\n\tenable?: boolean;\n\n\t/** Zoom amount */\n\tamount?: number;\n\n\t/** Mouse modifiers */\n\tmodifier?: keyof typeof UtilGestureModifier | UtilGestureModifier;\n\n\t/**\n\t * Double click zoom checker.\n\t * If a checker returns false, double click zooms will be canceled.\n\t */\n\tchecker?: DViewChecker;\n\n\t/** Zoom duration */\n\tduration?: number;\n}\n\n/**\n * {@link DView} zoom options.\n */\nexport interface DViewZoomOptions {\n\t/** Minimum scale */\n\tmin?: number;\n\n\t/** Maximum scale */\n\tmax?: number;\n\n\t/** True to keep size ratio */\n\tkeepRatio?: boolean;\n\n\t/** Wheel zoom options */\n\twheel?: DViewZoomWheelOptions;\n\n\t/** Double click zoom options */\n\tdblclick?: DViewZoomDblClickOptions;\n}\n\n/**\n * {@link DView} wheel translation options.\n */\nexport interface DViewTranslationWheelOptions {\n\t/** True to enable wheel translation */\n\tenable?: boolean;\n\n\t/** Translation speed */\n\tspeed?: number;\n\n\t/** Mouse modifiers */\n\tmodifier?: keyof typeof UtilGestureModifier | UtilGestureModifier;\n\n\t/**\n\t * Wheel translation checker.\n\t * If a checker returns false, wheel translations will be canceled.\n\t */\n\tchecker?: DViewChecker;\n}\n\n/**\n * {@link DView} translation options.\n */\nexport interface DViewTranslationOptions {\n\t/** Wheel translation options */\n\twheel?: DViewTranslationWheelOptions;\n}\n\n/**\n * {@link DView} options.\n */\nexport interface DViewOptions {\n\t/** Gesture options */\n\tgesture?: DViewGestureOptions;\n\n\t/** Zoom options */\n\tzoom?: DViewZoomOptions;\n\n\t/** Translation options */\n\ttranslation?: DViewTranslationOptions;\n\n\t/** Theme */\n\ttheme?: DThemeView | string;\n}\n\n/**\n * {@link DView} theme.\n */\nexport interface DThemeView extends DThemeViewGesture {\n\tisWheelZoomEnabled(): boolean;\n\tisDblClickZoomEnabled(): boolean;\n\tisWheelTranslationEnabled(): boolean;\n\tgetWheelZoomSpeed(): number;\n\tgetWheelZoomModifier(): UtilGestureModifier;\n\tgetDblClickZoomSpeed(): number;\n\tgetDblClickZoomModifier(): UtilGestureModifier;\n\tgetDblClickZoomDuration(): number;\n\tgetWheelTranslationSpeed(): number;\n\tgetWheelTranslationModifier(): UtilGestureModifier;\n\tgetZoomMin(): number;\n\tgetZoomMax(): number;\n\tgetZoomKeepRatio(): boolean;\n}\n\nexport interface DView {\n\treadonly gesture: DViewGesture;\n\tscale: DViewTargetPoint;\n\tposition: DViewTargetPoint;\n\n\t/**\n\t * Stops an animation if exits.\n\t */\n\tstop(): void;\n\n\t/**\n\t * Resets a position and a scale.\n\t *\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\treset(duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Fits into a screen.\n\t *\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tfit(duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Zooms in at the current position.\n\t *\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tzoomIn(duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Zooms out at the current position.\n\t *\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tzoomOut(duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Zooms into the given position.\n\t *\n\t * @param x a local X coordinate position\n\t * @param y a local Y coordinate position\n\t * @param scaleX a X coordinate scale\n\t * @param scaleY a Y coordinate scale\n\t * @param duration an duration\n\t * @param stop false to keep a previous animation\n\t */\n\tzoomAt(\n\t\tx: number,\n\t\ty: number,\n\t\tscaleX: number,\n\t\tscaleY: number,\n\t\tduration?: number,\n\t\tstop?: boolean\n\t): void;\n\n\t/**\n\t * Zooms into the specified global position.\n\t *\n\t * @param x a global X coordinate position\n\t * @param y a global Y coordinate position\n\t * @param scaleX a X coordinate scale\n\t * @param scaleY a Y coordinate scale\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tzoomAtGlobal(\n\t\tx: number,\n\t\ty: number,\n\t\tscaleX: number,\n\t\tscaleY: number,\n\t\tduration?: number,\n\t\tstop?: boolean\n\t): void;\n\n\t/**\n\t * Zooms in / out at the current position.\n\t *\n\t * @param scaleX a X coordinate scale\n\t * @param scaleY a Y coordinate scale\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tzoom(scaleX: number, scaleY: number, duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Moves to the given position.\n\t *\n\t * @param x a local X coordinate position\n\t * @param y a local Y coordinate position\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tmoveTo(x: number, y: number, duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Sets to the specified position and scale.\n\t *\n\t * @param x a local X coordinate position\n\t * @param y a local Y coordinate position\n\t * @param scaleX a X coordinate scale\n\t * @param scaleY a Y coordinate scale\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\ttransform(\n\t\tx: number,\n\t\ty: number,\n\t\tscaleX: number,\n\t\tscaleY: number,\n\t\tduration?: number,\n\t\tstop?: boolean\n\t): void;\n\n\ttoLocal(global: IPoint, local: IPoint, skipUpdate?: boolean): IPoint;\n\ttoGlobal(local: IPoint, global: IPoint, skipUpdate?: boolean): IPoint;\n}\n"]}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
var EShapeConnectorBodies = /** @class */ (function () {
|
|
6
|
+
function EShapeConnectorBodies() {
|
|
7
|
+
}
|
|
8
|
+
EShapeConnectorBodies.from = function (values, tailMargin, headMargin) {
|
|
9
|
+
var result = [];
|
|
10
|
+
var length = values.length;
|
|
11
|
+
if (4 < length) {
|
|
12
|
+
var threshold = 0.000001;
|
|
13
|
+
var x0 = values[0];
|
|
14
|
+
var y0 = values[1];
|
|
15
|
+
if (tailMargin !== 0) {
|
|
16
|
+
var ex = x0 - values[2];
|
|
17
|
+
var ey = y0 - values[3];
|
|
18
|
+
var n = ex * ex + ey * ey;
|
|
19
|
+
if (threshold < n) {
|
|
20
|
+
var f = tailMargin / Math.sqrt(n);
|
|
21
|
+
x0 += ex * f;
|
|
22
|
+
y0 += ey * f;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
var x1 = values[length - 2];
|
|
26
|
+
var y1 = values[length - 1];
|
|
27
|
+
if (headMargin !== 0) {
|
|
28
|
+
var ex = x1 - values[length - 4];
|
|
29
|
+
var ey = y1 - values[length - 3];
|
|
30
|
+
var n = ex * ex + ey * ey;
|
|
31
|
+
if (threshold < n) {
|
|
32
|
+
var f = headMargin / Math.sqrt(n);
|
|
33
|
+
x1 += ex * f;
|
|
34
|
+
y1 += ey * f;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
var cx = (x1 + x0) * 0.5;
|
|
38
|
+
var cy = (y1 + y0) * 0.5;
|
|
39
|
+
var dx = x1 - x0;
|
|
40
|
+
var dy = y1 - y0;
|
|
41
|
+
var a = Math.atan2(dy, dx);
|
|
42
|
+
var c = Math.cos(a);
|
|
43
|
+
var s = Math.sin(a);
|
|
44
|
+
var l = dx * dx + dy * dy;
|
|
45
|
+
var m = threshold < l ? 1 / Math.sqrt(l) : 1;
|
|
46
|
+
for (var i = 2, imax = length - 2; i < imax; i += 2) {
|
|
47
|
+
var x = values[i + 0] - cx;
|
|
48
|
+
var y = values[i + 1] - cy;
|
|
49
|
+
result.push((c * x + s * y) * m, (c * y - s * x) * m);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return result;
|
|
53
|
+
};
|
|
54
|
+
return EShapeConnectorBodies;
|
|
55
|
+
}());
|
|
56
|
+
export { EShapeConnectorBodies };
|
|
57
|
+
//# sourceMappingURL=e-shape-connector-bodies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e-shape-connector-bodies.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-bodies.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;IAAA;IAkDA,CAAC;IAjDO,0BAAI,GAAX,UAAY,MAAgB,EAAE,UAAkB,EAAE,UAAkB;QACnE,IAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,IAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,GAAG,MAAM,EAAE;YACf,IAAM,SAAS,GAAG,QAAQ,CAAC;YAE3B,IAAI,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACnB,IAAI,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACnB,IAAI,UAAU,KAAK,CAAC,EAAE;gBACrB,IAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;gBAC1B,IAAM,EAAE,GAAG,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;gBAC1B,IAAM,CAAC,GAAG,EAAE,GAAG,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AC,CAAC,CAAC,CAAC;YACtB,IAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACtB,IAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;YAC5B,IAAM,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE;gBACpD,IAAM,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;gBAC7B,IAAM,CAAC,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;gBAC7B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;aACtD;SACD;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IACF,4BAAC;AAAD,CAAC,AAlDD,IAkDC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport class EShapeConnectorBodies {\n\tstatic from(values: number[], tailMargin: number, headMargin: number): number[] {\n\t\tconst result: number[] = [];\n\t\tconst length = values.length;\n\t\tif (4 < length) {\n\t\t\tconst threshold = 0.000001;\n\n\t\t\tlet x0 = values[0];\n\t\t\tlet y0 = values[1];\n\t\t\tif (tailMargin !== 0) {\n\t\t\t\tconst ex = x0 - values[2];\n\t\t\t\tconst ey = y0 - values[3];\n\t\t\t\tconst n = ex * ex + ey * ey;\n\t\t\t\tif (threshold < n) {\n\t\t\t\t\tconst f = tailMargin / Math.sqrt(n);\n\t\t\t\t\tx0 += ex * f;\n\t\t\t\t\ty0 += ey * f;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet x1 = values[length - 2];\n\t\t\tlet y1 = values[length - 1];\n\t\t\tif (headMargin !== 0) {\n\t\t\t\tconst ex = x1 - values[length - 4];\n\t\t\t\tconst ey = y1 - values[length - 3];\n\t\t\t\tconst n = ex * ex + ey * ey;\n\t\t\t\tif (threshold < n) {\n\t\t\t\t\tconst f = headMargin / Math.sqrt(n);\n\t\t\t\t\tx1 += ex * f;\n\t\t\t\t\ty1 += ey * f;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst cx = (x1 + x0) * 0.5;\n\t\t\tconst cy = (y1 + y0) * 0.5;\n\t\t\tconst dx = x1 - x0;\n\t\t\tconst dy = y1 - y0;\n\t\t\tconst a = Math.atan2(dy, dx);\n\t\t\tconst c = Math.cos(a);\n\t\t\tconst s = Math.sin(a);\n\t\t\tconst l = dx * dx + dy * dy;\n\t\t\tconst m = threshold < l ? 1 / Math.sqrt(l) : 1;\n\t\t\tfor (let i = 2, imax = length - 2; i < imax; i += 2) {\n\t\t\t\tconst x = values[i + 0] - cx;\n\t\t\t\tconst y = values[i + 1] - cy;\n\t\t\t\tresult.push((c * x + s * y) * m, (c * y - s * x) * m);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n}\n"]}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
var EShapeConnectorBodyImpl = /** @class */ (function () {
|
|
6
|
+
function EShapeConnectorBodyImpl(parent, onChange) {
|
|
7
|
+
this._parent = parent;
|
|
8
|
+
this._id = 0;
|
|
9
|
+
this._values = [];
|
|
10
|
+
this._lockCount = 0;
|
|
11
|
+
this._isChanged = false;
|
|
12
|
+
this._onChange = onChange;
|
|
13
|
+
}
|
|
14
|
+
EShapeConnectorBodyImpl.prototype.lock = function () {
|
|
15
|
+
this._lockCount += 1;
|
|
16
|
+
if (this._lockCount === 1) {
|
|
17
|
+
this._isChanged = false;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
EShapeConnectorBodyImpl.prototype.unlock = function () {
|
|
21
|
+
this._lockCount -= 1;
|
|
22
|
+
if (this._lockCount === 0) {
|
|
23
|
+
if (this._isChanged) {
|
|
24
|
+
this.onChange();
|
|
25
|
+
}
|
|
26
|
+
this._isChanged = false;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(EShapeConnectorBodyImpl.prototype, "id", {
|
|
30
|
+
get: function () {
|
|
31
|
+
return this._id;
|
|
32
|
+
},
|
|
33
|
+
enumerable: false,
|
|
34
|
+
configurable: true
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(EShapeConnectorBodyImpl.prototype, "values", {
|
|
37
|
+
get: function () {
|
|
38
|
+
return this._values;
|
|
39
|
+
},
|
|
40
|
+
set: function (newValues) {
|
|
41
|
+
this.set(newValues);
|
|
42
|
+
},
|
|
43
|
+
enumerable: false,
|
|
44
|
+
configurable: true
|
|
45
|
+
});
|
|
46
|
+
EShapeConnectorBodyImpl.prototype.set = function (newValues) {
|
|
47
|
+
if (newValues != null) {
|
|
48
|
+
this._id += 1;
|
|
49
|
+
if (this._values !== newValues) {
|
|
50
|
+
var length_1 = newValues.length;
|
|
51
|
+
var values = this._values;
|
|
52
|
+
for (var i = 0; i < length_1; ++i) {
|
|
53
|
+
values[i] = newValues[i];
|
|
54
|
+
}
|
|
55
|
+
values.length = length_1;
|
|
56
|
+
}
|
|
57
|
+
this.onChange();
|
|
58
|
+
}
|
|
59
|
+
return this;
|
|
60
|
+
};
|
|
61
|
+
EShapeConnectorBodyImpl.prototype.copy = function (source) {
|
|
62
|
+
return this.set(source.values);
|
|
63
|
+
};
|
|
64
|
+
EShapeConnectorBodyImpl.prototype.serialize = function (manager) {
|
|
65
|
+
return manager.addResource(JSON.stringify(this._values));
|
|
66
|
+
};
|
|
67
|
+
EShapeConnectorBodyImpl.prototype.deserialize = function (resourceId, mapping, manager) {
|
|
68
|
+
var resources = manager.resources;
|
|
69
|
+
if (0 <= resourceId && resourceId < resources.length) {
|
|
70
|
+
var parsed = manager.getExtension(resourceId);
|
|
71
|
+
if (parsed == null) {
|
|
72
|
+
parsed = JSON.parse(resources[resourceId]);
|
|
73
|
+
manager.setExtension(resourceId, parsed);
|
|
74
|
+
}
|
|
75
|
+
this.set(parsed);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
EShapeConnectorBodyImpl.prototype.onChange = function () {
|
|
79
|
+
if (0 < this._lockCount) {
|
|
80
|
+
this._isChanged = true;
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
this._onChange();
|
|
84
|
+
};
|
|
85
|
+
return EShapeConnectorBodyImpl;
|
|
86
|
+
}());
|
|
87
|
+
export { EShapeConnectorBodyImpl };
|
|
88
|
+
//# sourceMappingURL=e-shape-connector-body-impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e-shape-connector-body-impl.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-body-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH;IAQC,iCAAY,MAAuB,EAAE,QAAoB;QACxD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;QACb,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,sCAAI,GAAJ;QACC,IAAI,CAAC,UAAU,IAAI,CAAC,CAAC;QACrB,IAAI,I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AAC;IAED,2CAAS,GAAT,UAAU,OAA2C;QACpD,OAAO,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED,6CAAW,GAAX,UACC,UAAkB,EAClB,OAA0B,EAC1B,OAA6C;QAE7C,IAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACpC,IAAI,CAAC,IAAI,UAAU,IAAI,UAAU,GAAG,SAAS,CAAC,MAAM,EAAE;YACrD,IAAI,MAAM,GAAG,OAAO,CAAC,YAAY,CAAgC,UAAU,CAAC,CAAC;YAC7E,IAAI,MAAM,IAAI,IAAI,EAAE;gBACnB,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,CAAkC,CAAC;gBAC5E,OAAO,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;aACzC;YACD,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;SACjB;IACF,CAAC;IAES,0CAAQ,GAAlB;QACC,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE;YACxB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;YACvB,OAAO;SACP;QACD,IAAI,CAAC,SAAS,EAAE,CAAC;IAClB,CAAC;IACF,8BAAC;AAAD,CAAC,AA7FD,IA6FC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeConnector } from \"./e-shape-connector\";\nimport { EShapeConnectorBody, EShapeConnectorBodySerialized } from \"./e-shape-connector-body\";\nimport { EShapeResourceManagerDeserialization } from \"./e-shape-resource-manager-deserialization\";\nimport { EShapeResourceManagerSerialization } from \"./e-shape-resource-manager-serialization\";\nimport { EShapeUuidMapping } from \"./e-shape-uuid-mapping\";\n\nexport class EShapeConnectorBodyImpl implements EShapeConnectorBody {\n\tprotected _parent: EShapeConnector;\n\tprotected _id: number;\n\tprotected _values: number[];\n\tprotected _lockCount: number;\n\tprotected _isChanged: boolean;\n\tprotected _onChange: () => void;\n\n\tconstructor(parent: EShapeConnector, onChange: () => void) {\n\t\tthis._parent = parent;\n\t\tthis._id = 0;\n\t\tthis._values = [];\n\t\tthis._lockCount = 0;\n\t\tthis._isChanged = false;\n\t\tthis._onChange = onChange;\n\t}\n\n\tlock(): void {\n\t\tthis._lockCount += 1;\n\t\tif (this._lockCount === 1) {\n\t\t\tthis._isChanged = false;\n\t\t}\n\t}\n\n\tunlock(): void {\n\t\tthis._lockCount -= 1;\n\t\tif (this._lockCount === 0) {\n\t\t\tif (this._isChanged) {\n\t\t\t\tthis.onChange();\n\t\t\t}\n\t\t\tthis._isChanged = false;\n\t\t}\n\t}\n\n\tget id(): number {\n\t\treturn this._id;\n\t}\n\n\tget values(): number[] {\n\t\treturn this._values;\n\t}\n\n\tset values(newValues: number[]) {\n\t\tthis.set(newValues);\n\t}\n\n\tset(newValues?: number[]): this {\n\t\tif (newValues != null) {\n\t\t\tthis._id += 1;\n\t\t\tif (this._values !== newValues) {\n\t\t\t\tconst length = newValues.length;\n\t\t\t\tconst values = this._values;\n\t\t\t\tfor (let i = 0; i < length; ++i) {\n\t\t\t\t\tvalues[i] = newValues[i];\n\t\t\t\t}\n\t\t\t\tvalues.length = length;\n\t\t\t}\n\t\t\tthis.onChange();\n\t\t}\n\t\treturn this;\n\t}\n\n\tcopy(source: EShapeConnectorBody): this {\n\t\treturn this.set(source.values);\n\t}\n\n\tserialize(manager: EShapeResourceManagerSerialization): number {\n\t\treturn manager.addResource(JSON.stringify(this._values));\n\t}\n\n\tdeserialize(\n\t\tresourceId: number,\n\t\tmapping: EShapeUuidMapping,\n\t\tmanager: EShapeResourceManagerDeserialization\n\t): void {\n\t\tconst resources = manager.resources;\n\t\tif (0 <= resourceId && resourceId < resources.length) {\n\t\t\tlet parsed = manager.getExtension<EShapeConnectorBodySerialized>(resourceId);\n\t\t\tif (parsed == null) {\n\t\t\t\tparsed = JSON.parse(resources[resourceId]) as EShapeConnectorBodySerialized;\n\t\t\t\tmanager.setExtension(resourceId, parsed);\n\t\t\t}\n\t\t\tthis.set(parsed);\n\t\t}\n\t}\n\n\tprotected onChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isChanged = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._onChange();\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e-shape-connector-body.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-body.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeResourceManagerDeserialization } from \"./e-shape-resource-manager-deserialization\";\nimport { EShapeResourceManagerSerialization } from \"./e-shape-resource-manager-serialization\";\nimport { EShapeUuidMapping } from \"./e-shape-uuid-mapping\";\n\nexport type EShapeConnectorBodySerialized = number[];\n\nexport interface EShapeConnectorBody {\n\treadonly id: number;\n\tvalues: number[];\n\n\tlock(): void;\n\tunlock(): void;\n\tset(values?: number[]): this;\n\tcopy(source: EShapeConnectorBody): this;\n\tserialize(manager: EShapeResourceManagerSerialization): number;\n\tdeserialize(\n\t\tresourceId: number,\n\t\tmapping: EShapeUuidMapping,\n\t\tmanager: EShapeResourceManagerDeserialization\n\t): void;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-connector-edge-container-impl.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-edge-container-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"e-shape-connector-edge-container-impl.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-edge-container-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,EAAE,uBAAuB,EAAE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CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;aACzC;YACD,IAAI,CAAC,IAAI,EAAE,CAAC;YACZ,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACpD,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACpD,IAAI,CAAC,MAAM,EAAE,CAAC;SACd;IACF,CAAC;IAED,iDAAM,GAAN;QACC,IAAI,CAAC,IAAI,EAAE,CAAC;QACZ,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACf,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACf,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,OAAO,IAAI,CAAC;IACb,CAAC;IAED,iDAAM,GAAN;QACC,IAAI,CAAC,IAAI,EAAE,CAAC;QACZ,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QACpB,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QACpB,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,OAAO,IAAI,CAAC;IACb,CAAC;IACF,uCAAC;AAAD,CAAC,AApHD,IAoHC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeConnector } from \"./e-shape-connector\";\nimport { EShapeConnectorEdge } from \"./e-shape-connector-edge\";\nimport {\n\tEShapeConnectorEdgeContainer,\n\tEShapeConnectorEdgeContainerSerialized\n} from \"./e-shape-connector-edge-container\";\nimport { EShapeConnectorEdgeImpl } from \"./e-shape-connector-edge-impl\";\nimport { EShapeResourceManagerDeserialization } from \"./e-shape-resource-manager-deserialization\";\nimport { EShapeResourceManagerSerialization } from \"./e-shape-resource-manager-serialization\";\nimport { EShapeUuidMapping } from \"./e-shape-uuid-mapping\";\n\nexport class EShapeConnectorEdgeContainerImpl implements EShapeConnectorEdgeContainer {\n\tprotected _parent: EShapeConnector;\n\tprotected _lockCount: number;\n\tprotected _isChanged: boolean;\n\tprotected _onChange: () => void;\n\tprotected _tail: EShapeConnectorEdge;\n\tprotected _head: EShapeConnectorEdge;\n\n\tconstructor(parent: EShapeConnector, onChange: () => void) {\n\t\tthis._parent = parent;\n\t\tthis._lockCount = 0;\n\t\tthis._isChanged = false;\n\t\tthis._onChange = onChange;\n\t\tconst onChangeBound = (): void => {\n\t\t\tthis.onChange();\n\t\t};\n\t\tthis._tail = new EShapeConnectorEdgeImpl(parent, onChangeBound);\n\t\tthis._head = new EShapeConnectorEdgeImpl(parent, onChangeBound);\n\t}\n\n\tlock(): this {\n\t\tthis._lockCount += 1;\n\t\tif (this._lockCount === 1) {\n\t\t\tthis._isChanged = false;\n\t\t}\n\t\treturn this;\n\t}\n\n\tunlock(): this {\n\t\tthis._lockCount -= 1;\n\t\tif (this._lockCount === 0) {\n\t\t\tif (this._isChanged) {\n\t\t\t\tthis._onChange();\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\tprotected onChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isChanged = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._onChange();\n\t}\n\n\tget tail(): EShapeConnectorEdge {\n\t\treturn this._tail;\n\t}\n\n\tget head(): EShapeConnectorEdge {\n\t\treturn this._head;\n\t}\n\n\tcopy(source: EShapeConnectorEdgeContainer): this {\n\t\tthis.lock();\n\t\tthis._tail.copy(source.tail);\n\t\tthis._head.copy(source.head);\n\t\tthis.unlock();\n\t\treturn this;\n\t}\n\n\tfit(forcibly?: boolean): this {\n\t\tthis.lock();\n\t\tthis._tail.fit(forcibly);\n\t\tthis._head.fit(forcibly);\n\t\tthis.unlock();\n\t\treturn this;\n\t}\n\n\tserialize(manager: EShapeResourceManagerSerialization): number {\n\t\tconst tailId = this._tail.serialize(manager);\n\t\tconst headId = this._head.serialize(manager);\n\t\treturn manager.addResource(`[${tailId},${headId}]`);\n\t}\n\n\tdeserialize(\n\t\tresourceId: number,\n\t\tmapping: EShapeUuidMapping,\n\t\tmanager: EShapeResourceManagerDeserialization\n\t): void {\n\t\tconst resources = manager.resources;\n\t\tif (0 <= resourceId && resourceId < resources.length) {\n\t\t\tlet parsed = manager.getExtension<EShapeConnectorEdgeContainerSerialized>(resourceId);\n\t\t\tif (parsed == null) {\n\t\t\t\tparsed = JSON.parse(\n\t\t\t\t\tresources[resourceId]\n\t\t\t\t) as EShapeConnectorEdgeContainerSerialized;\n\t\t\t\tmanager.setExtension(resourceId, parsed);\n\t\t\t}\n\t\t\tthis.lock();\n\t\t\tthis._tail.deserialize(parsed[0], mapping, manager);\n\t\t\tthis._head.deserialize(parsed[1], mapping, manager);\n\t\t\tthis.unlock();\n\t\t}\n\t}\n\n\tattach(): this {\n\t\tthis.lock();\n\t\tconst tail = this._tail;\n\t\tconst head = this._head;\n\t\ttail.attach();\n\t\thead.attach();\n\t\ttail.fit(true);\n\t\thead.fit(true);\n\t\tthis.unlock();\n\t\treturn this;\n\t}\n\n\tdetach(): this {\n\t\tthis.lock();\n\t\tthis._tail.detach();\n\t\tthis._head.detach();\n\t\tthis.unlock();\n\t\treturn this;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-connector-edge-container.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-edge-container.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeConnectorEdge } from \"./e-shape-connector-edge\";\nimport { EShapeResourceManagerDeserialization } from \"./e-shape-resource-manager-deserialization\";\nimport { EShapeResourceManagerSerialization } from \"./e-shape-resource-manager-serialization\";\nimport { EShapeUuidMapping } from \"./e-shape-uuid-mapping\";\n\nexport interface EShapeConnectorEdgeContainer {\n\ttail: EShapeConnectorEdge;\n\thead: EShapeConnectorEdge;\n\tcopy(source: EShapeConnectorEdgeContainer): this;\n\tfit(forcibly?: boolean): this;\n\tserialize(manager: EShapeResourceManagerSerialization): number;\n\tdeserialize(\n\t\tresourceId: number,\n\t\tmapping: EShapeUuidMapping,\n\t\tmanager: EShapeResourceManagerDeserialization\n\t): void;\n\tattach(): this;\n\tdetach(): this;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"e-shape-connector-edge-container.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-edge-container.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeConnectorEdge } from \"./e-shape-connector-edge\";\nimport { EShapeResourceManagerDeserialization } from \"./e-shape-resource-manager-deserialization\";\nimport { EShapeResourceManagerSerialization } from \"./e-shape-resource-manager-serialization\";\nimport { EShapeUuidMapping } from \"./e-shape-uuid-mapping\";\n\nexport type EShapeConnectorEdgeContainerSerialized = [number, number];\n\nexport interface EShapeConnectorEdgeContainer {\n\ttail: EShapeConnectorEdge;\n\thead: EShapeConnectorEdge;\n\tlock(): void;\n\tunlock(): void;\n\tcopy(source: EShapeConnectorEdgeContainer): this;\n\tfit(forcibly?: boolean): this;\n\tserialize(manager: EShapeResourceManagerSerialization): number;\n\tdeserialize(\n\t\tresourceId: number,\n\t\tmapping: EShapeUuidMapping,\n\t\tmanager: EShapeResourceManagerDeserialization\n\t): void;\n\tattach(): this;\n\tdetach(): this;\n}\n"]}
|
|
@@ -14,6 +14,9 @@ export * from "./e-shape-buffer-unit";
|
|
|
14
14
|
export * from "./e-shape-buffer";
|
|
15
15
|
export * from "./e-shape-capabilities";
|
|
16
16
|
export * from "./e-shape-capability";
|
|
17
|
+
export * from "./e-shape-connector-bodies";
|
|
18
|
+
export * from "./e-shape-connector-body-impl";
|
|
19
|
+
export * from "./e-shape-connector-body";
|
|
17
20
|
export * from "./e-shape-connector-container-impl";
|
|
18
21
|
export * from "./e-shape-connector-container";
|
|
19
22
|
export * from "./e-shape-connector-edge-acceptor-impl";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;A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AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,WAAW,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from \"./action\";\nexport * from \"./load\";\nexport * from \"./variant\";\nexport * from \"./e-shape-acceptor-impl\";\nexport * from \"./e-shape-acceptor-type\";\nexport * from \"./e-shape-acceptor\";\nexport * from \"./e-shape-acceptors\";\nexport * from \"./e-shape-buffer-unit-builder\";\nexport * from \"./e-shape-buffer-unit\";\nexport * from \"./e-shape-buffer\";\nexport * from \"./e-shape-capabilities\";\nexport * from \"./e-shape-capability\";\nexport * from \"./e-shape-connector-container-impl\";\nexport * from \"./e-shape-connector-container\";\nexport * from \"./e-shape-connector-edge-acceptor-impl\";\nexport * from \"./e-shape-connector-edge-acceptor\";\nexport * from \"./e-shape-connector-edge-container-impl\";\nexport * from \"./e-shape-connector-edge-container\";\nexport * from \"./e-shape-connector-edge-impl\";\nexport * from \"./e-shape-connector-edge\";\nexport * from \"./e-shape-connector\";\nexport * from \"./e-shape-connectors\";\nexport * from \"./e-shape-container\";\nexport * from \"./e-shape-copy-part\";\nexport * from \"./e-shape-corner\";\nexport * from \"./e-shape-data-value-range\";\nexport * from \"./e-shape-data-value\";\nexport * from \"./e-shape-data\";\nexport * from \"./e-shape-defaults\";\nexport * from \"./e-shape-deleter\";\nexport * from \"./e-shape-deserializer\";\nexport * from \"./e-shape-deserializers\";\nexport * from \"./e-shape-editor\";\nexport * from \"./e-shape-fill\";\nexport * from \"./e-shape-gradient\";\nexport * from \"./e-shape-image-elements\";\nexport * from \"./e-shape-layer-container\";\nexport * from \"./e-shape-layer-state\";\nexport * from \"./e-shape-layer\";\nexport * from \"./e-shape-layout\";\nexport * from \"./e-shape-points-formatted\";\nexport * from \"./e-shape-points-formatter-curve\";\nexport * from \"./e-shape-points-formatter\";\nexport * from \"./e-shape-points-marker-base\";\nexport * from \"./e-shape-points-marker-container-impl-noop\";\nexport * from \"./e-shape-points-marker-container-impl\";\nexport * from \"./e-shape-points-marker-container\";\nexport * from \"./e-shape-points-marker-head\";\nexport * from \"./e-shape-points-marker-noop\";\nexport * from \"./e-shape-points-marker-tail\";\nexport * from \"./e-shape-points-marker-type\";\nexport * from \"./e-shape-points-marker\";\nexport * from \"./e-shape-points-style\";\nexport * from \"./e-shape-points-styles\";\nexport * from \"./e-shape-points\";\nexport * from \"./e-shape-renderer-iterator-datum\";\nexport * from \"./e-shape-renderer-iterator\";\nexport * from \"./e-shape-renderer\";\nexport * from \"./e-shape-resource-manager-deserialization\";\nexport * from \"./e-shape-resource-manager-serialization\";\nexport * from \"./e-shape-runtime\";\nexport * from \"./e-shape-runtimes\";\nexport * from \"./e-shape-search\";\nexport * from \"./e-shape-sizes\";\nexport * from \"./e-shape-state-set-impl-observable\";\nexport * from \"./e-shape-state-set\";\nexport * from \"./e-shape-state\";\nexport * from \"./e-shape-stroke-side\";\nexport * from \"./e-shape-stroke-style\";\nexport * from \"./e-shape-stroke\";\nexport * from \"./e-shape-text-align-horizontal\";\nexport * from \"./e-shape-text-align-vertical\";\nexport * from \"./e-shape-text-align\";\nexport * from \"./e-shape-text-direction\";\nexport * from \"./e-shape-text-offset\";\nexport * from \"./e-shape-text-outline\";\nexport * from \"./e-shape-text\";\nexport * from \"./e-shape-transform-parent\";\nexport * from \"./e-shape-transform\";\nexport * from \"./e-shape-transforms\";\nexport * from \"./e-shape-type\";\nexport * from \"./e-shape-uploaded-constructor\";\nexport * from \"./e-shape-uploaded\";\nexport * from \"./e-shape-uploadeds\";\nexport * from \"./e-shape-uuid-mapping-impl\";\nexport * from \"./e-shape-uuid-mapping\";\nexport * from \"./e-shape\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAA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CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,WAAW,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from \"./action\";\nexport * from \"./load\";\nexport * from \"./variant\";\nexport * from \"./e-shape-acceptor-impl\";\nexport * from \"./e-shape-acceptor-type\";\nexport * from \"./e-shape-acceptor\";\nexport * from \"./e-shape-acceptors\";\nexport * from \"./e-shape-buffer-unit-builder\";\nexport * from \"./e-shape-buffer-unit\";\nexport * from \"./e-shape-buffer\";\nexport * from \"./e-shape-capabilities\";\nexport * from \"./e-shape-capability\";\nexport * from \"./e-shape-connector-bodies\";\nexport * from \"./e-shape-connector-body-impl\";\nexport * from \"./e-shape-connector-body\";\nexport * from \"./e-shape-connector-container-impl\";\nexport * from \"./e-shape-connector-container\";\nexport * from \"./e-shape-connector-edge-acceptor-impl\";\nexport * from \"./e-shape-connector-edge-acceptor\";\nexport * from \"./e-shape-connector-edge-container-impl\";\nexport * from \"./e-shape-connector-edge-container\";\nexport * from \"./e-shape-connector-edge-impl\";\nexport * from \"./e-shape-connector-edge\";\nexport * from \"./e-shape-connector\";\nexport * from \"./e-shape-connectors\";\nexport * from \"./e-shape-container\";\nexport * from \"./e-shape-copy-part\";\nexport * from \"./e-shape-corner\";\nexport * from \"./e-shape-data-value-range\";\nexport * from \"./e-shape-data-value\";\nexport * from \"./e-shape-data\";\nexport * from \"./e-shape-defaults\";\nexport * from \"./e-shape-deleter\";\nexport * from \"./e-shape-deserializer\";\nexport * from \"./e-shape-deserializers\";\nexport * from \"./e-shape-editor\";\nexport * from \"./e-shape-fill\";\nexport * from \"./e-shape-gradient\";\nexport * from \"./e-shape-image-elements\";\nexport * from \"./e-shape-layer-container\";\nexport * from \"./e-shape-layer-state\";\nexport * from \"./e-shape-layer\";\nexport * from \"./e-shape-layout\";\nexport * from \"./e-shape-points-formatted\";\nexport * from \"./e-shape-points-formatter-curve\";\nexport * from \"./e-shape-points-formatter\";\nexport * from \"./e-shape-points-marker-base\";\nexport * from \"./e-shape-points-marker-container-impl-noop\";\nexport * from \"./e-shape-points-marker-container-impl\";\nexport * from \"./e-shape-points-marker-container\";\nexport * from \"./e-shape-points-marker-head\";\nexport * from \"./e-shape-points-marker-noop\";\nexport * from \"./e-shape-points-marker-tail\";\nexport * from \"./e-shape-points-marker-type\";\nexport * from \"./e-shape-points-marker\";\nexport * from \"./e-shape-points-style\";\nexport * from \"./e-shape-points-styles\";\nexport * from \"./e-shape-points\";\nexport * from \"./e-shape-renderer-iterator-datum\";\nexport * from \"./e-shape-renderer-iterator\";\nexport * from \"./e-shape-renderer\";\nexport * from \"./e-shape-resource-manager-deserialization\";\nexport * from \"./e-shape-resource-manager-serialization\";\nexport * from \"./e-shape-runtime\";\nexport * from \"./e-shape-runtimes\";\nexport * from \"./e-shape-search\";\nexport * from \"./e-shape-sizes\";\nexport * from \"./e-shape-state-set-impl-observable\";\nexport * from \"./e-shape-state-set\";\nexport * from \"./e-shape-state\";\nexport * from \"./e-shape-stroke-side\";\nexport * from \"./e-shape-stroke-style\";\nexport * from \"./e-shape-stroke\";\nexport * from \"./e-shape-text-align-horizontal\";\nexport * from \"./e-shape-text-align-vertical\";\nexport * from \"./e-shape-text-align\";\nexport * from \"./e-shape-text-direction\";\nexport * from \"./e-shape-text-offset\";\nexport * from \"./e-shape-text-outline\";\nexport * from \"./e-shape-text\";\nexport * from \"./e-shape-transform-parent\";\nexport * from \"./e-shape-transform\";\nexport * from \"./e-shape-transforms\";\nexport * from \"./e-shape-type\";\nexport * from \"./e-shape-uploaded-constructor\";\nexport * from \"./e-shape-uploaded\";\nexport * from \"./e-shape-uploadeds\";\nexport * from \"./e-shape-uuid-mapping-impl\";\nexport * from \"./e-shape-uuid-mapping\";\nexport * from \"./e-shape\";\n"]}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright (C) 2019 Toshiba Corporation
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
+
import { EShapeConnectorBodies } from "../e-shape-connector-bodies";
|
|
5
6
|
import { EShapeDeserializer } from "../e-shape-deserializer";
|
|
6
7
|
import { EShapeConnectorLine } from "./e-shape-connector-line";
|
|
7
8
|
export var deserializeConnectorLine = function (item, manager) {
|
|
@@ -17,8 +18,26 @@ export var onConnectorLineDeserialized = function (item, shape, mapping, manager
|
|
|
17
18
|
parsed = JSON.parse(resources[resourceId]);
|
|
18
19
|
manager.setExtension(resourceId, parsed);
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
-
shape.
|
|
21
|
+
// Lock
|
|
22
|
+
shape.lock();
|
|
23
|
+
// Points
|
|
24
|
+
var points = shape.points;
|
|
25
|
+
points.deserialize(parsed[1], manager);
|
|
26
|
+
// Edge
|
|
27
|
+
var edge = shape.edge;
|
|
28
|
+
edge.deserialize(parsed[0], mapping, manager);
|
|
29
|
+
// Body
|
|
30
|
+
var body = shape.body;
|
|
31
|
+
var bodyId = parsed[2];
|
|
32
|
+
if (bodyId != null) {
|
|
33
|
+
body.deserialize(bodyId, mapping, manager);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
// The following is for backward compatibility.
|
|
37
|
+
body.set(EShapeConnectorBodies.from(points.values, edge.tail.margin, edge.head.margin));
|
|
38
|
+
}
|
|
39
|
+
// Unlock
|
|
40
|
+
shape.unlock();
|
|
22
41
|
}
|
|
23
42
|
}
|
|
24
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserialize-connector-line.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-connector-line.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,CAAC,IAAM,wBAAwB,GAAG,UACvC,IAA4B,EAC5B,OAA6C;IAE7C,OAAO,kBAAkB,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,mBAAmB,EAAE,CAAC,CAAC;AACjF,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,2BAA2B,GAAG,UAC1C,IAA4B,EAC5B,KAAa,EACb,OAA0B,EAC1B,OAA6C;IAE7C,IAAI,KAAK,YAAY,mBAAmB,EAAE;QACzC,IAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACpC,IAAM,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,UAAU,IAAI,UAAU,GAAG,SAAS,CAAC,MAAM,EAAE;YACrD,IAAI,MAAM,GAAG,OAAO,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"deserialize-connector-line.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-connector-line.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,CAAC,IAAM,wBAAwB,GAAG,UACvC,IAA4B,EAC5B,OAA6C;IAE7C,OAAO,kBAAkB,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,mBAAmB,EAAE,CAAC,CAAC;AACjF,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,2BAA2B,GAAG,UAC1C,IAA4B,EAC5B,KAAa,EACb,OAA0B,EAC1B,OAA6C;IAE7C,IAAI,KAAK,YAAY,mBAAmB,EAAE;QACzC,IAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACpC,IAAM,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,U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agram-serialized\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeConnectorBodies } from \"../e-shape-connector-bodies\";\nimport { EShapeDeserializer } from \"../e-shape-deserializer\";\nimport { EShapeResourceManagerDeserialization } from \"../e-shape-resource-manager-deserialization\";\nimport { EShapeUuidMapping } from \"../e-shape-uuid-mapping\";\nimport { EShapeConnectorLine } from \"./e-shape-connector-line\";\n\nexport const deserializeConnectorLine = (\n\titem: DDiagramSerializedItem,\n\tmanager: EShapeResourceManagerDeserialization\n): Promise<EShapeConnectorLine> | EShapeConnectorLine | null => {\n\treturn EShapeDeserializer.deserialize(item, manager, new EShapeConnectorLine());\n};\n\nexport const onConnectorLineDeserialized = (\n\titem: DDiagramSerializedItem,\n\tshape: EShape,\n\tmapping: EShapeUuidMapping,\n\tmanager: EShapeResourceManagerDeserialization\n): void => {\n\tif (shape instanceof EShapeConnectorLine) {\n\t\tconst resources = manager.resources;\n\t\tconst resourceId = item[15];\n\t\tif (0 <= resourceId && resourceId < resources.length) {\n\t\t\tlet parsed = manager.getExtension<[number, number, number?]>(resourceId);\n\t\t\tif (parsed == null) {\n\t\t\t\tparsed = JSON.parse(resources[resourceId]) as [number, number, number?];\n\t\t\t\tmanager.setExtension(resourceId, parsed);\n\t\t\t}\n\n\t\t\t// Lock\n\t\t\tshape.lock();\n\n\t\t\t// Points\n\t\t\tconst points = shape.points;\n\t\t\tpoints.deserialize(parsed[1], manager);\n\n\t\t\t// Edge\n\t\t\tconst edge = shape.edge;\n\t\t\tedge.deserialize(parsed[0], mapping, manager);\n\n\t\t\t// Body\n\t\t\tconst body = shape.body;\n\t\t\tconst bodyId = parsed[2];\n\t\t\tif (bodyId != null) {\n\t\t\t\tbody.deserialize(bodyId, mapping, manager);\n\t\t\t} else {\n\t\t\t\t// The following is for backward compatibility.\n\t\t\t\tbody.set(\n\t\t\t\t\tEShapeConnectorBodies.from(points.values, edge.tail.margin, edge.head.margin)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Unlock\n\t\t\tshape.unlock();\n\t\t}\n\t}\n};\n"]}
|