@wcardinal/wcardinal-ui 0.149.0 → 0.151.0
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/action/{e-shape-action-value-deserializer.d.ts → deserialize-action-value.d.ts} +1 -4
- package/dist/types/wcardinal/ui/shape/action/index.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-connector-bodies.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-deserializers.d.ts +15 -4
- package/dist/types/wcardinal/ui/shape/index.d.ts +0 -3
- package/dist/types/wcardinal/ui/shape/variant/deserialize-all.d.ts +4 -0
- package/dist/types/wcardinal/ui/shape/variant/deserialize-bar.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-base.d.ts +4 -0
- package/dist/types/wcardinal/ui/shape/variant/deserialize-button.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-circle.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-connector-line.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/variant/deserialize-gradient.d.ts +2 -0
- package/dist/types/wcardinal/ui/shape/variant/deserialize-group-shadowed.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-group.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-image-sdf.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-image.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-label.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-circles.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-rectangle-roundeds.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-rectangles.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-triangle-roundeds.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-line-of-triangles.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-line.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-null.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-rectangle-pivoted.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-rectangle-rounded.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-rectangle.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-triangle-rounded.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-triangle.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize.d.ts +4 -0
- package/dist/types/wcardinal/ui/shape/variant/e-shape-embeddeds.d.ts +1 -2
- package/dist/types/wcardinal/ui/shape/variant/index.d.ts +11 -2
- package/dist/types/wcardinal/ui/shape/variant/to-gradient-image-url.d.ts +2 -0
- package/dist/types/wcardinal/ui/shape/variant/to-gradient-serialized.d.ts +2 -0
- package/dist/types/wcardinal/ui/shape/variant/to-image-element.d.ts +1 -0
- package/dist/types/wcardinal/ui/shape/variant/to-resized.d.ts +3 -0
- package/dist/types/wcardinal/ui/shape/variant/to-size-normalized.d.ts +1 -0
- package/dist/types/wcardinal/ui/shape/variant/to-size-rounded.d.ts +1 -0
- package/dist/wcardinal/ui/d-diagrams.js +2 -2
- package/dist/wcardinal/ui/d-diagrams.js.map +1 -1
- package/dist/wcardinal/ui/d-view.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/deserialize-action-value.js +109 -0
- package/dist/wcardinal/ui/shape/action/deserialize-action-value.js.map +1 -0
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-absolute.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-absolute.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-relative.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-relative.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-absolute.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-absolute.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-relative.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-relative.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-absolute.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-absolute.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-relative.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-relative.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/index.js +1 -1
- package/dist/wcardinal/ui/shape/action/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-bodies.js +24 -3
- package/dist/wcardinal/ui/shape/e-shape-connector-bodies.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-deserializers.js +7 -1
- package/dist/wcardinal/ui/shape/e-shape-deserializers.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-transforms.js +3 -3
- package/dist/wcardinal/ui/shape/e-shape-transforms.js.map +1 -1
- package/dist/wcardinal/ui/shape/index.js +0 -3
- package/dist/wcardinal/ui/shape/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/load/load-shape-connector-line.js +3 -3
- package/dist/wcardinal/ui/shape/load/load-shape-connector-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-image-sdf.js +3 -3
- package/dist/wcardinal/ui/shape/variant/create-image-sdf.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/create-image.js +2 -2
- package/dist/wcardinal/ui/shape/variant/create-image.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-all.js +32 -0
- package/dist/wcardinal/ui/shape/variant/deserialize-all.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/deserialize-bar.js +4 -4
- package/dist/wcardinal/ui/shape/variant/deserialize-bar.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-base.js +100 -0
- package/dist/wcardinal/ui/shape/variant/deserialize-base.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/deserialize-button.js +4 -5
- package/dist/wcardinal/ui/shape/variant/deserialize-button.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-circle.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-circle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js +7 -6
- package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-embedded.js +15 -2
- package/dist/wcardinal/ui/shape/variant/deserialize-embedded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-gradient.js +34 -0
- package/dist/wcardinal/ui/shape/variant/deserialize-gradient.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/deserialize-group-shadowed.js +4 -4
- package/dist/wcardinal/ui/shape/variant/deserialize-group-shadowed.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-group.js +4 -4
- package/dist/wcardinal/ui/shape/variant/deserialize-group.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-image-sdf.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-image-sdf.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-image.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-image.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-label.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-label.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-line-of-circles.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-line-of-circles.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-line-of-rectangle-roundeds.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-line-of-rectangle-roundeds.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-line-of-rectangles.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-line-of-rectangles.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-line-of-triangle-roundeds.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-line-of-triangle-roundeds.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-line-of-triangles.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-line-of-triangles.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-line.js +4 -4
- package/dist/wcardinal/ui/shape/variant/deserialize-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-null.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-null.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-pivoted.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-pivoted.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-rounded.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-rectangle-rounded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-rectangle.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-rectangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-triangle-rounded.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-triangle-rounded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-triangle.js +3 -3
- package/dist/wcardinal/ui/shape/variant/deserialize-triangle.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize.js +17 -0
- package/dist/wcardinal/ui/shape/variant/deserialize.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-base.js +9 -2
- package/dist/wcardinal/ui/shape/variant/e-shape-base.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js +2 -0
- package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-embeddeds.js +0 -13
- package/dist/wcardinal/ui/shape/variant/e-shape-embeddeds.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/index.js +11 -2
- package/dist/wcardinal/ui/shape/variant/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/to-gradient-image-url.js +35 -0
- package/dist/wcardinal/ui/shape/variant/to-gradient-image-url.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/to-gradient-serialized.js +15 -0
- package/dist/wcardinal/ui/shape/variant/to-gradient-serialized.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/to-image-element.js +32 -0
- package/dist/wcardinal/ui/shape/variant/to-image-element.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/to-resized.js +52 -0
- package/dist/wcardinal/ui/shape/variant/to-resized.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/to-size-normalized.js +12 -0
- package/dist/wcardinal/ui/shape/variant/to-size-normalized.js.map +1 -0
- package/dist/wcardinal/ui/shape/variant/to-size-rounded.js +8 -0
- package/dist/wcardinal/ui/shape/variant/to-size-rounded.js.map +1 -0
- 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 +2519 -2479
- package/dist/wcardinal-ui.js +1954 -1914
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-deserializer.d.ts +0 -10
- package/dist/types/wcardinal/ui/shape/e-shape-image-elements.d.ts +0 -6
- package/dist/types/wcardinal/ui/shape/e-shape-sizes.d.ts +0 -7
- package/dist/types/wcardinal/ui/shape/variant/e-shape-gradients.d.ts +0 -9
- package/dist/wcardinal/ui/shape/action/e-shape-action-value-deserializer.js +0 -115
- package/dist/wcardinal/ui/shape/action/e-shape-action-value-deserializer.js.map +0 -1
- package/dist/wcardinal/ui/shape/e-shape-deserializer.js +0 -143
- package/dist/wcardinal/ui/shape/e-shape-deserializer.js.map +0 -1
- package/dist/wcardinal/ui/shape/e-shape-image-elements.js +0 -35
- package/dist/wcardinal/ui/shape/e-shape-image-elements.js.map +0 -1
- package/dist/wcardinal/ui/shape/e-shape-sizes.js +0 -66
- package/dist/wcardinal/ui/shape/e-shape-sizes.js.map +0 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-gradients.js +0 -89
- package/dist/wcardinal/ui/shape/variant/e-shape-gradients.js.map +0 -1
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { isArray } from "../../util/is-array";
|
|
6
|
+
import { isNumber } from "../../util/is-number";
|
|
7
|
+
import { EShapeActionValueBlink } from "./e-shape-action-value-blink";
|
|
8
|
+
import { EShapeActionValueChangeColor } from "./e-shape-action-value-change-color";
|
|
9
|
+
import { EShapeActionValueChangeColorBrightness } from "./e-shape-action-value-change-color-brightness";
|
|
10
|
+
import { EShapeActionValueChangeColorCode } from "./e-shape-action-value-change-color-code";
|
|
11
|
+
import { EShapeActionValueChangeColorTarget } from "./e-shape-action-value-change-color-target";
|
|
12
|
+
import { EShapeActionValueChangeCursor } from "./e-shape-action-value-change-cursor";
|
|
13
|
+
import { EShapeActionValueChangeText } from "./e-shape-action-value-change-text";
|
|
14
|
+
import { EShapeActionValueEmitEvent } from "./e-shape-action-value-emit-event";
|
|
15
|
+
import { EShapeActionValueMisc } from "./e-shape-action-value-misc";
|
|
16
|
+
import { EShapeActionValueMiscGesture } from "./e-shape-action-value-misc-gesture";
|
|
17
|
+
import { EShapeActionValueMiscLayerGesture } from "./e-shape-action-value-misc-layer-gesture";
|
|
18
|
+
import { EShapeActionValueMiscLayerShowHide } from "./e-shape-action-value-misc-layer-show-hide";
|
|
19
|
+
import { EShapeActionValueMiscType } from "./e-shape-action-value-misc-type";
|
|
20
|
+
import { EShapeActionValueOpen } from "./e-shape-action-value-open";
|
|
21
|
+
import { EShapeActionValueShowHide } from "./e-shape-action-value-show-hide";
|
|
22
|
+
import { EShapeActionValueShowHideType } from "./e-shape-action-value-show-hide-type";
|
|
23
|
+
import { EShapeActionValueTransformMove } from "./e-shape-action-value-transform-move";
|
|
24
|
+
import { EShapeActionValueTransformResize } from "./e-shape-action-value-transform-resize";
|
|
25
|
+
import { EShapeActionValueTransformRotate } from "./e-shape-action-value-transform-rotate";
|
|
26
|
+
import { EShapeActionValueTransformType } from "./e-shape-action-value-transform-type";
|
|
27
|
+
import { EShapeActionValueType } from "./e-shape-action-value-type";
|
|
28
|
+
var toSerialized = function (resource) {
|
|
29
|
+
try {
|
|
30
|
+
var parsed = JSON.parse(resource);
|
|
31
|
+
if (isArray(parsed)) {
|
|
32
|
+
for (var i = 0, imax = parsed.length; i < imax; ++i) {
|
|
33
|
+
if (!isNumber(parsed[i])) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (2 <= parsed.length) {
|
|
38
|
+
return parsed;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return null;
|
|
42
|
+
}
|
|
43
|
+
catch (e) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
export var deserializeActionValue = function (id, manager) {
|
|
48
|
+
var action = manager.getAction(id);
|
|
49
|
+
if (action != null) {
|
|
50
|
+
return action;
|
|
51
|
+
}
|
|
52
|
+
var resources = manager.resources;
|
|
53
|
+
var resource = resources[id];
|
|
54
|
+
if (resource != null) {
|
|
55
|
+
var serialized = toSerialized(resource);
|
|
56
|
+
if (serialized != null) {
|
|
57
|
+
switch (serialized[0]) {
|
|
58
|
+
case EShapeActionValueType.SHOW_HIDE:
|
|
59
|
+
return EShapeActionValueShowHide.deserialize(serialized, manager);
|
|
60
|
+
case EShapeActionValueType.BLINK:
|
|
61
|
+
return EShapeActionValueBlink.deserialize(serialized, manager);
|
|
62
|
+
case EShapeActionValueType.CHANGE_COLOR:
|
|
63
|
+
case EShapeActionValueType.CHANGE_COLOR_LEGACY:
|
|
64
|
+
switch (serialized[3]) {
|
|
65
|
+
case EShapeActionValueChangeColorTarget.COLOR_AND_ALPHA:
|
|
66
|
+
case EShapeActionValueChangeColorTarget.COLOR:
|
|
67
|
+
case EShapeActionValueChangeColorTarget.ALPHA:
|
|
68
|
+
return EShapeActionValueChangeColor.deserialize(serialized, manager);
|
|
69
|
+
case EShapeActionValueChangeColorTarget.CODE:
|
|
70
|
+
return EShapeActionValueChangeColorCode.deserialize(serialized, manager);
|
|
71
|
+
case EShapeActionValueChangeColorTarget.BRIGHTNESS:
|
|
72
|
+
return EShapeActionValueChangeColorBrightness.deserialize(serialized, manager);
|
|
73
|
+
}
|
|
74
|
+
break;
|
|
75
|
+
case EShapeActionValueType.CHANGE_TEXT:
|
|
76
|
+
return EShapeActionValueChangeText.deserialize(serialized, manager);
|
|
77
|
+
case EShapeActionValueType.CHANGE_CURSOR:
|
|
78
|
+
return EShapeActionValueChangeCursor.deserialize(serialized, manager);
|
|
79
|
+
case EShapeActionValueType.EMIT_EVENT:
|
|
80
|
+
return EShapeActionValueEmitEvent.deserialize(serialized, manager);
|
|
81
|
+
case EShapeActionValueType.OPEN:
|
|
82
|
+
return EShapeActionValueOpen.deserialize(serialized, manager);
|
|
83
|
+
case EShapeActionValueType.TRANSFORM:
|
|
84
|
+
switch (serialized[2]) {
|
|
85
|
+
case EShapeActionValueTransformType.MOVE:
|
|
86
|
+
return EShapeActionValueTransformMove.deserialize(serialized, manager);
|
|
87
|
+
case EShapeActionValueTransformType.RESIZE:
|
|
88
|
+
return EShapeActionValueTransformResize.deserialize(serialized, manager);
|
|
89
|
+
case EShapeActionValueTransformType.ROTATE:
|
|
90
|
+
return EShapeActionValueTransformRotate.deserialize(serialized, manager);
|
|
91
|
+
}
|
|
92
|
+
break;
|
|
93
|
+
case EShapeActionValueType.MISC:
|
|
94
|
+
switch (serialized[2]) {
|
|
95
|
+
case EShapeActionValueMiscType.GESTURE:
|
|
96
|
+
return EShapeActionValueMiscGesture.deserialize(serialized, manager);
|
|
97
|
+
case EShapeActionValueMiscType.LAYER_SHOW_HIDE:
|
|
98
|
+
return EShapeActionValueMiscLayerShowHide.deserialize(serialized, manager);
|
|
99
|
+
case EShapeActionValueMiscType.LAYER_GESTURE:
|
|
100
|
+
return EShapeActionValueMiscLayerGesture.deserialize(serialized, manager);
|
|
101
|
+
default:
|
|
102
|
+
return EShapeActionValueMisc.deserialize(serialized, manager);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return new EShapeActionValueShowHide(EShapeActionValueShowHideType.SHOW, "");
|
|
108
|
+
};
|
|
109
|
+
//# sourceMappingURL=deserialize-action-value.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deserialize-action-value.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/deserialize-action-value.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EACN,sBAAsB,EAEtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,4BAA4B,EAG5B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACN,sCAAsC,EAGtC,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACN,gCAAgC,EAGhC,MAAM,0CAA0C,CAAC;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AyB,CAAC,eAAe;4BAC7C,OAAO,kCAAkC,CAAC,WAAW,CACpD,UAAU,EACV,OAAO,CACP,CAAC;wBACH,KAAK,yBAAyB,CAAC,aAAa;4BAC3C,OAAO,iCAAiC,CAAC,WAAW,CACnD,UAAU,EACV,OAAO,CACP,CAAC;wBACH;4BACC,OAAO,qBAAqB,CAAC,WAAW,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;qBAC/D;aACF;SACD;KACD;IACD,OAAO,IAAI,yBAAyB,CAAC,6BAA6B,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAC9E,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { isArray } from \"../../util/is-array\";\nimport { isNumber } from \"../../util/is-number\";\nimport { EShapeResourceManagerDeserialization } from \"../e-shape-resource-manager-deserialization\";\nimport { EShapeActionValue } from \"./e-shape-action-value\";\nimport {\n\tEShapeActionValueBlink,\n\tEShapeActionValueBlinkSerialized\n} from \"./e-shape-action-value-blink\";\nimport {\n\tEShapeActionValueChangeColor,\n\tEShapeActionValueChangeColorSerialized,\n\tEShapeActionValueChangeColorSerializedLegacy\n} from \"./e-shape-action-value-change-color\";\nimport {\n\tEShapeActionValueChangeColorBrightness,\n\tEShapeActionValueChangeColorBrightnessSerialized,\n\tEShapeActionValueChangeColorBrightnessSerializedLegacy\n} from \"./e-shape-action-value-change-color-brightness\";\nimport {\n\tEShapeActionValueChangeColorCode,\n\tEShapeActionValueChangeColorCodeSerialized,\n\tEShapeActionValueChangeColorCodeSerializedLegacy\n} from \"./e-shape-action-value-change-color-code\";\nimport { EShapeActionValueChangeColorTarget } from \"./e-shape-action-value-change-color-target\";\nimport {\n\tEShapeActionValueChangeCursor,\n\tEShapeActionValueChangeCursorSerialized\n} from \"./e-shape-action-value-change-cursor\";\nimport {\n\tEShapeActionValueChangeText,\n\tEShapeActionValueChangeTextSerialized\n} from \"./e-shape-action-value-change-text\";\nimport {\n\tEShapeActionValueEmitEvent,\n\tEShapeActionValueEmitEventSerialized\n} from \"./e-shape-action-value-emit-event\";\nimport {\n\tEShapeActionValueMisc,\n\tEShapeActionValueMiscSerialized\n} from \"./e-shape-action-value-misc\";\nimport {\n\tEShapeActionValueMiscGesture,\n\tEShapeActionValueMiscGestureSerialized\n} from \"./e-shape-action-value-misc-gesture\";\nimport {\n\tEShapeActionValueMiscLayerGesture,\n\tEShapeActionValueMiscLayerGestureSerialized\n} from \"./e-shape-action-value-misc-layer-gesture\";\nimport {\n\tEShapeActionValueMiscLayerShowHide,\n\tEShapeActionValueMiscLayerShowHideSerialized\n} from \"./e-shape-action-value-misc-layer-show-hide\";\nimport { EShapeActionValueMiscType } from \"./e-shape-action-value-misc-type\";\nimport {\n\tEShapeActionValueOpen,\n\tEShapeActionValueOpenSerialized\n} from \"./e-shape-action-value-open\";\nimport {\n\tEShapeActionValueShowHide,\n\tEShapeActionValueShowHideSerialized\n} from \"./e-shape-action-value-show-hide\";\nimport { EShapeActionValueShowHideType } from \"./e-shape-action-value-show-hide-type\";\nimport {\n\tEShapeActionValueTransformMove,\n\tEShapeActionValueTransformMoveSerialized\n} from \"./e-shape-action-value-transform-move\";\nimport {\n\tEShapeActionValueTransformResize,\n\tEShapeActionValueTransformResizeSerialized\n} from \"./e-shape-action-value-transform-resize\";\nimport {\n\tEShapeActionValueTransformRotate,\n\tEShapeActionValueTransformRotateSerialized\n} from \"./e-shape-action-value-transform-rotate\";\nimport { EShapeActionValueTransformType } from \"./e-shape-action-value-transform-type\";\nimport { EShapeActionValueType } from \"./e-shape-action-value-type\";\n\nexport type EShapeActionValueSerialized =\n\t| EShapeActionValueShowHideSerialized\n\t| EShapeActionValueBlinkSerialized\n\t| EShapeActionValueBlinkSerialized\n\t| EShapeActionValueChangeColorSerialized\n\t| EShapeActionValueChangeColorSerializedLegacy\n\t| EShapeActionValueChangeColorCodeSerialized\n\t| EShapeActionValueChangeColorCodeSerializedLegacy\n\t| EShapeActionValueChangeColorBrightnessSerialized\n\t| EShapeActionValueChangeColorBrightnessSerializedLegacy\n\t| EShapeActionValueChangeTextSerialized\n\t| EShapeActionValueChangeCursorSerialized\n\t| EShapeActionValueEmitEventSerialized\n\t| EShapeActionValueOpenSerialized\n\t| EShapeActionValueTransformMoveSerialized\n\t| EShapeActionValueTransformResizeSerialized\n\t| EShapeActionValueTransformRotateSerialized\n\t| EShapeActionValueMiscSerialized\n\t| EShapeActionValueMiscGestureSerialized\n\t| EShapeActionValueMiscLayerGestureSerialized\n\t| EShapeActionValueMiscLayerShowHideSerialized;\n\nconst toSerialized = (resource: string): EShapeActionValueSerialized | null => {\n\ttry {\n\t\tconst parsed = JSON.parse(resource);\n\t\tif (isArray(parsed)) {\n\t\t\tfor (let i = 0, imax = parsed.length; i < imax; ++i) {\n\t\t\t\tif (!isNumber(parsed[i])) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (2 <= parsed.length) {\n\t\t\t\treturn parsed as EShapeActionValueSerialized;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t} catch (e) {\n\t\treturn null;\n\t}\n};\n\nexport const deserializeActionValue = (\n\tid: number,\n\tmanager: EShapeResourceManagerDeserialization\n): EShapeActionValue => {\n\tconst action = manager.getAction(id);\n\tif (action != null) {\n\t\treturn action;\n\t}\n\n\tconst resources = manager.resources;\n\tconst resource = resources[id];\n\tif (resource != null) {\n\t\tconst serialized = toSerialized(resource);\n\t\tif (serialized != null) {\n\t\t\tswitch (serialized[0]) {\n\t\t\t\tcase EShapeActionValueType.SHOW_HIDE:\n\t\t\t\t\treturn EShapeActionValueShowHide.deserialize(serialized, manager);\n\t\t\t\tcase EShapeActionValueType.BLINK:\n\t\t\t\t\treturn EShapeActionValueBlink.deserialize(serialized, manager);\n\t\t\t\tcase EShapeActionValueType.CHANGE_COLOR:\n\t\t\t\tcase EShapeActionValueType.CHANGE_COLOR_LEGACY:\n\t\t\t\t\tswitch (serialized[3]) {\n\t\t\t\t\t\tcase EShapeActionValueChangeColorTarget.COLOR_AND_ALPHA:\n\t\t\t\t\t\tcase EShapeActionValueChangeColorTarget.COLOR:\n\t\t\t\t\t\tcase EShapeActionValueChangeColorTarget.ALPHA:\n\t\t\t\t\t\t\treturn EShapeActionValueChangeColor.deserialize(serialized, manager);\n\t\t\t\t\t\tcase EShapeActionValueChangeColorTarget.CODE:\n\t\t\t\t\t\t\treturn EShapeActionValueChangeColorCode.deserialize(\n\t\t\t\t\t\t\t\tserialized,\n\t\t\t\t\t\t\t\tmanager\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\tcase EShapeActionValueChangeColorTarget.BRIGHTNESS:\n\t\t\t\t\t\t\treturn EShapeActionValueChangeColorBrightness.deserialize(\n\t\t\t\t\t\t\t\tserialized,\n\t\t\t\t\t\t\t\tmanager\n\t\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase EShapeActionValueType.CHANGE_TEXT:\n\t\t\t\t\treturn EShapeActionValueChangeText.deserialize(serialized, manager);\n\t\t\t\tcase EShapeActionValueType.CHANGE_CURSOR:\n\t\t\t\t\treturn EShapeActionValueChangeCursor.deserialize(serialized, manager);\n\t\t\t\tcase EShapeActionValueType.EMIT_EVENT:\n\t\t\t\t\treturn EShapeActionValueEmitEvent.deserialize(serialized, manager);\n\t\t\t\tcase EShapeActionValueType.OPEN:\n\t\t\t\t\treturn EShapeActionValueOpen.deserialize(serialized, manager);\n\t\t\t\tcase EShapeActionValueType.TRANSFORM:\n\t\t\t\t\tswitch (serialized[2]) {\n\t\t\t\t\t\tcase EShapeActionValueTransformType.MOVE:\n\t\t\t\t\t\t\treturn EShapeActionValueTransformMove.deserialize(serialized, manager);\n\t\t\t\t\t\tcase EShapeActionValueTransformType.RESIZE:\n\t\t\t\t\t\t\treturn EShapeActionValueTransformResize.deserialize(\n\t\t\t\t\t\t\t\tserialized,\n\t\t\t\t\t\t\t\tmanager\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\tcase EShapeActionValueTransformType.ROTATE:\n\t\t\t\t\t\t\treturn EShapeActionValueTransformRotate.deserialize(\n\t\t\t\t\t\t\t\tserialized,\n\t\t\t\t\t\t\t\tmanager\n\t\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase EShapeActionValueType.MISC:\n\t\t\t\t\tswitch (serialized[2]) {\n\t\t\t\t\t\tcase EShapeActionValueMiscType.GESTURE:\n\t\t\t\t\t\t\treturn EShapeActionValueMiscGesture.deserialize(serialized, manager);\n\t\t\t\t\t\tcase EShapeActionValueMiscType.LAYER_SHOW_HIDE:\n\t\t\t\t\t\t\treturn EShapeActionValueMiscLayerShowHide.deserialize(\n\t\t\t\t\t\t\t\tserialized,\n\t\t\t\t\t\t\t\tmanager\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\tcase EShapeActionValueMiscType.LAYER_GESTURE:\n\t\t\t\t\t\t\treturn EShapeActionValueMiscLayerGesture.deserialize(\n\t\t\t\t\t\t\t\tserialized,\n\t\t\t\t\t\t\t\tmanager\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\treturn EShapeActionValueMisc.deserialize(serialized, manager);\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn new EShapeActionValueShowHide(EShapeActionValueShowHideType.SHOW, \"\");\n};\n"]}
|
package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-absolute.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { __extends } from "tslib";
|
|
6
6
|
import { EShapeRuntimeReset } from "../e-shape-runtime";
|
|
7
|
-
import {
|
|
7
|
+
import { toSizeNormalized } from "../variant/to-size-normalized";
|
|
8
8
|
import { EShapeActionRuntimeTransformResize } from "./e-shape-action-runtime-transform-resize";
|
|
9
9
|
var EShapeActionRuntimeTransformResizeHeightAbsolute = /** @class */ (function (_super) {
|
|
10
10
|
__extends(EShapeActionRuntimeTransformResizeHeightAbsolute, _super);
|
|
@@ -20,7 +20,7 @@ var EShapeActionRuntimeTransformResizeHeightAbsolute = /** @class */ (function (
|
|
|
20
20
|
var size = shape.size;
|
|
21
21
|
var writtenHeight = !!(runtime.written & EShapeRuntimeReset.HEIGHT);
|
|
22
22
|
var oldSizeY = writtenHeight ? size.y : runtime.size.y;
|
|
23
|
-
size.y =
|
|
23
|
+
size.y = toSizeNormalized(sizeAbsolute);
|
|
24
24
|
runtime.written |= EShapeRuntimeReset.HEIGHT;
|
|
25
25
|
this.adjustPosition(shape, runtime, 0, oldSizeY - size.y, 0.5, this.origin);
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-runtime-transform-resize-height-absolute.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-absolute.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAiB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"e-shape-action-runtime-transform-resize-height-absolute.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-absolute.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAiB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kCAAkC,EAAE,MAAM,2CAA2C,CAAC;AAG/F;IAAsE,oEAAkC;IAGvG,0DAAY,KAAuC;QAAnD,YACC,kBAAM,KAAK,EAAE,kBAAkB,CAAC,MAAM,CAAC,SAGvC;QAFA,KAAI,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC;QAC5B,KAAI,CAAC,KAAK,IAAI,kBAAkB,CAAC,QAAQ,CAAC;;IAC3C,CAAC;IAED,kEAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE;YAChC,IAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAC5C,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;YACxB,IAAM,aAAa,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;YACtE,IAAM,QAAQ,GAAG,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YACzD,IAAI,CAAC,CAAC,GAAG,gBAAgB,CAAC,YAAY,CAAC,CAAC;YACxC,OAAO,CAAC,OAAO,IAAI,kBAAkB,CAAC,MAAM,CAAC;YAC7C,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;SAC5E;IACF,CAAC;IACF,uDAAC;AAAD,CAAC,AApBD,CAAsE,kCAAkC,GAoBvG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"../e-shape\";\nimport { EShapeRuntime, EShapeRuntimeReset } from \"../e-shape-runtime\";\nimport { toSizeNormalized } from \"../variant/to-size-normalized\";\nimport { EShapeActionRuntimeTransformResize } from \"./e-shape-action-runtime-transform-resize\";\nimport { EShapeActionValueTransformResize } from \"./e-shape-action-value-transform-resize\";\n\nexport class EShapeActionRuntimeTransformResizeHeightAbsolute extends EShapeActionRuntimeTransformResize {\n\tprotected origin: number;\n\n\tconstructor(value: EShapeActionValueTransformResize) {\n\t\tsuper(value, EShapeRuntimeReset.HEIGHT);\n\t\tthis.origin = value.originY;\n\t\tthis.reset |= EShapeRuntimeReset.POSITION;\n\t}\n\n\texecute(shape: EShape, runtime: EShapeRuntime, time: number): void {\n\t\tif (this.condition(shape, time)) {\n\t\t\tconst sizeAbsolute = this.size(shape, time);\n\t\t\tconst size = shape.size;\n\t\t\tconst writtenHeight = !!(runtime.written & EShapeRuntimeReset.HEIGHT);\n\t\t\tconst oldSizeY = writtenHeight ? size.y : runtime.size.y;\n\t\t\tsize.y = toSizeNormalized(sizeAbsolute);\n\t\t\truntime.written |= EShapeRuntimeReset.HEIGHT;\n\t\t\tthis.adjustPosition(shape, runtime, 0, oldSizeY - size.y, 0.5, this.origin);\n\t\t}\n\t}\n}\n"]}
|
package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-relative.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { __extends } from "tslib";
|
|
6
6
|
import { EShapeRuntimeReset } from "../e-shape-runtime";
|
|
7
|
-
import {
|
|
7
|
+
import { toSizeNormalized } from "../variant/to-size-normalized";
|
|
8
8
|
import { EShapeActionRuntimeTransformResize } from "./e-shape-action-runtime-transform-resize";
|
|
9
9
|
var EShapeActionRuntimeTransformResizeHeightRelative = /** @class */ (function (_super) {
|
|
10
10
|
__extends(EShapeActionRuntimeTransformResizeHeightRelative, _super);
|
|
@@ -20,7 +20,7 @@ var EShapeActionRuntimeTransformResizeHeightRelative = /** @class */ (function (
|
|
|
20
20
|
var size = shape.size;
|
|
21
21
|
var writtenHeight = !!(runtime.written & EShapeRuntimeReset.HEIGHT);
|
|
22
22
|
var oldSizeY = writtenHeight ? size.y : runtime.size.y;
|
|
23
|
-
size.y =
|
|
23
|
+
size.y = toSizeNormalized(oldSizeY * sizeRelative);
|
|
24
24
|
runtime.written |= EShapeRuntimeReset.HEIGHT;
|
|
25
25
|
this.adjustPosition(shape, runtime, 0, oldSizeY - size.y, 0.5, this.origin);
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-runtime-transform-resize-height-relative.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-relative.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAiB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"e-shape-action-runtime-transform-resize-height-relative.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-relative.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAiB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kCAAkC,EAAE,MAAM,2CAA2C,CAAC;AAG/F;IAAsE,oEAAkC;IAGvG,0DAAY,KAAuC;QAAnD,YACC,kBAAM,KAAK,EAAE,kBAAkB,CAAC,MAAM,CAAC,SAGvC;QAFA,KAAI,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC;QAC5B,KAAI,CAAC,KAAK,IAAI,kBAAkB,CAAC,QAAQ,CAAC;;IAC3C,CAAC;IAED,kEAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE;YAChC,IAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAC5C,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;YACxB,IAAM,aAAa,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;YACtE,IAAM,QAAQ,GAAG,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YACzD,IAAI,CAAC,CAAC,GAAG,gBAAgB,CAAC,QAAQ,GAAG,YAAY,CAAC,CAAC;YACnD,OAAO,CAAC,OAAO,IAAI,kBAAkB,CAAC,MAAM,CAAC;YAC7C,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;SAC5E;IACF,CAAC;IACF,uDAAC;AAAD,CAAC,AApBD,CAAsE,kCAAkC,GAoBvG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"../e-shape\";\nimport { EShapeRuntime, EShapeRuntimeReset } from \"../e-shape-runtime\";\nimport { toSizeNormalized } from \"../variant/to-size-normalized\";\nimport { EShapeActionRuntimeTransformResize } from \"./e-shape-action-runtime-transform-resize\";\nimport { EShapeActionValueTransformResize } from \"./e-shape-action-value-transform-resize\";\n\nexport class EShapeActionRuntimeTransformResizeHeightRelative extends EShapeActionRuntimeTransformResize {\n\tprotected origin: number;\n\n\tconstructor(value: EShapeActionValueTransformResize) {\n\t\tsuper(value, EShapeRuntimeReset.HEIGHT);\n\t\tthis.origin = value.originY;\n\t\tthis.reset |= EShapeRuntimeReset.POSITION;\n\t}\n\n\texecute(shape: EShape, runtime: EShapeRuntime, time: number): void {\n\t\tif (this.condition(shape, time)) {\n\t\t\tconst sizeRelative = this.size(shape, time);\n\t\t\tconst size = shape.size;\n\t\t\tconst writtenHeight = !!(runtime.written & EShapeRuntimeReset.HEIGHT);\n\t\t\tconst oldSizeY = writtenHeight ? size.y : runtime.size.y;\n\t\t\tsize.y = toSizeNormalized(oldSizeY * sizeRelative);\n\t\t\truntime.written |= EShapeRuntimeReset.HEIGHT;\n\t\t\tthis.adjustPosition(shape, runtime, 0, oldSizeY - size.y, 0.5, this.origin);\n\t\t}\n\t}\n}\n"]}
|
package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-absolute.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { __extends } from "tslib";
|
|
6
6
|
import { EShapeRuntimeReset } from "../e-shape-runtime";
|
|
7
|
-
import {
|
|
7
|
+
import { toSizeNormalized } from "../variant/to-size-normalized";
|
|
8
8
|
import { EShapeActionRuntimeTransformResize } from "./e-shape-action-runtime-transform-resize";
|
|
9
9
|
var EShapeActionRuntimeTransformResizeSizeAbsolute = /** @class */ (function (_super) {
|
|
10
10
|
__extends(EShapeActionRuntimeTransformResizeSizeAbsolute, _super);
|
|
@@ -17,7 +17,7 @@ var EShapeActionRuntimeTransformResizeSizeAbsolute = /** @class */ (function (_s
|
|
|
17
17
|
}
|
|
18
18
|
EShapeActionRuntimeTransformResizeSizeAbsolute.prototype.execute = function (shape, runtime, time) {
|
|
19
19
|
if (this.condition(shape, time)) {
|
|
20
|
-
var sizeAbsolute =
|
|
20
|
+
var sizeAbsolute = toSizeNormalized(this.size(shape, time));
|
|
21
21
|
var size = shape.size;
|
|
22
22
|
var writtenWidth = !!(runtime.written & EShapeRuntimeReset.WIDTH);
|
|
23
23
|
var writtenHeight = !!(runtime.written & EShapeRuntimeReset.HEIGHT);
|
package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-absolute.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-runtime-transform-resize-size-absolute.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-absolute.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAiB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"e-shape-action-runtime-transform-resize-size-absolute.js","sourceRo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OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YACzD,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;YACrC,OAAO,CAAC,OAAO,IAAI,kBAAkB,CAAC,IAAI,CAAC;YAC3C,IAAI,CAAC,cAAc,CAClB,KAAK,EACL,OAAO,EACP,QAAQ,GAAG,IAAI,CAAC,CAAC,EACjB,QAAQ,GAAG,IAAI,CAAC,CAAC,EACjB,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,OAAO,CACZ,CAAC;SACF;IACF,CAAC;IACF,qDAAC;AAAD,CAAC,AA/BD,CAAoE,kCAAkC,GA+BrG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"../e-shape\";\nimport { EShapeRuntime, EShapeRuntimeReset } from \"../e-shape-runtime\";\nimport { toSizeNormalized } from \"../variant/to-size-normalized\";\nimport { EShapeActionRuntimeTransformResize } from \"./e-shape-action-runtime-transform-resize\";\nimport { EShapeActionValueTransformResize } from \"./e-shape-action-value-transform-resize\";\n\nexport class EShapeActionRuntimeTransformResizeSizeAbsolute extends EShapeActionRuntimeTransformResize {\n\tprotected originX: number;\n\tprotected originY: number;\n\n\tconstructor(value: EShapeActionValueTransformResize) {\n\t\tsuper(value, EShapeRuntimeReset.SIZE);\n\t\tthis.originX = value.originX;\n\t\tthis.originY = value.originY;\n\t\tthis.reset |= EShapeRuntimeReset.POSITION;\n\t}\n\n\texecute(shape: EShape, runtime: EShapeRuntime, time: number): void {\n\t\tif (this.condition(shape, time)) {\n\t\t\tconst sizeAbsolute = toSizeNormalized(this.size(shape, time));\n\t\t\tconst size = shape.size;\n\t\t\tconst writtenWidth = !!(runtime.written & EShapeRuntimeReset.WIDTH);\n\t\t\tconst writtenHeight = !!(runtime.written & EShapeRuntimeReset.HEIGHT);\n\t\t\tconst oldSizeX = writtenWidth ? size.x : runtime.size.x;\n\t\t\tconst oldSizeY = writtenHeight ? size.y : runtime.size.y;\n\t\t\tsize.set(sizeAbsolute, sizeAbsolute);\n\t\t\truntime.written |= EShapeRuntimeReset.SIZE;\n\t\t\tthis.adjustPosition(\n\t\t\t\tshape,\n\t\t\t\truntime,\n\t\t\t\toldSizeX - size.x,\n\t\t\t\toldSizeY - size.y,\n\t\t\t\tthis.originX,\n\t\t\t\tthis.originY\n\t\t\t);\n\t\t}\n\t}\n}\n"]}
|
package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-relative.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { __extends } from "tslib";
|
|
6
6
|
import { EShapeRuntimeReset } from "../e-shape-runtime";
|
|
7
|
-
import {
|
|
7
|
+
import { toSizeNormalized } from "../variant/to-size-normalized";
|
|
8
8
|
import { EShapeActionRuntimeTransformResize } from "./e-shape-action-runtime-transform-resize";
|
|
9
9
|
var EShapeActionRuntimeTransformResizeSizeRelative = /** @class */ (function (_super) {
|
|
10
10
|
__extends(EShapeActionRuntimeTransformResizeSizeRelative, _super);
|
|
@@ -23,7 +23,7 @@ var EShapeActionRuntimeTransformResizeSizeRelative = /** @class */ (function (_s
|
|
|
23
23
|
var writtenHeight = !!(runtime.written & EShapeRuntimeReset.HEIGHT);
|
|
24
24
|
var oldSizeX = writtenWidth ? size.x : runtime.size.x;
|
|
25
25
|
var oldSizeY = writtenHeight ? size.y : runtime.size.y;
|
|
26
|
-
size.set(
|
|
26
|
+
size.set(toSizeNormalized(oldSizeX * sizeRelative), toSizeNormalized(oldSizeY * sizeRelative));
|
|
27
27
|
runtime.written |= EShapeRuntimeReset.SIZE;
|
|
28
28
|
this.adjustPosition(shape, runtime, oldSizeX - size.x, oldSizeY - size.y, this.originX, this.originY);
|
|
29
29
|
}
|
package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-relative.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-runtime-transform-resize-size-relative.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-relative.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAiB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"e-shape-action-runtime-transform-resize-size-relative.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-size-relative.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAiB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kCAAkC,EAAE,MAAM,2CAA2C,CAAC;AAG/F;IAAoE,kEAAkC;IAIrG,wDAAY,KAAuC;QAAnD,YACC,kBAAM,KAAK,EAAE,kBAAkB,CAAC,IAAI,CAAC,SAIrC;QAHA,KAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC7B,KAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC7B,KAAI,CAAC,KAAK,IAAI,kBAAkB,CAAC,QAAQ,CAAC;;IAC3C,CAAC;IAED,gEAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE;YAChC,IAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAC5C,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;YACxB,IAAM,YAAY,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;YACpE,IAAM,aAAa,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;YACtE,IAAM,QAAQ,GAAG,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YACxD,IAAM,QAAQ,GAAG,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YACzD,IAAI,CAAC,GAAG,CACP,gBAAgB,CAAC,QAAQ,GAAG,YAAY,CAAC,EACzC,gBAAgB,CAAC,QAAQ,GAAG,YAAY,CAAC,CACzC,CAAC;YACF,OAAO,CAAC,OAAO,IAAI,kBAAkB,CAAC,IAAI,CAAC;YAC3C,IAAI,CAAC,cAAc,CAClB,KAAK,EACL,OAAO,EACP,QAAQ,GAAG,IAAI,CAAC,CAAC,EACjB,QAAQ,GAAG,IAAI,CAAC,CAAC,EACjB,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,OAAO,CACZ,CAAC;SACF;IACF,CAAC;IACF,qDAAC;AAAD,CAAC,AAlCD,CAAoE,kCAAkC,GAkCrG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"../e-shape\";\nimport { EShapeRuntime, EShapeRuntimeReset } from \"../e-shape-runtime\";\nimport { toSizeNormalized } from \"../variant/to-size-normalized\";\nimport { EShapeActionRuntimeTransformResize } from \"./e-shape-action-runtime-transform-resize\";\nimport { EShapeActionValueTransformResize } from \"./e-shape-action-value-transform-resize\";\n\nexport class EShapeActionRuntimeTransformResizeSizeRelative extends EShapeActionRuntimeTransformResize {\n\tprotected originX: number;\n\tprotected originY: number;\n\n\tconstructor(value: EShapeActionValueTransformResize) {\n\t\tsuper(value, EShapeRuntimeReset.SIZE);\n\t\tthis.originX = value.originX;\n\t\tthis.originY = value.originY;\n\t\tthis.reset |= EShapeRuntimeReset.POSITION;\n\t}\n\n\texecute(shape: EShape, runtime: EShapeRuntime, time: number): void {\n\t\tif (this.condition(shape, time)) {\n\t\t\tconst sizeRelative = this.size(shape, time);\n\t\t\tconst size = shape.size;\n\t\t\tconst writtenWidth = !!(runtime.written & EShapeRuntimeReset.WIDTH);\n\t\t\tconst writtenHeight = !!(runtime.written & EShapeRuntimeReset.HEIGHT);\n\t\t\tconst oldSizeX = writtenWidth ? size.x : runtime.size.x;\n\t\t\tconst oldSizeY = writtenHeight ? size.y : runtime.size.y;\n\t\t\tsize.set(\n\t\t\t\ttoSizeNormalized(oldSizeX * sizeRelative),\n\t\t\t\ttoSizeNormalized(oldSizeY * sizeRelative)\n\t\t\t);\n\t\t\truntime.written |= EShapeRuntimeReset.SIZE;\n\t\t\tthis.adjustPosition(\n\t\t\t\tshape,\n\t\t\t\truntime,\n\t\t\t\toldSizeX - size.x,\n\t\t\t\toldSizeY - size.y,\n\t\t\t\tthis.originX,\n\t\t\t\tthis.originY\n\t\t\t);\n\t\t}\n\t}\n}\n"]}
|
package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-absolute.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { __extends } from "tslib";
|
|
6
6
|
import { EShapeRuntimeReset } from "../e-shape-runtime";
|
|
7
|
-
import {
|
|
7
|
+
import { toSizeNormalized } from "../variant/to-size-normalized";
|
|
8
8
|
import { EShapeActionRuntimeTransformResize } from "./e-shape-action-runtime-transform-resize";
|
|
9
9
|
var EShapeActionRuntimeTransformResizeWidthAbsolute = /** @class */ (function (_super) {
|
|
10
10
|
__extends(EShapeActionRuntimeTransformResizeWidthAbsolute, _super);
|
|
@@ -20,7 +20,7 @@ var EShapeActionRuntimeTransformResizeWidthAbsolute = /** @class */ (function (_
|
|
|
20
20
|
var size = shape.size;
|
|
21
21
|
var writtenWidth = !!(runtime.written & EShapeRuntimeReset.WIDTH);
|
|
22
22
|
var oldSizeX = writtenWidth ? size.x : runtime.size.x;
|
|
23
|
-
size.x =
|
|
23
|
+
size.x = toSizeNormalized(sizeAbsolute);
|
|
24
24
|
runtime.written |= EShapeRuntimeReset.WIDTH;
|
|
25
25
|
this.adjustPosition(shape, runtime, oldSizeX - size.x, 0, this.origin, 0.5);
|
|
26
26
|
}
|
package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-absolute.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-runtime-transform-resize-width-absolute.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-absolute.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAiB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"e-shape-action-runtime-transform-resize-width-absolute.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-absolute.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAiB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kCAAkC,EAAE,MAAM,2CAA2C,CAAC;AAG/F;IAAqE,mEAAkC;IAGtG,yDAAY,KAAuC;QAAnD,YACC,kBAAM,KAAK,EAAE,kBAAkB,CAAC,KAAK,CAAC,SAGtC;QAFA,KAAI,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC;QAC5B,KAAI,CAAC,KAAK,IAAI,kBAAkB,CAAC,QAAQ,CAAC;;IAC3C,CAAC;IAED,iEAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE;YAChC,IAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAC5C,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;YACxB,IAAM,YAAY,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;YACpE,IAAM,QAAQ,GAAG,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YACxD,IAAI,CAAC,CAAC,GAAG,gBAAgB,CAAC,YAAY,CAAC,CAAC;YACxC,OAAO,CAAC,OAAO,IAAI,kBAAkB,CAAC,KAAK,CAAC;YAC5C,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;SAC5E;IACF,CAAC;IACF,sDAAC;AAAD,CAAC,AApBD,CAAqE,kCAAkC,GAoBtG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"../e-shape\";\nimport { EShapeRuntime, EShapeRuntimeReset } from \"../e-shape-runtime\";\nimport { toSizeNormalized } from \"../variant/to-size-normalized\";\nimport { EShapeActionRuntimeTransformResize } from \"./e-shape-action-runtime-transform-resize\";\nimport { EShapeActionValueTransformResize } from \"./e-shape-action-value-transform-resize\";\n\nexport class EShapeActionRuntimeTransformResizeWidthAbsolute extends EShapeActionRuntimeTransformResize {\n\tprotected origin: number;\n\n\tconstructor(value: EShapeActionValueTransformResize) {\n\t\tsuper(value, EShapeRuntimeReset.WIDTH);\n\t\tthis.origin = value.originX;\n\t\tthis.reset |= EShapeRuntimeReset.POSITION;\n\t}\n\n\texecute(shape: EShape, runtime: EShapeRuntime, time: number): void {\n\t\tif (this.condition(shape, time)) {\n\t\t\tconst sizeAbsolute = this.size(shape, time);\n\t\t\tconst size = shape.size;\n\t\t\tconst writtenWidth = !!(runtime.written & EShapeRuntimeReset.WIDTH);\n\t\t\tconst oldSizeX = writtenWidth ? size.x : runtime.size.x;\n\t\t\tsize.x = toSizeNormalized(sizeAbsolute);\n\t\t\truntime.written |= EShapeRuntimeReset.WIDTH;\n\t\t\tthis.adjustPosition(shape, runtime, oldSizeX - size.x, 0, this.origin, 0.5);\n\t\t}\n\t}\n}\n"]}
|
package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-relative.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { __extends } from "tslib";
|
|
6
6
|
import { EShapeRuntimeReset } from "../e-shape-runtime";
|
|
7
|
-
import {
|
|
7
|
+
import { toSizeNormalized } from "../variant/to-size-normalized";
|
|
8
8
|
import { EShapeActionRuntimeTransformResize } from "./e-shape-action-runtime-transform-resize";
|
|
9
9
|
var EShapeActionRuntimeTransformResizeWidthRelative = /** @class */ (function (_super) {
|
|
10
10
|
__extends(EShapeActionRuntimeTransformResizeWidthRelative, _super);
|
|
@@ -20,7 +20,7 @@ var EShapeActionRuntimeTransformResizeWidthRelative = /** @class */ (function (_
|
|
|
20
20
|
var size = shape.size;
|
|
21
21
|
var writtenWidth = !!(runtime.written & EShapeRuntimeReset.WIDTH);
|
|
22
22
|
var oldSizeX = writtenWidth ? size.x : runtime.size.x;
|
|
23
|
-
size.x =
|
|
23
|
+
size.x = toSizeNormalized(oldSizeX * sizeRelative);
|
|
24
24
|
runtime.written |= EShapeRuntimeReset.WIDTH;
|
|
25
25
|
this.adjustPosition(shape, runtime, oldSizeX - size.x, 0, this.origin, 0.5);
|
|
26
26
|
}
|
package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-relative.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-runtime-transform-resize-width-relative.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-relative.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAiB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"e-shape-action-runtime-transform-resize-width-relative.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-width-relative.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAiB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kCAAkC,EAAE,MAAM,2CAA2C,CAAC;AAG/F;IAAqE,mEAAkC;IAGtG,yDAAY,KAAuC;QAAnD,YACC,kBAAM,KAAK,EAAE,kBAAkB,CAAC,KAAK,CAAC,SAGtC;QAFA,KAAI,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC;QAC5B,KAAI,CAAC,KAAK,IAAI,kBAAkB,CAAC,QAAQ,CAAC;;IAC3C,CAAC;IAED,iEAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE;YAChC,IAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YAC5C,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;YACxB,IAAM,YAAY,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;YACpE,IAAM,QAAQ,GAAG,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YACxD,IAAI,CAAC,CAAC,GAAG,gBAAgB,CAAC,QAAQ,GAAG,YAAY,CAAC,CAAC;YACnD,OAAO,CAAC,OAAO,IAAI,kBAAkB,CAAC,KAAK,CAAC;YAC5C,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;SAC5E;IACF,CAAC;IACF,sDAAC;AAAD,CAAC,AApBD,CAAqE,kCAAkC,GAoBtG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"../e-shape\";\nimport { EShapeRuntime, EShapeRuntimeReset } from \"../e-shape-runtime\";\nimport { toSizeNormalized } from \"../variant/to-size-normalized\";\nimport { EShapeActionRuntimeTransformResize } from \"./e-shape-action-runtime-transform-resize\";\nimport { EShapeActionValueTransformResize } from \"./e-shape-action-value-transform-resize\";\n\nexport class EShapeActionRuntimeTransformResizeWidthRelative extends EShapeActionRuntimeTransformResize {\n\tprotected origin: number;\n\n\tconstructor(value: EShapeActionValueTransformResize) {\n\t\tsuper(value, EShapeRuntimeReset.WIDTH);\n\t\tthis.origin = value.originX;\n\t\tthis.reset |= EShapeRuntimeReset.POSITION;\n\t}\n\n\texecute(shape: EShape, runtime: EShapeRuntime, time: number): void {\n\t\tif (this.condition(shape, time)) {\n\t\t\tconst sizeRelative = this.size(shape, time);\n\t\t\tconst size = shape.size;\n\t\t\tconst writtenWidth = !!(runtime.written & EShapeRuntimeReset.WIDTH);\n\t\t\tconst oldSizeX = writtenWidth ? size.x : runtime.size.x;\n\t\t\tsize.x = toSizeNormalized(oldSizeX * sizeRelative);\n\t\t\truntime.written |= EShapeRuntimeReset.WIDTH;\n\t\t\tthis.adjustPosition(shape, runtime, oldSizeX - size.x, 0, this.origin, 0.5);\n\t\t}\n\t}\n}\n"]}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright (C) 2019 Toshiba Corporation
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
+
export * from "./deserialize-action-value";
|
|
5
6
|
export * from "./e-shape-action-bases";
|
|
6
7
|
export * from "./e-shape-action-expression";
|
|
7
8
|
export * from "./e-shape-action-expressions";
|
|
@@ -77,7 +78,6 @@ export * from "./e-shape-action-value-change-color";
|
|
|
77
78
|
export * from "./e-shape-action-value-change-cursor";
|
|
78
79
|
export * from "./e-shape-action-value-change-text-type";
|
|
79
80
|
export * from "./e-shape-action-value-change-text";
|
|
80
|
-
export * from "./e-shape-action-value-deserializer";
|
|
81
81
|
export * from "./e-shape-action-value-emit-event";
|
|
82
82
|
export * from "./e-shape-action-value-misc-emit-event";
|
|
83
83
|
export * from "./e-shape-action-value-misc-gesture-type";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kDAAkD,CAAC;AACjE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC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D,CAAC;AAChE,cAAc,0CAA0C,CAAC;AACzD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AACpD,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,oCAAoC,CAAC;AACnD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kDAAkD,CAAC;AACjE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,wCAAwC,CAAC;AACvD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,0CAA0C,CAAC;AACzD,cAAc,0CAA0C,CAAC;AACzD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,0CAA0C,CAAC;AACzD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAA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,0CAA0C,CAAC;AACzD,cAAc,mCAAmC,CAAC;AAClD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AACtD,cAAc,kCAAkC,CAAC;AACjD,cAAc,iCAAiC,CAAC;AAChD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,uCAAuC,CAAC;AACtD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,yCAAyC,CAAC;AACxD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,yCAAyC,CAAC;AACxD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from \"./deserialize-action-value\";\nexport * from \"./e-shape-action-bases\";\nexport * from \"./e-shape-action-expression\";\nexport * from \"./e-shape-action-expressions\";\nexport * from \"./e-shape-action-runtime-blink-brighten\";\nexport * from \"./e-shape-action-runtime-blink-color-fill\";\nexport * from \"./e-shape-action-runtime-blink-color-stroke\";\nexport * from \"./e-shape-action-runtime-blink-darken\";\nexport * from \"./e-shape-action-runtime-blink-opacity\";\nexport * from \"./e-shape-action-runtime-blink-visibility\";\nexport * from \"./e-shape-action-runtime-blink\";\nexport * from \"./e-shape-action-runtime-change-color-brightness\";\nexport * from \"./e-shape-action-runtime-change-color-code\";\nexport * from \"./e-shape-action-runtime-change-color\";\nexport * from \"./e-shape-action-runtime-change-cursor\";\nexport * from \"./e-shape-action-runtime-change-text-number\";\nexport * from \"./e-shape-action-runtime-change-text-text\";\nexport * from \"./e-shape-action-runtime-conditional\";\nexport * from \"./e-shape-action-runtime-emit-event\";\nexport * from \"./e-shape-action-runtime-misc-gesture\";\nexport * from \"./e-shape-action-runtime-misc-emit-event\";\nexport * from \"./e-shape-action-runtime-misc-html-element\";\nexport * from \"./e-shape-action-runtime-misc-input-input\";\nexport * from \"./e-shape-action-runtime-misc-input-integer\";\nexport * from \"./e-shape-action-runtime-misc-input-number\";\nexport * from \"./e-shape-action-runtime-misc-input-real\";\nexport * from \"./e-shape-action-runtime-misc-input-text\";\nexport * from \"./e-shape-action-runtime-misc-input\";\nexport * from \"./e-shape-action-runtime-misc-layer-gesture\";\nexport * from \"./e-shape-action-runtime-misc-layer-show-hide\";\nexport * from \"./e-shape-action-runtime-misc-write-both\";\nexport * from \"./e-shape-action-runtime-misc-write-local\";\nexport * from \"./e-shape-action-runtime-misc-write-remote\";\nexport * from \"./e-shape-action-runtime-misc-write\";\nexport * from \"./e-shape-action-runtime-open-diagram\";\nexport * from \"./e-shape-action-runtime-open-dialog-boolean\";\nexport * from \"./e-shape-action-runtime-open-dialog-integer\";\nexport * from \"./e-shape-action-runtime-open-dialog-real\";\nexport * from \"./e-shape-action-runtime-open-dialog-text\";\nexport * from \"./e-shape-action-runtime-open-dialog\";\nexport * from \"./e-shape-action-runtime-open-page-inplace\";\nexport * from \"./e-shape-action-runtime-open-page\";\nexport * from \"./e-shape-action-runtime-open\";\nexport * from \"./e-shape-action-runtime-show-hide\";\nexport * from \"./e-shape-action-runtime-transform-move-absolute-x\";\nexport * from \"./e-shape-action-runtime-transform-move-absolute-y\";\nexport * from \"./e-shape-action-runtime-transform-move-forward-or-backward\";\nexport * from \"./e-shape-action-runtime-transform-move-left-or-right\";\nexport * from \"./e-shape-action-runtime-transform-move-relative-x\";\nexport * from \"./e-shape-action-runtime-transform-move-relative-y\";\nexport * from \"./e-shape-action-runtime-transform-move\";\nexport * from \"./e-shape-action-runtime-transform-resize-height-absolute\";\nexport * from \"./e-shape-action-runtime-transform-resize-height-relative\";\nexport * from \"./e-shape-action-runtime-transform-resize-size-absolute\";\nexport * from \"./e-shape-action-runtime-transform-resize-size-relative\";\nexport * from \"./e-shape-action-runtime-transform-resize-width-absolute\";\nexport * from \"./e-shape-action-runtime-transform-resize-width-relative\";\nexport * from \"./e-shape-action-runtime-transform-resize\";\nexport * from \"./e-shape-action-runtime-transform-rotate-absolute\";\nexport * from \"./e-shape-action-runtime-transform-rotate-relative\";\nexport * from \"./e-shape-action-runtime-transform-rotate\";\nexport * from \"./e-shape-action-runtime\";\nexport * from \"./e-shape-action-runtimes\";\nexport * from \"./e-shape-action-value-base\";\nexport * from \"./e-shape-action-value-blink-type\";\nexport * from \"./e-shape-action-value-blink\";\nexport * from \"./e-shape-action-value-change-color-brightness\";\nexport * from \"./e-shape-action-value-change-color-code\";\nexport * from \"./e-shape-action-value-change-color-target\";\nexport * from \"./e-shape-action-value-change-color-type-legacy\";\nexport * from \"./e-shape-action-value-change-color-type\";\nexport * from \"./e-shape-action-value-change-color-types\";\nexport * from \"./e-shape-action-value-change-color\";\nexport * from \"./e-shape-action-value-change-cursor\";\nexport * from \"./e-shape-action-value-change-text-type\";\nexport * from \"./e-shape-action-value-change-text\";\nexport * from \"./e-shape-action-value-emit-event\";\nexport * from \"./e-shape-action-value-misc-emit-event\";\nexport * from \"./e-shape-action-value-misc-gesture-type\";\nexport * from \"./e-shape-action-value-misc-gesture\";\nexport * from \"./e-shape-action-value-misc-html-element\";\nexport * from \"./e-shape-action-value-misc-input\";\nexport * from \"./e-shape-action-value-misc-layer-gesture\";\nexport * from \"./e-shape-action-value-misc-layer-show-hide\";\nexport * from \"./e-shape-action-value-misc-type\";\nexport * from \"./e-shape-action-value-misc-write\";\nexport * from \"./e-shape-action-value-misc\";\nexport * from \"./e-shape-action-value-on-input-action\";\nexport * from \"./e-shape-action-value-on-input-actions\";\nexport * from \"./e-shape-action-value-open-type\";\nexport * from \"./e-shape-action-value-open\";\nexport * from \"./e-shape-action-value-opetyped\";\nexport * from \"./e-shape-action-value-show-hide-type\";\nexport * from \"./e-shape-action-value-show-hide\";\nexport * from \"./e-shape-action-value-subtyped\";\nexport * from \"./e-shape-action-value-transform-move-type\";\nexport * from \"./e-shape-action-value-transform-move\";\nexport * from \"./e-shape-action-value-transform-resize-type\";\nexport * from \"./e-shape-action-value-transform-resize\";\nexport * from \"./e-shape-action-value-transform-rotate-type\";\nexport * from \"./e-shape-action-value-transform-rotate\";\nexport * from \"./e-shape-action-value-transform-type\";\nexport * from \"./e-shape-action-value-type\";\nexport * from \"./e-shape-action-value\";\nexport * from \"./e-shape-action-values\";\nexport * from \"./e-shape-action\";\n"]}
|
|
@@ -5,14 +5,35 @@
|
|
|
5
5
|
var EShapeConnectorBodies = /** @class */ (function () {
|
|
6
6
|
function EShapeConnectorBodies() {
|
|
7
7
|
}
|
|
8
|
-
EShapeConnectorBodies.from = function (values) {
|
|
8
|
+
EShapeConnectorBodies.from = function (values, tailMargin, headMargin) {
|
|
9
9
|
var result = [];
|
|
10
10
|
var length = values.length;
|
|
11
11
|
if (4 < length) {
|
|
12
|
+
var threshold = 0.000001;
|
|
12
13
|
var x0 = values[0];
|
|
13
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
|
+
}
|
|
14
25
|
var x1 = values[length - 2];
|
|
15
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
|
+
}
|
|
16
37
|
var cx = (x1 + x0) * 0.5;
|
|
17
38
|
var cy = (y1 + y0) * 0.5;
|
|
18
39
|
var dx = x1 - x0;
|
|
@@ -21,11 +42,11 @@ var EShapeConnectorBodies = /** @class */ (function () {
|
|
|
21
42
|
var c = Math.cos(a);
|
|
22
43
|
var s = Math.sin(a);
|
|
23
44
|
var l = dx * dx + dy * dy;
|
|
24
|
-
var m =
|
|
45
|
+
var m = threshold < l ? 1 / Math.sqrt(l) : 1;
|
|
25
46
|
for (var i = 2, imax = length - 2; i < imax; i += 2) {
|
|
26
47
|
var x = values[i + 0] - cx;
|
|
27
48
|
var y = values[i + 1] - cy;
|
|
28
|
-
result.push((c * x
|
|
49
|
+
result.push((c * x + s * y) * m, (c * y - s * x) * m);
|
|
29
50
|
}
|
|
30
51
|
}
|
|
31
52
|
return result;
|
|
@@ -1 +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;
|
|
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,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(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"]}
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
* Copyright (C) 2019 Toshiba Corporation
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
+
/**
|
|
6
|
+
* Mappings of shape types and deserializers.
|
|
7
|
+
*/
|
|
5
8
|
export var EShapeDeserializers = {};
|
|
6
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Mappings of shape types and `onDeserialized` handlers.
|
|
11
|
+
*/
|
|
12
|
+
export var EShapeOnDeserializeds = {};
|
|
7
13
|
//# sourceMappingURL=e-shape-deserializers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-deserializers.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-deserializers.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"e-shape-deserializers.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-deserializers.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAeH;;GAEG;AACH,MAAM,CAAC,IAAM,mBAAmB,GAAuD,EAAE,CAAC;AAY1F;;GAEG;AACH,MAAM,CAAC,IAAM,qBAAqB,GAAyD,EAAE,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramSerializedItem } from \"../d-diagram-serialized\";\nimport { EShape } from \"./e-shape\";\nimport { EShapeResourceManagerDeserialization } from \"./e-shape-resource-manager-deserialization\";\nimport { EShapeUuidMapping } from \"./e-shape-uuid-mapping\";\n\n/**\n * A shape deserializer\n */\nexport type EShapeDeserializer = (\n\titem: DDiagramSerializedItem,\n\tmanager: EShapeResourceManagerDeserialization\n) => Promise<EShape> | EShape | null;\n\n/**\n * Mappings of shape types and deserializers.\n */\nexport const EShapeDeserializers: { [type: number]: EShapeDeserializer | undefined } = {};\n\n/**\n * A handler which is called after the deserializations of all the shapes are completed.\n */\nexport type EShapeOnDeserialized = (\n\titem: DDiagramSerializedItem,\n\tshape: EShape,\n\tmapping: EShapeUuidMapping,\n\tmanager: EShapeResourceManagerDeserialization\n) => void;\n\n/**\n * Mappings of shape types and `onDeserialized` handlers.\n */\nexport const EShapeOnDeserializeds: { [type: number]: EShapeOnDeserialized | undefined } = {};\n"]}
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { EShapeEditor } from "./e-shape-editor";
|
|
6
|
-
import { EShapeSizes } from "./e-shape-sizes";
|
|
7
6
|
import { EShapeBase } from "./variant/e-shape-base";
|
|
7
|
+
import { toSizeNormalized } from "./variant/to-size-normalized";
|
|
8
8
|
var EShapeTransforms = /** @class */ (function () {
|
|
9
9
|
function EShapeTransforms() {
|
|
10
10
|
}
|
|
11
11
|
EShapeTransforms.prepare = function (shape) {
|
|
12
12
|
var editor = shape.editor || new EShapeEditor();
|
|
13
13
|
shape.editor = editor;
|
|
14
|
-
//
|
|
14
|
+
// Transform
|
|
15
15
|
shape.updateTransform();
|
|
16
16
|
var parent = shape.parent;
|
|
17
17
|
if (parent instanceof EShapeBase) {
|
|
@@ -82,7 +82,7 @@ var EShapeTransforms = /** @class */ (function () {
|
|
|
82
82
|
if (bx != null && by != null) {
|
|
83
83
|
var sx = Math.sqrt(a * a + b * b);
|
|
84
84
|
var sy = Math.sqrt(c * c + d * d);
|
|
85
|
-
shape.size.set(
|
|
85
|
+
shape.size.set(toSizeNormalized(bx * sx), toSizeNormalized(by * sy));
|
|
86
86
|
}
|
|
87
87
|
//
|
|
88
88
|
shape.allowUploadedUpdate();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-transforms.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-transforms.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"e-shape-transforms.js","sour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SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Matrix } from \"pixi.js\";\nimport { EShape } from \"./e-shape\";\nimport { EShapeEditor } from \"./e-shape-editor\";\nimport { EShapeBase } from \"./variant/e-shape-base\";\nimport { toSizeNormalized } from \"./variant/to-size-normalized\";\n\nexport class EShapeTransforms {\n\tstatic prepare(shape: EShape): void {\n\t\tconst editor = shape.editor || new EShapeEditor();\n\t\tshape.editor = editor;\n\n\t\t// Transform\n\t\tshape.updateTransform();\n\t\tconst parent = shape.parent;\n\t\tif (parent instanceof EShapeBase) {\n\t\t\tparent.transform.internalTransform\n\t\t\t\t.copyTo(editor.internalTransformParentInverse)\n\t\t\t\t.invert();\n\t\t} else {\n\t\t\teditor.internalTransformParentInverse.identity();\n\t\t}\n\t\tshape.transform.internalTransform.copyTo(editor.internalTransform);\n\n\t\t// Rotation\n\t\teditor.rotation = shape.transform.rotation;\n\n\t\t// Size\n\t\teditor.size.copyFrom(shape.size);\n\n\t\t//\n\t\tshape.disallowOnTransformChange();\n\t}\n\n\tstatic finalize(shape: EShape): void {\n\t\tshape.allowOnTransformChange(true);\n\t}\n\n\tstatic apply(shape: EShape, transform: Matrix, keepSize: boolean): void {\n\t\tconst editor = shape.editor;\n\t\tif (editor != null) {\n\t\t\tconst newLocalTransform = editor.localTransform;\n\t\t\teditor.internalTransformParentInverse\n\t\t\t\t.copyTo(newLocalTransform)\n\t\t\t\t.append(transform)\n\t\t\t\t.append(editor.internalTransform);\n\t\t\tif (keepSize) {\n\t\t\t\tthis.applyLocal(shape, newLocalTransform);\n\t\t\t} else {\n\t\t\t\tconst size = editor.size;\n\t\t\t\tthis.applyLocal(shape, newLocalTransform, size.x, size.y);\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic applyLocal(shape: EShape, localTransform: Matrix, bx?: number, by?: number): void {\n\t\tshape.disallowUploadedUpdate();\n\n\t\t// Reconstruct the position, the rotation and the size\n\t\tconst a = localTransform.a;\n\t\tconst b = localTransform.b;\n\t\tconst c = localTransform.c;\n\t\tconst d = localTransform.d;\n\t\tconst tx = localTransform.tx;\n\t\tconst ty = localTransform.ty;\n\n\t\t// Rotation\n\t\tconst transform = shape.transform;\n\t\tconst rx = Math.atan2(-c, d); // rotation - skewX\n\t\tconst ry = Math.atan2(+b, a); // rotation + skewY\n\t\ttransform.rotation = (rx + ry) * 0.5; // Here, assumes `skewX` === `skewY`\n\n\t\t// Skew\n\t\tconst skew = (ry - rx) * 0.5;\n\t\ttransform.skew.set(skew, skew);\n\n\t\t// Position: Assumes the pivot is invariant.\n\t\t// tx = position.x - (a * px + c * py)\n\t\t// ty = position.y - (b * px + d * py)\n\t\t//\n\t\t// Thus,\n\t\t// position.x = tx + (a * px + c * py)\n\t\t// position.y = ty + (b * px + d * py)\n\t\tconst pivot = transform.pivot;\n\t\tconst px = pivot.x;\n\t\tconst py = pivot.y;\n\t\ttransform.position.set(tx + (a * px + c * py), ty + (b * px + d * py));\n\n\t\t// Scale\n\t\tif (bx != null && by != null) {\n\t\t\tconst sx = Math.sqrt(a * a + b * b);\n\t\t\tconst sy = Math.sqrt(c * c + d * d);\n\t\t\tshape.size.set(toSizeNormalized(bx * sx), toSizeNormalized(by * sy));\n\t\t}\n\n\t\t//\n\t\tshape.allowUploadedUpdate();\n\t}\n}\n"]}
|