@wcardinal/wcardinal-ui 0.197.0 → 0.198.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/shape/action/e-shape-action-environment.d.ts +8 -0
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-expression-with-parameter.d.ts +10 -0
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-expression.d.ts +7 -2
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-expressions.d.ts +5 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtime-misc-html-element.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/index.d.ts +2 -0
- package/dist/wcardinal/ui/d-diagram-canvas.js +3 -0
- package/dist/wcardinal/ui/d-diagram-canvas.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-environment.js +13 -0
- package/dist/wcardinal/ui/shape/action/e-shape-action-environment.js.map +1 -0
- package/dist/wcardinal/ui/shape/action/e-shape-action-expression-with-parameter.js +6 -0
- package/dist/wcardinal/ui/shape/action/e-shape-action-expression-with-parameter.js.map +1 -0
- package/dist/wcardinal/ui/shape/action/e-shape-action-expression.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-expressions.js +11 -6
- package/dist/wcardinal/ui/shape/action/e-shape-action-expressions.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-blink.js +2 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-blink.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-change-color-brightness.js +3 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-change-color-brightness.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-change-color-code.js +5 -4
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-change-color-code.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-change-color.js +3 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-change-color.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-change-cursor.js +3 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-change-cursor.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-change-text-number.js +3 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-change-text-number.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-change-text-text.js +3 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-change-text-text.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-emit-event.js +3 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-emit-event.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-gesture-layer.js +3 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-gesture-layer.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-gesture-shape.js +2 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-gesture-shape.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-emit-event.js +3 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-emit-event.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-execute.js +3 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-execute.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-html-element-base.js +2 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-html-element-base.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-html-element.js +2 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-html-element.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-input.js +2 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-input.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-write.js +4 -3
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-write.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-extension.js +3 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-extension.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog.js +4 -3
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open.js +3 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-show-hide-layer.js +2 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-show-hide-layer.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-show-hide-shape.js +2 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-show-hide-shape.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-show-hide.js +2 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-show-hide.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-move-absolute-x.js +3 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-move-absolute-x.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-move-absolute-y.js +3 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-move-absolute-y.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-move-forward-or-backward.js +3 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-move-forward-or-backward.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-move-left-or-right.js +3 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-move-left-or-right.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-move-relative-x.js +3 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-move-relative-x.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-move-relative-y.js +3 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-move-relative-y.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-resize-height-absolute.js +3 -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 +3 -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 +3 -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 +3 -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 +3 -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 +3 -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/e-shape-action-runtime-transform-rotate-absolute.js +3 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-rotate-absolute.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-rotate-relative.js +3 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-transform-rotate-relative.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/index.js +2 -0
- package/dist/wcardinal/ui/shape/action/index.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 +96 -74
- package/dist/wcardinal-ui.js +96 -74
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* {@link EShape} action environment.
|
|
3
|
+
*
|
|
4
|
+
* In action expressions, all the properties in this object can be accessed without `EShapeActionEnvironment.`.
|
|
5
|
+
* For instance, if this object has a property of the name `apple`, the string `apple` is a valid expression
|
|
6
|
+
* and is equivalent to `EShapeActionEnvironment.apple`.
|
|
7
|
+
*/
|
|
8
|
+
export declare const EShapeActionEnvironment: Record<string, unknown>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { EShape } from "../e-shape";
|
|
2
|
+
/**
|
|
3
|
+
* {@link EShape} action expression with one parameter.
|
|
4
|
+
*
|
|
5
|
+
* In action expressions, all the properties in {@link EShape}, {@link EShapeState} and {@link EShapeActionEnvironment} can be accessed directly.
|
|
6
|
+
* For instance, the string `isClicked` is a valid expression as {@link EShapeState} has {@link EShapeState#isClicked} and is equivalent to `shape.state.isClicked`.
|
|
7
|
+
* In addition to that, the parameter passed to this function can be used in action expressions.
|
|
8
|
+
* The name of the variable containing that parameter depends on actions.
|
|
9
|
+
*/
|
|
10
|
+
export declare type EShapeActionExpressionWithParameter<T, P> = (shape: EShape, time: number, environment: Record<string, unknown>, parameter: P) => T;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { EShape } from "../e-shape";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* {@link EShape} action expression.
|
|
4
|
+
*
|
|
5
|
+
* In action expressions, all the properties in {@link EShape}, {@link EShapeState} and {@link EShapeActionEnvironment} can be accessed directly.
|
|
6
|
+
* For instance, the string `isClicked` is a valid expression as {@link EShapeState} has {@link EShapeState#isClicked} and is equivalent to `shape.state.isClicked`.
|
|
7
|
+
*/
|
|
8
|
+
export declare type EShapeActionExpression<T> = (shape: EShape, time: number, environment: Record<string, unknown>) => T;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { EShapeActionExpression
|
|
1
|
+
import { EShapeActionExpression } from "./e-shape-action-expression";
|
|
2
|
+
import { EShapeActionExpressionWithParameter } from "./e-shape-action-expression-with-parameter";
|
|
3
|
+
/**
|
|
4
|
+
* {@link EShape} action expression utility class.
|
|
5
|
+
*/
|
|
2
6
|
export declare class EShapeActionExpressions {
|
|
3
7
|
static NULL: () => null;
|
|
4
8
|
static ZERO: () => number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UtilHtmlElement, UtilHtmlElementCreator } from "../../util/util-html-element";
|
|
2
2
|
import { EShape } from "../e-shape";
|
|
3
3
|
import { EShapeRuntime } from "../e-shape-runtime";
|
|
4
|
-
import { EShapeActionExpressionWithParameter } from "./e-shape-action-expression";
|
|
4
|
+
import { EShapeActionExpressionWithParameter } from "./e-shape-action-expression-with-parameter";
|
|
5
5
|
import { EShapeActionRuntimeMiscHtmlElementBase } from "./e-shape-action-runtime-misc-html-element-base";
|
|
6
6
|
import { EShapeActionValueMisc } from "./e-shape-action-value-misc";
|
|
7
7
|
export declare class EShapeActionRuntimeMiscHtmlElement<ELEMENT extends HTMLElement = HTMLElement, UTIL extends UtilHtmlElement<ELEMENT> = UtilHtmlElement<ELEMENT>> extends EShapeActionRuntimeMiscHtmlElementBase<ELEMENT, UTIL> {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from "./deserialize-action-value";
|
|
2
2
|
export * from "./e-shape-action-bases";
|
|
3
|
+
export * from "./e-shape-action-environment";
|
|
4
|
+
export * from "./e-shape-action-expression-with-parameter";
|
|
3
5
|
export * from "./e-shape-action-expression";
|
|
4
6
|
export * from "./e-shape-action-expressions";
|
|
5
7
|
export * from "./e-shape-action-open-dialog-extension";
|
|
@@ -18,6 +18,7 @@ import { DDiagramCanvasTickerImpl } from "./d-diagram-canvas-ticker-impl";
|
|
|
18
18
|
import { EShapeDataValueScope } from "./shape/e-shape-data-value-scope";
|
|
19
19
|
import { EShapeEmbedded } from "./shape/variant/e-shape-embedded";
|
|
20
20
|
import { EShapeDataValueExtensions } from "./shape/e-shape-data-value-extensions";
|
|
21
|
+
import { EShapeActionEnvironment } from "./shape/action/e-shape-action-environment";
|
|
21
22
|
var DDiagramCanvas = /** @class */ (function (_super) {
|
|
22
23
|
__extends(DDiagramCanvas, _super);
|
|
23
24
|
function DDiagramCanvas(options) {
|
|
@@ -61,12 +62,14 @@ var DDiagramCanvas = /** @class */ (function (_super) {
|
|
|
61
62
|
for (var i = 0, imax = layers.length; i < imax; ++i) {
|
|
62
63
|
layers[i].initialize(actionables);
|
|
63
64
|
}
|
|
65
|
+
EShapeActionEnvironment.isInitializing = true;
|
|
64
66
|
for (var i = 0, imax = layers.length; i < imax; ++i) {
|
|
65
67
|
var layerChildren = layers[i].children;
|
|
66
68
|
for (var j = 0, jmax = layerChildren.length; j < jmax; ++j) {
|
|
67
69
|
layerChildren[j].update(time);
|
|
68
70
|
}
|
|
69
71
|
}
|
|
72
|
+
EShapeActionEnvironment.isInitializing = false;
|
|
70
73
|
this._ticker.start();
|
|
71
74
|
};
|
|
72
75
|
DDiagramCanvas.prototype.initialize_ = function (shapes, dataShape, mapper, formatToFormatter, initialToInitialValue, actionValueToRuntime, canvasTicker, canvasShape, canvasData, actionables) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-diagram-canvas.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-diagram-canvas.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAuB,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DX-License-Identifier: Apache-2.0\n */\n\nimport { interaction, IPoint, Point, Renderer } from \"pixi.js\";\nimport { DApplications } from \"./d-applications\";\nimport {\n\tDDiagramCanvasBase,\n\tDDiagramCanvasBaseOptions,\n\tDThemeDiagramCanvasBase\n} from \"./d-diagram-canvas-base\";\nimport { EShape } from \"./shape/e-shape\";\nimport { EShapeBase } from \"./shape/variant/e-shape-base\";\nimport { UtilPointerEvent } from \"./util/util-pointer-event\";\nimport { EShapeActionValue } from \"./shape/action/e-shape-action-value\";\nimport { EShapeActionRuntime } from \"./shape/action/e-shape-action-runtime\";\nimport { DDiagramDataMapper } from \"./d-diagram-data-mapper\";\nimport { EShapeRuntimes } from \"./shape/e-shape-runtimes\";\nimport { EShapeRuntime } from \"./shape/e-shape-runtime\";\nimport { EShapeDataValue } from \"./shape/e-shape-data-value\";\nimport { EShapeDataValueType } from \"./shape/e-shape-data-value-type\";\nimport { EShapeContainer } from \"./shape/e-shape-container\";\nimport { UtilKeyboardEvent } from \"./util/util-keyboard-event\";\nimport { DDiagramCanvasData } from \"./d-diagram-canvas-data\";\nimport { DDiagramCanvasDataImpl } from \"./d-diagram-canvas-data-impl\";\nimport { DDiagramCanvasShape } from \"./d-diagram-canvas-shape\";\nimport { DDiagramCanvasShapeImpl } from \"./d-diagram-canvas-shape-impl\";\nimport { DDiagramCanvasTicker } from \"./d-diagram-canvas-ticker\";\nimport { DDiagramCanvasTickerImpl } from \"./d-diagram-canvas-ticker-impl\";\nimport { EShapeDataValueScope } from \"./shape/e-shape-data-value-scope\";\nimport { EShapeEmbedded } from \"./shape/variant/e-shape-embedded\";\nimport { EShapeDataValueExtensions } from \"./shape/e-shape-data-value-extensions\";\n\nexport interface DDiagramCanvasOptions<THEME extends DThemeDiagramCanvas = DThemeDiagramCanvas>\n\textends DDiagramCanvasBaseOptions<THEME> {}\n\nexport interface DThemeDiagramCanvas extends DThemeDiagramCanvasBase {}\n\nexport class DDiagramCanvas<\n\tTHEME extends DThemeDiagramCanvas = DThemeDiagramCanvas,\n\tOPTIONS extends DDiagramCanvasOptions<THEME> = DDiagramCanvasOptions<THEME>\n> extends DDiagramCanvasBase<THEME, OPTIONS> {\n\tprotected static WORK_DBLCLICK?: Point;\n\n\tprotected _data: DDiagramCanvasData;\n\tprotected _shape: DDiagramCanvasShape;\n\tprotected _ticker: DDiagramCanvasTicker;\n\tprotected _actionables: EShape[];\n\n\tprotected _overed?: EShape | null;\n\tprotected _downed?: EShape | null;\n\tprotected _downeds: Set<EShape>;\n\n\tprotected _updateBound: () => void;\n\n\tconstructor(options: OPTIONS) {\n\t\tsuper(options);\n\t\tthis._data = new DDiagramCanvasDataImpl();\n\t\tthis._shape = new DDiagramCanvasShapeImpl();\n\t\tthis._ticker = new DDiagramCanvasTickerImpl(this);\n\t\tthis._actionables = [];\n\t\tthis._downeds = new Set<EShape>();\n\t\tthis._updateBound = (): void => {\n\t\t\tDApplications.update(this);\n\t\t};\n\t}\n\n\tget data(): DDiagramCanvasData {\n\t\treturn this._data;\n\t}\n\n\tget shape(): DDiagramCanvasShape {\n\t\treturn this._shape;\n\t}\n\n\tget ticker(): DDiagramCanvasTicker {\n\t\treturn this._ticker;\n\t}\n\n\tinitialize(shapes: EShape[], mapper?: DDiagramDataMapper | null): void {\n\t\tconst time = Date.now();\n\t\tconst actionables = this._actionables;\n\t\tthis.initialize_(\n\t\t\tshapes,\n\t\t\tnull,\n\t\t\tmapper,\n\t\t\tnew Map<string, (value: unknown) => unknown>(),\n\t\t\tnew Map<string, unknown>(),\n\t\t\tnew Map<EShapeActionValue, EShapeActionRuntime>(),\n\t\t\tthis._ticker,\n\t\t\tthis._shape,\n\t\t\tthis._data,\n\t\t\tactionables\n\t\t);\n\t\tconst layers = this._layer.children;\n\t\tfor (let i = 0, imax = layers.length; i < imax; ++i) {\n\t\t\tlayers[i].initialize(actionables);\n\t\t}\n\t\tfor (let i = 0, imax = layers.length; i < imax; ++i) {\n\t\t\tconst layerChildren = layers[i].children;\n\t\t\tfor (let j = 0, jmax = layerChildren.length; j < jmax; ++j) {\n\t\t\t\tlayerChildren[j].update(time);\n\t\t\t}\n\t\t}\n\t\tthis._ticker.start();\n\t}\n\n\tprotected initialize_(\n\t\tshapes: EShape[],\n\t\tdataShape: EShape | null,\n\t\tmapper: DDiagramDataMapper | null | undefined,\n\t\tformatToFormatter: Map<string, (value: unknown) => unknown>,\n\t\tinitialToInitialValue: Map<string, unknown>,\n\t\tactionValueToRuntime: Map<EShapeActionValue, EShapeActionRuntime>,\n\t\tcanvasTicker: DDiagramCanvasTicker,\n\t\tcanvasShape: DDiagramCanvasShape,\n\t\tcanvasData: DDiagramCanvasData,\n\t\tactionables: EShape[]\n\t): void {\n\t\tfor (let i = 0, imax = shapes.length; i < imax; ++i) {\n\t\t\tconst shape = shapes[i];\n\n\t\t\t// ID\n\t\t\tconst id = shape.id;\n\t\t\tif (0 < id.length) {\n\t\t\t\tcanvasShape.add(id, shape);\n\t\t\t}\n\n\t\t\t// Data\n\t\t\tthis.initData(\n\t\t\t\tshape,\n\t\t\t\tdataShape,\n\t\t\t\tmapper,\n\t\t\t\tformatToFormatter,\n\t\t\t\tinitialToInitialValue,\n\t\t\t\tcanvasTicker,\n\t\t\t\tcanvasData\n\t\t\t);\n\n\t\t\t// Runtime\n\t\t\tconst runtime = new (EShapeRuntimes[shape.type] || EShapeRuntime)(shape);\n\t\t\tshape.runtime = runtime;\n\n\t\t\t// Action\n\t\t\tthis.initActions(shape, runtime, actionValueToRuntime);\n\n\t\t\t// Actionables\n\t\t\tif (runtime.isActionable()) {\n\t\t\t\tactionables.push(shape);\n\t\t\t}\n\n\t\t\t// Shortcut\n\t\t\tconst shortcut = shape.shortcut;\n\t\t\tif (shortcut != null) {\n\t\t\t\tUtilKeyboardEvent.on(shape, shortcut, (e: KeyboardEvent): void => {\n\t\t\t\t\truntime.onClick(shape, e);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Init the runtime\n\t\t\truntime.initialize(shape);\n\n\t\t\t// Children\n\t\t\tconst children = shape.children;\n\t\t\tif (0 < children.length) {\n\t\t\t\tthis.initialize_(\n\t\t\t\t\tchildren,\n\t\t\t\t\tthis.toDataShape(dataShape, shape),\n\t\t\t\t\tmapper,\n\t\t\t\t\tformatToFormatter,\n\t\t\t\t\tinitialToInitialValue,\n\t\t\t\t\tactionValueToRuntime,\n\t\t\t\t\tcanvasTicker,\n\t\t\t\t\tcanvasShape,\n\t\t\t\t\tcanvasData,\n\t\t\t\t\tactionables\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected initData(\n\t\tshape: EShape,\n\t\tdataShape: EShape | null,\n\t\tmapper: DDiagramDataMapper | null | undefined,\n\t\tformatToFormatter: Map<string, (value: unknown) => unknown>,\n\t\tinitialToInitialValue: Map<string, unknown>,\n\t\tcanvasTicker: DDiagramCanvasTicker,\n\t\tcanvasData: DDiagramCanvasData\n\t): void {\n\t\tconst data = shape.data;\n\t\tfor (let i = 0, imax = data.size(); i < imax; ++i) {\n\t\t\tconst value = data.get(i);\n\t\t\tif (value) {\n\t\t\t\tconst type = value.type;\n\t\t\t\tconst format = value.format;\n\t\t\t\tconst initial = value.initial;\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase EShapeDataValueType.NUMBER:\n\t\t\t\t\tcase EShapeDataValueType.NUMBER_ARRAY:\n\t\t\t\t\tcase EShapeDataValueType.STRING:\n\t\t\t\t\tcase EShapeDataValueType.STRING_ARRAY:\n\t\t\t\t\tcase EShapeDataValueType.OBJECT:\n\t\t\t\t\tcase EShapeDataValueType.OBJECT_ARRAY:\n\t\t\t\t\t\t// Mapping\n\t\t\t\t\t\tif (value.scope === EShapeDataValueScope.PRIVATE) {\n\t\t\t\t\t\t\tconst id = value.id;\n\t\t\t\t\t\t\tif (0 < id.length) {\n\t\t\t\t\t\t\t\tif (dataShape) {\n\t\t\t\t\t\t\t\t\tdataShape.data.private.add(id, value);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcanvasData.private.add(id, value);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (value.scope === EShapeDataValueScope.PROTECTED) {\n\t\t\t\t\t\t\tconst id = value.id;\n\t\t\t\t\t\t\tif (0 < id.length) {\n\t\t\t\t\t\t\t\tcanvasData.protected.add(id, value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (mapper) {\n\t\t\t\t\t\t\t\tmapper(value, dataShape || shape);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst id = value.id;\n\t\t\t\t\t\t\tif (0 < id.length) {\n\t\t\t\t\t\t\t\tcanvasData.add(id, value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Format\n\t\t\t\t\t\tif (formatToFormatter.has(format)) {\n\t\t\t\t\t\t\tvalue.formatter = formatToFormatter.get(format);\n\t\t\t\t\t\t} else if (0 < format.length) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst formatter = this.calcFormatter(value, format, initial);\n\t\t\t\t\t\t\t\tformatToFormatter.set(format, formatter);\n\t\t\t\t\t\t\t\tvalue.formatter = formatter;\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\t// DO NOTHING\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Initial\n\t\t\t\t\t\tif (initialToInitialValue.has(initial)) {\n\t\t\t\t\t\t\tvalue.value = initialToInitialValue.get(initial);\n\t\t\t\t\t\t} else if (0 < initial.length) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst initialValue = this.calcInitial(value, initial);\n\t\t\t\t\t\t\t\tinitialToInitialValue.set(initial, initialValue);\n\t\t\t\t\t\t\t\tvalue.value = initialValue;\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\t// DO NOTHING\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase EShapeDataValueType.TICKER:\n\t\t\t\t\t\t// Initial\n\t\t\t\t\t\tif (initialToInitialValue.has(initial)) {\n\t\t\t\t\t\t\tvalue.value = 0;\n\t\t\t\t\t\t\tcanvasTicker.add(initialToInitialValue.get(initial)).add(value);\n\t\t\t\t\t\t} else if (0 < initial.length) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst initialValue = this.calcInitial(value, initial);\n\t\t\t\t\t\t\t\tinitialToInitialValue.set(initial, initialValue);\n\t\t\t\t\t\t\t\tvalue.value = 0;\n\t\t\t\t\t\t\t\tcanvasTicker.add(initialValue).add(value);\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\t// DO NOTHING\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tconst extension = EShapeDataValueExtensions.get(type);\n\t\t\t\t\t\tif (extension) {\n\t\t\t\t\t\t\t// Mapping\n\t\t\t\t\t\t\tcanvasData.extended.add(extension.id, value);\n\n\t\t\t\t\t\t\t// Initial\n\t\t\t\t\t\t\tvalue.value = extension.initial;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected initActions(\n\t\tshape: EShape,\n\t\tshapeRuntime: EShapeRuntime,\n\t\tvalueToRuntime: Map<EShapeActionValue, EShapeActionRuntime>\n\t): void {\n\t\tconst values = shape.action.values;\n\t\tconst runtimes = shapeRuntime.actions;\n\t\tfor (let i = 0, imax = values.length; i < imax; ++i) {\n\t\t\tconst value = values[i];\n\t\t\tlet runtime = valueToRuntime.get(value);\n\t\t\tif (runtime == null) {\n\t\t\t\truntime = value.toRuntime();\n\t\t\t\tif (runtime != null) {\n\t\t\t\t\tvalueToRuntime.set(value, runtime);\n\t\t\t\t\truntimes.push(runtime);\n\t\t\t\t\tshapeRuntime.reset |= runtime.reset;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\truntimes.push(runtime);\n\t\t\t\tshapeRuntime.reset |= runtime.reset;\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected calcFormatter(\n\t\tvalue: EShapeDataValue,\n\t\tformat: string,\n\t\tinitial: string\n\t): (value: unknown) => unknown {\n\t\tconst def = this.toInitial(value);\n\t\treturn Function(\n\t\t\t\"value\",\n\t\t\t/* eslint-disable prettier/prettier */\n\t\t\t`try {` +\n\t\t\t\t`return (${format});` +\n\t\t\t`} catch( e1 ) {` +\n\t\t\t\t`try {` +\n\t\t\t\t\t`return (${0 < initial.length ? initial : def});` +\n\t\t\t\t`} catch( e2 ) {` +\n\t\t\t\t\t`return ${def};` +\n\t\t\t\t`}` +\n\t\t\t`}`\n\t\t\t/* eslint-enable prettier/prettier */\n\t\t) as any;\n\t}\n\n\tprotected calcInitial(value: EShapeDataValue, initial: string): unknown {\n\t\treturn Function(\n\t\t\t/* eslint-disable prettier/prettier */\n\t\t\t`try {` +\n\t\t\t\t`return (${initial});` +\n\t\t\t`} catch( e ) {` +\n\t\t\t\t`return ${this.toInitial(value)};` +\n\t\t\t`}`\n\t\t\t/* eslint-enable prettier/prettier */\n\t\t)();\n\t}\n\n\tprotected toInitial(value: EShapeDataValue): string {\n\t\tconst valueType = value.type;\n\t\tswitch (valueType) {\n\t\t\tcase EShapeDataValueType.NUMBER:\n\t\t\t\treturn \"0\";\n\t\t\tcase EShapeDataValueType.NUMBER_ARRAY:\n\t\t\t\treturn \"[]\";\n\t\t\tcase EShapeDataValueType.STRING:\n\t\t\t\treturn '\"\"';\n\t\t\tcase EShapeDataValueType.STRING_ARRAY:\n\t\t\t\treturn \"[]\";\n\t\t\tcase EShapeDataValueType.OBJECT:\n\t\t\t\treturn \"{}\";\n\t\t\tcase EShapeDataValueType.OBJECT_ARRAY:\n\t\t\t\treturn \"[]\";\n\t\t\tcase EShapeDataValueType.TICKER:\n\t\t\t\treturn \"0\";\n\t\t\tdefault:\n\t\t\t\treturn \"0\";\n\t\t}\n\t}\n\n\tprotected toDataShape(dataShape: EShape | null, shape: EShape): EShape | null {\n\t\tif (dataShape != null) {\n\t\t\treturn dataShape;\n\t\t}\n\t\tif (shape instanceof EShapeEmbedded) {\n\t\t\treturn shape;\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected onDestroy(): void {\n\t\tthis._ticker.stop();\n\t\tsuper.onDestroy();\n\t}\n\n\thitTestInteractives(global: IPoint): EShape | null {\n\t\tconst layers = this._layer.children;\n\t\tfor (let i = layers.length - 1; 0 <= i; --i) {\n\t\t\tconst layer = layers[i];\n\t\t\tif (layer.visible) {\n\t\t\t\tconst result = layer.hitTestInteractives(global);\n\t\t\t\tif (result != null) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tonShapeMove(e: interaction.InteractionEvent): boolean {\n\t\tconst found = this.hitTestInteractives(e.data.global);\n\n\t\tconst layer = DApplications.getLayer(this);\n\t\tif (layer) {\n\t\t\tconst view = layer.view;\n\n\t\t\t// Cursor\n\t\t\tconst cursor = this.toShapeCursor(found);\n\t\t\tconst style = view.style;\n\t\t\tif (style.cursor !== cursor) {\n\t\t\t\tstyle.cursor = cursor;\n\t\t\t}\n\n\t\t\t// TItle\n\t\t\tconst title = this.toShapeTitle(found);\n\t\t\tif (view.title !== title) {\n\t\t\t\tview.title = title;\n\t\t\t}\n\t\t}\n\n\t\tconst overed = this._overed;\n\t\tthis._overed = found;\n\t\tif (found === overed) {\n\t\t\tif (found != null) {\n\t\t\t\tconst runtime = found.runtime;\n\t\t\t\tif (runtime) {\n\t\t\t\t\truntime.onMove(found, e);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthis.onShapeOut(e, overed, found);\n\t\t\tthis.onShapeOver(e, found);\n\t\t}\n\t\treturn found != null;\n\t}\n\n\tprotected toShapeCursor(target: EShape | null): string {\n\t\tif (target != null) {\n\t\t\tconst result = target.cursor;\n\t\t\tif (0 < result.length) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn \"auto\";\n\t}\n\n\tprotected toShapeTitle(target: EShape | null): string {\n\t\tif (target != null) {\n\t\t\treturn target.title || \"\";\n\t\t}\n\t\treturn \"\";\n\t}\n\n\tprotected onShapeOut(\n\t\te: interaction.InteractionEvent,\n\t\ttarget?: EShape | EShapeContainer | null,\n\t\texcept?: EShape | null\n\t): void {\n\t\twhile (target != null && target !== except && target instanceof EShapeBase) {\n\t\t\tconst runtime = target.runtime;\n\t\t\tif (runtime) {\n\t\t\t\truntime.onOut(target, e);\n\t\t\t}\n\t\t\ttarget = target.parent;\n\t\t}\n\t}\n\n\tprotected onShapeOver(\n\t\te: interaction.InteractionEvent,\n\t\ttarget?: EShape | EShapeContainer | null,\n\t\texcept?: EShape | null\n\t): void {\n\t\twhile (target != null && target !== except && target instanceof EShapeBase) {\n\t\t\tconst runtime = target.runtime;\n\t\t\tif (runtime) {\n\t\t\t\truntime.onOver(target, e);\n\t\t\t}\n\t\t\ttarget = target.parent;\n\t\t}\n\t}\n\n\tonShapeDown(e: interaction.InteractionEvent): boolean {\n\t\tconst found = this.hitTestInteractives(e.data.global);\n\t\tthis._downed = found;\n\t\tif (found) {\n\t\t\tthis._downeds.add(found);\n\t\t\tlet target = found;\n\t\t\twhile (true) {\n\t\t\t\tconst runtime = target.runtime;\n\t\t\t\tif (runtime) {\n\t\t\t\t\truntime.onDown(target, e);\n\t\t\t\t}\n\t\t\t\tconst parent = target.parent;\n\t\t\t\tif (parent instanceof EShapeBase) {\n\t\t\t\t\ttarget = parent;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tonShapeUp(e: interaction.InteractionEvent): boolean {\n\t\tconst downeds = this._downeds;\n\t\tconst found = this.hitTestInteractives(e.data.global);\n\t\tif (found) {\n\t\t\tdowneds.delete(found);\n\t\t\tlet target = found;\n\t\t\twhile (true) {\n\t\t\t\tconst runtime = target.runtime;\n\t\t\t\tif (runtime) {\n\t\t\t\t\truntime.onUp(target, e);\n\t\t\t\t}\n\t\t\t\tconst parent = target.parent;\n\t\t\t\tif (parent instanceof EShapeBase) {\n\t\t\t\t\ttarget = parent;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.onShapeCancel(e);\n\t\treturn found != null;\n\t}\n\n\tonShapeCancel(e: interaction.InteractionEvent): boolean {\n\t\tconst downeds = this._downeds;\n\t\tif (0 < downeds.size) {\n\t\t\tdowneds.forEach((downed: EShape): void => {\n\t\t\t\tlet target = downed;\n\t\t\t\twhile (true) {\n\t\t\t\t\tconst runtime = target.runtime;\n\t\t\t\t\tif (runtime) {\n\t\t\t\t\t\truntime.onUpOutside(target, e);\n\t\t\t\t\t}\n\t\t\t\t\tconst parent = target.parent;\n\t\t\t\t\tif (parent instanceof EShapeBase) {\n\t\t\t\t\t\ttarget = parent;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tdowneds.clear();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tonShapeClick(e: interaction.InteractionEvent): boolean {\n\t\tconst found = this.hitTestInteractives(e.data.global);\n\t\tif (found && this._downed === found) {\n\t\t\tlet target = found;\n\t\t\twhile (true) {\n\t\t\t\tconst runtime = target.runtime;\n\t\t\t\tif (runtime) {\n\t\t\t\t\truntime.onClick(target, e);\n\t\t\t\t}\n\t\t\t\tconst parent = target.parent;\n\t\t\t\tif (parent instanceof EShapeBase) {\n\t\t\t\t\ttarget = parent;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tonShapeDblClick(\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: interaction.InteractionManager\n\t): boolean {\n\t\tconst global = (DDiagramCanvas.WORK_DBLCLICK ??= new Point());\n\t\tUtilPointerEvent.toGlobal(e, interactionManager, global);\n\t\tconst found = this.hitTestInteractives(global);\n\t\tif (found) {\n\t\t\tlet target = found;\n\t\t\twhile (true) {\n\t\t\t\tconst runtime = target.runtime;\n\t\t\t\tif (runtime) {\n\t\t\t\t\truntime.onDblClick(target, e, interactionManager);\n\t\t\t\t}\n\t\t\t\tconst parent = target.parent;\n\t\t\t\tif (parent instanceof EShapeBase) {\n\t\t\t\t\ttarget = parent;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tupdate(): void {\n\t\tconst actionables = this._actionables;\n\t\tif (0 < actionables.length) {\n\t\t\tlet effect = -1;\n\t\t\tconst time = Date.now();\n\t\t\tfor (let i = 0, imax = actionables.length; i < imax; ++i) {\n\t\t\t\tconst actionable = actionables[i];\n\t\t\t\tactionable.update(time);\n\t\t\t\tconst runtime = actionable.runtime;\n\t\t\t\tif (runtime && time < runtime.effect) {\n\t\t\t\t\tconst runtimeEffect = runtime.effect;\n\t\t\t\t\tif (time < runtimeEffect) {\n\t\t\t\t\t\teffect = effect < 0 ? runtimeEffect : Math.min(effect, runtimeEffect);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (0 <= effect) {\n\t\t\t\twindow.setTimeout(this._updateBound, effect - Date.now());\n\t\t\t}\n\t\t}\n\t}\n\n\tonRender(renderer: Renderer): void {\n\t\tconst actionables = this._actionables;\n\t\tif (0 < actionables.length) {\n\t\t\tlet effect = -1;\n\t\t\tconst time = Date.now();\n\t\t\tfor (let i = 0, imax = actionables.length; i < imax; ++i) {\n\t\t\t\tconst actionable = actionables[i];\n\t\t\t\tactionable.onRender(time, renderer);\n\t\t\t\tconst runtime = actionable.runtime;\n\t\t\t\tif (runtime && time < runtime.effect) {\n\t\t\t\t\tconst runtimeEffect = runtime.effect;\n\t\t\t\t\tif (time < runtimeEffect) {\n\t\t\t\t\t\teffect = effect < 0 ? runtimeEffect : Math.min(effect, runtimeEffect);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (0 <= effect) {\n\t\t\t\twindow.setTimeout(this._updateBound, effect - Date.now());\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DDiagramCanvas\";\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"d-diagram-canvas.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-diagram-canvas.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAuB,KAAK,EAAY,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACN,kBAAkB,EAGlB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAI7D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAEtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,uC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BACnC,IAAI,OAAO,IAAI,IAAI,GAAG,OAAO,CAAC,MAAM,EAAE;oBACrC,IAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;oBACrC,IAAI,IAAI,GAAG,aAAa,EAAE;wBACzB,MAAM,GAAG,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;qBACtE;iBACD;aACD;YACD,IAAI,CAAC,IAAI,MAAM,EAAE;gBAChB,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;aAC1D;SACD;IACF,CAAC;IAES,gCAAO,GAAjB;QACC,OAAO,gBAAgB,CAAC;IACzB,CAAC;IACF,qBAAC;AAAD,CAAC,AA7lBD,CAGU,kBAAkB,GA0lB3B","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { interaction, IPoint, Point, Renderer } from \"pixi.js\";\nimport { DApplications } from \"./d-applications\";\nimport {\n\tDDiagramCanvasBase,\n\tDDiagramCanvasBaseOptions,\n\tDThemeDiagramCanvasBase\n} from \"./d-diagram-canvas-base\";\nimport { EShape } from \"./shape/e-shape\";\nimport { EShapeBase } from \"./shape/variant/e-shape-base\";\nimport { UtilPointerEvent } from \"./util/util-pointer-event\";\nimport { EShapeActionValue } from \"./shape/action/e-shape-action-value\";\nimport { EShapeActionRuntime } from \"./shape/action/e-shape-action-runtime\";\nimport { DDiagramDataMapper } from \"./d-diagram-data-mapper\";\nimport { EShapeRuntimes } from \"./shape/e-shape-runtimes\";\nimport { EShapeRuntime } from \"./shape/e-shape-runtime\";\nimport { EShapeDataValue } from \"./shape/e-shape-data-value\";\nimport { EShapeDataValueType } from \"./shape/e-shape-data-value-type\";\nimport { EShapeContainer } from \"./shape/e-shape-container\";\nimport { UtilKeyboardEvent } from \"./util/util-keyboard-event\";\nimport { DDiagramCanvasData } from \"./d-diagram-canvas-data\";\nimport { DDiagramCanvasDataImpl } from \"./d-diagram-canvas-data-impl\";\nimport { DDiagramCanvasShape } from \"./d-diagram-canvas-shape\";\nimport { DDiagramCanvasShapeImpl } from \"./d-diagram-canvas-shape-impl\";\nimport { DDiagramCanvasTicker } from \"./d-diagram-canvas-ticker\";\nimport { DDiagramCanvasTickerImpl } from \"./d-diagram-canvas-ticker-impl\";\nimport { EShapeDataValueScope } from \"./shape/e-shape-data-value-scope\";\nimport { EShapeEmbedded } from \"./shape/variant/e-shape-embedded\";\nimport { EShapeDataValueExtensions } from \"./shape/e-shape-data-value-extensions\";\nimport { EShapeActionEnvironment } from \"./shape/action/e-shape-action-environment\";\n\nexport interface DDiagramCanvasOptions<THEME extends DThemeDiagramCanvas = DThemeDiagramCanvas>\n\textends DDiagramCanvasBaseOptions<THEME> {}\n\nexport interface DThemeDiagramCanvas extends DThemeDiagramCanvasBase {}\n\nexport class DDiagramCanvas<\n\tTHEME extends DThemeDiagramCanvas = DThemeDiagramCanvas,\n\tOPTIONS extends DDiagramCanvasOptions<THEME> = DDiagramCanvasOptions<THEME>\n> extends DDiagramCanvasBase<THEME, OPTIONS> {\n\tprotected static WORK_DBLCLICK?: Point;\n\n\tprotected _data: DDiagramCanvasData;\n\tprotected _shape: DDiagramCanvasShape;\n\tprotected _ticker: DDiagramCanvasTicker;\n\tprotected _actionables: EShape[];\n\n\tprotected _overed?: EShape | null;\n\tprotected _downed?: EShape | null;\n\tprotected _downeds: Set<EShape>;\n\n\tprotected _updateBound: () => void;\n\n\tconstructor(options: OPTIONS) {\n\t\tsuper(options);\n\t\tthis._data = new DDiagramCanvasDataImpl();\n\t\tthis._shape = new DDiagramCanvasShapeImpl();\n\t\tthis._ticker = new DDiagramCanvasTickerImpl(this);\n\t\tthis._actionables = [];\n\t\tthis._downeds = new Set<EShape>();\n\t\tthis._updateBound = (): void => {\n\t\t\tDApplications.update(this);\n\t\t};\n\t}\n\n\tget data(): DDiagramCanvasData {\n\t\treturn this._data;\n\t}\n\n\tget shape(): DDiagramCanvasShape {\n\t\treturn this._shape;\n\t}\n\n\tget ticker(): DDiagramCanvasTicker {\n\t\treturn this._ticker;\n\t}\n\n\tinitialize(shapes: EShape[], mapper?: DDiagramDataMapper | null): void {\n\t\tconst time = Date.now();\n\t\tconst actionables = this._actionables;\n\t\tthis.initialize_(\n\t\t\tshapes,\n\t\t\tnull,\n\t\t\tmapper,\n\t\t\tnew Map<string, (value: unknown) => unknown>(),\n\t\t\tnew Map<string, unknown>(),\n\t\t\tnew Map<EShapeActionValue, EShapeActionRuntime>(),\n\t\t\tthis._ticker,\n\t\t\tthis._shape,\n\t\t\tthis._data,\n\t\t\tactionables\n\t\t);\n\t\tconst layers = this._layer.children;\n\t\tfor (let i = 0, imax = layers.length; i < imax; ++i) {\n\t\t\tlayers[i].initialize(actionables);\n\t\t}\n\t\tEShapeActionEnvironment.isInitializing = true;\n\t\tfor (let i = 0, imax = layers.length; i < imax; ++i) {\n\t\t\tconst layerChildren = layers[i].children;\n\t\t\tfor (let j = 0, jmax = layerChildren.length; j < jmax; ++j) {\n\t\t\t\tlayerChildren[j].update(time);\n\t\t\t}\n\t\t}\n\t\tEShapeActionEnvironment.isInitializing = false;\n\t\tthis._ticker.start();\n\t}\n\n\tprotected initialize_(\n\t\tshapes: EShape[],\n\t\tdataShape: EShape | null,\n\t\tmapper: DDiagramDataMapper | null | undefined,\n\t\tformatToFormatter: Map<string, (value: unknown) => unknown>,\n\t\tinitialToInitialValue: Map<string, unknown>,\n\t\tactionValueToRuntime: Map<EShapeActionValue, EShapeActionRuntime>,\n\t\tcanvasTicker: DDiagramCanvasTicker,\n\t\tcanvasShape: DDiagramCanvasShape,\n\t\tcanvasData: DDiagramCanvasData,\n\t\tactionables: EShape[]\n\t): void {\n\t\tfor (let i = 0, imax = shapes.length; i < imax; ++i) {\n\t\t\tconst shape = shapes[i];\n\n\t\t\t// ID\n\t\t\tconst id = shape.id;\n\t\t\tif (0 < id.length) {\n\t\t\t\tcanvasShape.add(id, shape);\n\t\t\t}\n\n\t\t\t// Data\n\t\t\tthis.initData(\n\t\t\t\tshape,\n\t\t\t\tdataShape,\n\t\t\t\tmapper,\n\t\t\t\tformatToFormatter,\n\t\t\t\tinitialToInitialValue,\n\t\t\t\tcanvasTicker,\n\t\t\t\tcanvasData\n\t\t\t);\n\n\t\t\t// Runtime\n\t\t\tconst runtime = new (EShapeRuntimes[shape.type] || EShapeRuntime)(shape);\n\t\t\tshape.runtime = runtime;\n\n\t\t\t// Action\n\t\t\tthis.initActions(shape, runtime, actionValueToRuntime);\n\n\t\t\t// Actionables\n\t\t\tif (runtime.isActionable()) {\n\t\t\t\tactionables.push(shape);\n\t\t\t}\n\n\t\t\t// Shortcut\n\t\t\tconst shortcut = shape.shortcut;\n\t\t\tif (shortcut != null) {\n\t\t\t\tUtilKeyboardEvent.on(shape, shortcut, (e: KeyboardEvent): void => {\n\t\t\t\t\truntime.onClick(shape, e);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Init the runtime\n\t\t\truntime.initialize(shape);\n\n\t\t\t// Children\n\t\t\tconst children = shape.children;\n\t\t\tif (0 < children.length) {\n\t\t\t\tthis.initialize_(\n\t\t\t\t\tchildren,\n\t\t\t\t\tthis.toDataShape(dataShape, shape),\n\t\t\t\t\tmapper,\n\t\t\t\t\tformatToFormatter,\n\t\t\t\t\tinitialToInitialValue,\n\t\t\t\t\tactionValueToRuntime,\n\t\t\t\t\tcanvasTicker,\n\t\t\t\t\tcanvasShape,\n\t\t\t\t\tcanvasData,\n\t\t\t\t\tactionables\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected initData(\n\t\tshape: EShape,\n\t\tdataShape: EShape | null,\n\t\tmapper: DDiagramDataMapper | null | undefined,\n\t\tformatToFormatter: Map<string, (value: unknown) => unknown>,\n\t\tinitialToInitialValue: Map<string, unknown>,\n\t\tcanvasTicker: DDiagramCanvasTicker,\n\t\tcanvasData: DDiagramCanvasData\n\t): void {\n\t\tconst data = shape.data;\n\t\tfor (let i = 0, imax = data.size(); i < imax; ++i) {\n\t\t\tconst value = data.get(i);\n\t\t\tif (value) {\n\t\t\t\tconst type = value.type;\n\t\t\t\tconst format = value.format;\n\t\t\t\tconst initial = value.initial;\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase EShapeDataValueType.NUMBER:\n\t\t\t\t\tcase EShapeDataValueType.NUMBER_ARRAY:\n\t\t\t\t\tcase EShapeDataValueType.STRING:\n\t\t\t\t\tcase EShapeDataValueType.STRING_ARRAY:\n\t\t\t\t\tcase EShapeDataValueType.OBJECT:\n\t\t\t\t\tcase EShapeDataValueType.OBJECT_ARRAY:\n\t\t\t\t\t\t// Mapping\n\t\t\t\t\t\tif (value.scope === EShapeDataValueScope.PRIVATE) {\n\t\t\t\t\t\t\tconst id = value.id;\n\t\t\t\t\t\t\tif (0 < id.length) {\n\t\t\t\t\t\t\t\tif (dataShape) {\n\t\t\t\t\t\t\t\t\tdataShape.data.private.add(id, value);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tcanvasData.private.add(id, value);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (value.scope === EShapeDataValueScope.PROTECTED) {\n\t\t\t\t\t\t\tconst id = value.id;\n\t\t\t\t\t\t\tif (0 < id.length) {\n\t\t\t\t\t\t\t\tcanvasData.protected.add(id, value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (mapper) {\n\t\t\t\t\t\t\t\tmapper(value, dataShape || shape);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst id = value.id;\n\t\t\t\t\t\t\tif (0 < id.length) {\n\t\t\t\t\t\t\t\tcanvasData.add(id, value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Format\n\t\t\t\t\t\tif (formatToFormatter.has(format)) {\n\t\t\t\t\t\t\tvalue.formatter = formatToFormatter.get(format);\n\t\t\t\t\t\t} else if (0 < format.length) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst formatter = this.calcFormatter(value, format, initial);\n\t\t\t\t\t\t\t\tformatToFormatter.set(format, formatter);\n\t\t\t\t\t\t\t\tvalue.formatter = formatter;\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\t// DO NOTHING\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Initial\n\t\t\t\t\t\tif (initialToInitialValue.has(initial)) {\n\t\t\t\t\t\t\tvalue.value = initialToInitialValue.get(initial);\n\t\t\t\t\t\t} else if (0 < initial.length) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst initialValue = this.calcInitial(value, initial);\n\t\t\t\t\t\t\t\tinitialToInitialValue.set(initial, initialValue);\n\t\t\t\t\t\t\t\tvalue.value = initialValue;\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\t// DO NOTHING\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase EShapeDataValueType.TICKER:\n\t\t\t\t\t\t// Initial\n\t\t\t\t\t\tif (initialToInitialValue.has(initial)) {\n\t\t\t\t\t\t\tvalue.value = 0;\n\t\t\t\t\t\t\tcanvasTicker.add(initialToInitialValue.get(initial)).add(value);\n\t\t\t\t\t\t} else if (0 < initial.length) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst initialValue = this.calcInitial(value, initial);\n\t\t\t\t\t\t\t\tinitialToInitialValue.set(initial, initialValue);\n\t\t\t\t\t\t\t\tvalue.value = 0;\n\t\t\t\t\t\t\t\tcanvasTicker.add(initialValue).add(value);\n\t\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\t\t// DO NOTHING\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tconst extension = EShapeDataValueExtensions.get(type);\n\t\t\t\t\t\tif (extension) {\n\t\t\t\t\t\t\t// Mapping\n\t\t\t\t\t\t\tcanvasData.extended.add(extension.id, value);\n\n\t\t\t\t\t\t\t// Initial\n\t\t\t\t\t\t\tvalue.value = extension.initial;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected initActions(\n\t\tshape: EShape,\n\t\tshapeRuntime: EShapeRuntime,\n\t\tvalueToRuntime: Map<EShapeActionValue, EShapeActionRuntime>\n\t): void {\n\t\tconst values = shape.action.values;\n\t\tconst runtimes = shapeRuntime.actions;\n\t\tfor (let i = 0, imax = values.length; i < imax; ++i) {\n\t\t\tconst value = values[i];\n\t\t\tlet runtime = valueToRuntime.get(value);\n\t\t\tif (runtime == null) {\n\t\t\t\truntime = value.toRuntime();\n\t\t\t\tif (runtime != null) {\n\t\t\t\t\tvalueToRuntime.set(value, runtime);\n\t\t\t\t\truntimes.push(runtime);\n\t\t\t\t\tshapeRuntime.reset |= runtime.reset;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\truntimes.push(runtime);\n\t\t\t\tshapeRuntime.reset |= runtime.reset;\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected calcFormatter(\n\t\tvalue: EShapeDataValue,\n\t\tformat: string,\n\t\tinitial: string\n\t): (value: unknown) => unknown {\n\t\tconst def = this.toInitial(value);\n\t\treturn Function(\n\t\t\t\"value\",\n\t\t\t/* eslint-disable prettier/prettier */\n\t\t\t`try {` +\n\t\t\t\t`return (${format});` +\n\t\t\t`} catch( e1 ) {` +\n\t\t\t\t`try {` +\n\t\t\t\t\t`return (${0 < initial.length ? initial : def});` +\n\t\t\t\t`} catch( e2 ) {` +\n\t\t\t\t\t`return ${def};` +\n\t\t\t\t`}` +\n\t\t\t`}`\n\t\t\t/* eslint-enable prettier/prettier */\n\t\t) as any;\n\t}\n\n\tprotected calcInitial(value: EShapeDataValue, initial: string): unknown {\n\t\treturn Function(\n\t\t\t/* eslint-disable prettier/prettier */\n\t\t\t`try {` +\n\t\t\t\t`return (${initial});` +\n\t\t\t`} catch( e ) {` +\n\t\t\t\t`return ${this.toInitial(value)};` +\n\t\t\t`}`\n\t\t\t/* eslint-enable prettier/prettier */\n\t\t)();\n\t}\n\n\tprotected toInitial(value: EShapeDataValue): string {\n\t\tconst valueType = value.type;\n\t\tswitch (valueType) {\n\t\t\tcase EShapeDataValueType.NUMBER:\n\t\t\t\treturn \"0\";\n\t\t\tcase EShapeDataValueType.NUMBER_ARRAY:\n\t\t\t\treturn \"[]\";\n\t\t\tcase EShapeDataValueType.STRING:\n\t\t\t\treturn '\"\"';\n\t\t\tcase EShapeDataValueType.STRING_ARRAY:\n\t\t\t\treturn \"[]\";\n\t\t\tcase EShapeDataValueType.OBJECT:\n\t\t\t\treturn \"{}\";\n\t\t\tcase EShapeDataValueType.OBJECT_ARRAY:\n\t\t\t\treturn \"[]\";\n\t\t\tcase EShapeDataValueType.TICKER:\n\t\t\t\treturn \"0\";\n\t\t\tdefault:\n\t\t\t\treturn \"0\";\n\t\t}\n\t}\n\n\tprotected toDataShape(dataShape: EShape | null, shape: EShape): EShape | null {\n\t\tif (dataShape != null) {\n\t\t\treturn dataShape;\n\t\t}\n\t\tif (shape instanceof EShapeEmbedded) {\n\t\t\treturn shape;\n\t\t}\n\t\treturn null;\n\t}\n\n\tprotected onDestroy(): void {\n\t\tthis._ticker.stop();\n\t\tsuper.onDestroy();\n\t}\n\n\thitTestInteractives(global: IPoint): EShape | null {\n\t\tconst layers = this._layer.children;\n\t\tfor (let i = layers.length - 1; 0 <= i; --i) {\n\t\t\tconst layer = layers[i];\n\t\t\tif (layer.visible) {\n\t\t\t\tconst result = layer.hitTestInteractives(global);\n\t\t\t\tif (result != null) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}\n\n\tonShapeMove(e: interaction.InteractionEvent): boolean {\n\t\tconst found = this.hitTestInteractives(e.data.global);\n\n\t\tconst layer = DApplications.getLayer(this);\n\t\tif (layer) {\n\t\t\tconst view = layer.view;\n\n\t\t\t// Cursor\n\t\t\tconst cursor = this.toShapeCursor(found);\n\t\t\tconst style = view.style;\n\t\t\tif (style.cursor !== cursor) {\n\t\t\t\tstyle.cursor = cursor;\n\t\t\t}\n\n\t\t\t// TItle\n\t\t\tconst title = this.toShapeTitle(found);\n\t\t\tif (view.title !== title) {\n\t\t\t\tview.title = title;\n\t\t\t}\n\t\t}\n\n\t\tconst overed = this._overed;\n\t\tthis._overed = found;\n\t\tif (found === overed) {\n\t\t\tif (found != null) {\n\t\t\t\tconst runtime = found.runtime;\n\t\t\t\tif (runtime) {\n\t\t\t\t\truntime.onMove(found, e);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthis.onShapeOut(e, overed, found);\n\t\t\tthis.onShapeOver(e, found);\n\t\t}\n\t\treturn found != null;\n\t}\n\n\tprotected toShapeCursor(target: EShape | null): string {\n\t\tif (target != null) {\n\t\t\tconst result = target.cursor;\n\t\t\tif (0 < result.length) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn \"auto\";\n\t}\n\n\tprotected toShapeTitle(target: EShape | null): string {\n\t\tif (target != null) {\n\t\t\treturn target.title || \"\";\n\t\t}\n\t\treturn \"\";\n\t}\n\n\tprotected onShapeOut(\n\t\te: interaction.InteractionEvent,\n\t\ttarget?: EShape | EShapeContainer | null,\n\t\texcept?: EShape | null\n\t): void {\n\t\twhile (target != null && target !== except && target instanceof EShapeBase) {\n\t\t\tconst runtime = target.runtime;\n\t\t\tif (runtime) {\n\t\t\t\truntime.onOut(target, e);\n\t\t\t}\n\t\t\ttarget = target.parent;\n\t\t}\n\t}\n\n\tprotected onShapeOver(\n\t\te: interaction.InteractionEvent,\n\t\ttarget?: EShape | EShapeContainer | null,\n\t\texcept?: EShape | null\n\t): void {\n\t\twhile (target != null && target !== except && target instanceof EShapeBase) {\n\t\t\tconst runtime = target.runtime;\n\t\t\tif (runtime) {\n\t\t\t\truntime.onOver(target, e);\n\t\t\t}\n\t\t\ttarget = target.parent;\n\t\t}\n\t}\n\n\tonShapeDown(e: interaction.InteractionEvent): boolean {\n\t\tconst found = this.hitTestInteractives(e.data.global);\n\t\tthis._downed = found;\n\t\tif (found) {\n\t\t\tthis._downeds.add(found);\n\t\t\tlet target = found;\n\t\t\twhile (true) {\n\t\t\t\tconst runtime = target.runtime;\n\t\t\t\tif (runtime) {\n\t\t\t\t\truntime.onDown(target, e);\n\t\t\t\t}\n\t\t\t\tconst parent = target.parent;\n\t\t\t\tif (parent instanceof EShapeBase) {\n\t\t\t\t\ttarget = parent;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tonShapeUp(e: interaction.InteractionEvent): boolean {\n\t\tconst downeds = this._downeds;\n\t\tconst found = this.hitTestInteractives(e.data.global);\n\t\tif (found) {\n\t\t\tdowneds.delete(found);\n\t\t\tlet target = found;\n\t\t\twhile (true) {\n\t\t\t\tconst runtime = target.runtime;\n\t\t\t\tif (runtime) {\n\t\t\t\t\truntime.onUp(target, e);\n\t\t\t\t}\n\t\t\t\tconst parent = target.parent;\n\t\t\t\tif (parent instanceof EShapeBase) {\n\t\t\t\t\ttarget = parent;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.onShapeCancel(e);\n\t\treturn found != null;\n\t}\n\n\tonShapeCancel(e: interaction.InteractionEvent): boolean {\n\t\tconst downeds = this._downeds;\n\t\tif (0 < downeds.size) {\n\t\t\tdowneds.forEach((downed: EShape): void => {\n\t\t\t\tlet target = downed;\n\t\t\t\twhile (true) {\n\t\t\t\t\tconst runtime = target.runtime;\n\t\t\t\t\tif (runtime) {\n\t\t\t\t\t\truntime.onUpOutside(target, e);\n\t\t\t\t\t}\n\t\t\t\t\tconst parent = target.parent;\n\t\t\t\t\tif (parent instanceof EShapeBase) {\n\t\t\t\t\t\ttarget = parent;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tdowneds.clear();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tonShapeClick(e: interaction.InteractionEvent): boolean {\n\t\tconst found = this.hitTestInteractives(e.data.global);\n\t\tif (found && this._downed === found) {\n\t\t\tlet target = found;\n\t\t\twhile (true) {\n\t\t\t\tconst runtime = target.runtime;\n\t\t\t\tif (runtime) {\n\t\t\t\t\truntime.onClick(target, e);\n\t\t\t\t}\n\t\t\t\tconst parent = target.parent;\n\t\t\t\tif (parent instanceof EShapeBase) {\n\t\t\t\t\ttarget = parent;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tonShapeDblClick(\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: interaction.InteractionManager\n\t): boolean {\n\t\tconst global = (DDiagramCanvas.WORK_DBLCLICK ??= new Point());\n\t\tUtilPointerEvent.toGlobal(e, interactionManager, global);\n\t\tconst found = this.hitTestInteractives(global);\n\t\tif (found) {\n\t\t\tlet target = found;\n\t\t\twhile (true) {\n\t\t\t\tconst runtime = target.runtime;\n\t\t\t\tif (runtime) {\n\t\t\t\t\truntime.onDblClick(target, e, interactionManager);\n\t\t\t\t}\n\t\t\t\tconst parent = target.parent;\n\t\t\t\tif (parent instanceof EShapeBase) {\n\t\t\t\t\ttarget = parent;\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tupdate(): void {\n\t\tconst actionables = this._actionables;\n\t\tif (0 < actionables.length) {\n\t\t\tlet effect = -1;\n\t\t\tconst time = Date.now();\n\t\t\tfor (let i = 0, imax = actionables.length; i < imax; ++i) {\n\t\t\t\tconst actionable = actionables[i];\n\t\t\t\tactionable.update(time);\n\t\t\t\tconst runtime = actionable.runtime;\n\t\t\t\tif (runtime && time < runtime.effect) {\n\t\t\t\t\tconst runtimeEffect = runtime.effect;\n\t\t\t\t\tif (time < runtimeEffect) {\n\t\t\t\t\t\teffect = effect < 0 ? runtimeEffect : Math.min(effect, runtimeEffect);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (0 <= effect) {\n\t\t\t\twindow.setTimeout(this._updateBound, effect - Date.now());\n\t\t\t}\n\t\t}\n\t}\n\n\tonRender(renderer: Renderer): void {\n\t\tconst actionables = this._actionables;\n\t\tif (0 < actionables.length) {\n\t\t\tlet effect = -1;\n\t\t\tconst time = Date.now();\n\t\t\tfor (let i = 0, imax = actionables.length; i < imax; ++i) {\n\t\t\t\tconst actionable = actionables[i];\n\t\t\t\tactionable.onRender(time, renderer);\n\t\t\t\tconst runtime = actionable.runtime;\n\t\t\t\tif (runtime && time < runtime.effect) {\n\t\t\t\t\tconst runtimeEffect = runtime.effect;\n\t\t\t\t\tif (time < runtimeEffect) {\n\t\t\t\t\t\teffect = effect < 0 ? runtimeEffect : Math.min(effect, runtimeEffect);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (0 <= effect) {\n\t\t\t\twindow.setTimeout(this._updateBound, effect - Date.now());\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected getType(): string {\n\t\treturn \"DDiagramCanvas\";\n\t}\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* {@link EShape} action environment.
|
|
7
|
+
*
|
|
8
|
+
* In action expressions, all the properties in this object can be accessed without `EShapeActionEnvironment.`.
|
|
9
|
+
* For instance, if this object has a property of the name `apple`, the string `apple` is a valid expression
|
|
10
|
+
* and is equivalent to `EShapeActionEnvironment.apple`.
|
|
11
|
+
*/
|
|
12
|
+
export var EShapeActionEnvironment = {};
|
|
13
|
+
//# sourceMappingURL=e-shape-action-environment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e-shape-action-environment.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-environment.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,IAAM,uBAAuB,GAA4B,EAAE,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * {@link EShape} action environment.\n *\n * In action expressions, all the properties in this object can be accessed without `EShapeActionEnvironment.`.\n * For instance, if this object has a property of the name `apple`, the string `apple` is a valid expression\n * and is equivalent to `EShapeActionEnvironment.apple`.\n */\nexport const EShapeActionEnvironment: Record<string, unknown> = {};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e-shape-action-expression-with-parameter.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-expression-with-parameter.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"../e-shape\";\n\n/**\n * {@link EShape} action expression with one parameter.\n *\n * In action expressions, all the properties in {@link EShape}, {@link EShapeState} and {@link EShapeActionEnvironment} can be accessed directly.\n * For instance, the string `isClicked` is a valid expression as {@link EShapeState} has {@link EShapeState#isClicked} and is equivalent to `shape.state.isClicked`.\n * In addition to that, the parameter passed to this function can be used in action expressions.\n * The name of the variable containing that parameter depends on actions.\n */\nexport type EShapeActionExpressionWithParameter<T, P> = (\n\tshape: EShape,\n\ttime: number,\n\tenvironment: Record<string, unknown>,\n\tparameter: P\n) => T;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-expression.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-expression.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"../e-shape\";\n\
|
|
1
|
+
{"version":3,"file":"e-shape-action-expression.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-expression.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"../e-shape\";\n\n/**\n * {@link EShape} action expression.\n *\n * In action expressions, all the properties in {@link EShape}, {@link EShapeState} and {@link EShapeActionEnvironment} can be accessed directly.\n * For instance, the string `isClicked` is a valid expression as {@link EShapeState} has {@link EShapeState#isClicked} and is equivalent to `shape.state.isClicked`.\n */\nexport type EShapeActionExpression<T> = (\n\tshape: EShape,\n\ttime: number,\n\tenvironment: Record<string, unknown>\n) => T;\n"]}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
* Copyright (C) 2019 Toshiba Corporation
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
+
/**
|
|
6
|
+
* {@link EShape} action expression utility class.
|
|
7
|
+
*/
|
|
5
8
|
var EShapeActionExpressions = /** @class */ (function () {
|
|
6
9
|
function EShapeActionExpressions() {
|
|
7
10
|
}
|
|
@@ -12,24 +15,26 @@ var EShapeActionExpressions = /** @class */ (function () {
|
|
|
12
15
|
try {
|
|
13
16
|
/* eslint-disable prettier/prettier */
|
|
14
17
|
var body = "" +
|
|
15
|
-
"try{" +
|
|
16
|
-
"with(
|
|
17
|
-
"with(
|
|
18
|
+
"try {" +
|
|
19
|
+
"with (shape) {" +
|
|
20
|
+
"with (state) {" +
|
|
21
|
+
"with (environment) {" +
|
|
18
22
|
(nullable ?
|
|
19
23
|
("var result = (".concat(expression, ");") +
|
|
20
24
|
"return (result != null ? ".concat(caster, "(result) : null);")) :
|
|
21
25
|
"return ".concat(caster, "(").concat(expression, ");")) +
|
|
22
26
|
"}" +
|
|
23
27
|
"}" +
|
|
24
|
-
"}
|
|
28
|
+
"}" +
|
|
29
|
+
"} catch (e) {" +
|
|
25
30
|
"return ".concat(defLiteral, ";") +
|
|
26
31
|
"}";
|
|
27
32
|
/* eslint-enable prettier/prettier */
|
|
28
33
|
if (parameter == null) {
|
|
29
|
-
return Function("shape", "time", body);
|
|
34
|
+
return Function("shape", "time", "environment", body);
|
|
30
35
|
}
|
|
31
36
|
else {
|
|
32
|
-
return Function("shape", "time", parameter, body);
|
|
37
|
+
return Function("shape", "time", "environment", parameter, body);
|
|
33
38
|
}
|
|
34
39
|
}
|
|
35
40
|
catch (e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-expressions.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-expressions.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"e-shape-action-expressions.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-expressions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH;;GAEG;AACH;IAAA;IAsHA,CAAC;IA9FO,4BAAI,GAAX,UACC,UAAkB,EAClB,MAAc,EACd,GAAsF,EACtF,UAAkB,EAClB,QAAiB,EACjB,SAAkB;QAElB,IAAI,UAAU,CAAC,IAAI,EAAE,CAAC,MAAM,IAAI,CAAC,EAAE;YAClC,OAAO,GAAG,CAAC;SACX;QAED,IAAI;Y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AA,IAAI,EAAJ,CAAI,CAAC;IACxB,4BAAI,GAAG,cAAc,OAAA,CAAC,EAAD,CAAC,CAAC;IACvB,2BAAG,GAAG,cAAc,OAAA,CAAC,EAAD,CAAC,CAAC;IACtB,mCAAW,GAAG,cAAc,OAAA,GAAG,EAAH,CAAG,CAAC;IAChC,6BAAK,GAAG,cAAc,OAAA,EAAE,EAAF,CAAE,CAAC;IACzB,4BAAI,GAAG,cAAe,OAAA,IAAI,EAAJ,CAAI,CAAC;IAC3B,6BAAK,GAAG,cAAe,OAAA,KAAK,EAAL,CAAK,CAAC;IA+GrC,8BAAC;CAAA,AAtHD,IAsHC;SAtHY,uBAAuB","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeActionExpression } from \"./e-shape-action-expression\";\nimport { EShapeActionExpressionWithParameter } from \"./e-shape-action-expression-with-parameter\";\n\n/**\n * {@link EShape} action expression utility class.\n */\nexport class EShapeActionExpressions {\n\tstatic NULL = (): null => null;\n\tstatic ZERO = (): number => 0;\n\tstatic ONE = (): number => 1;\n\tstatic ONE_HUNDRED = (): number => 100;\n\tstatic EMPTY = (): string => \"\";\n\tstatic TRUE = (): boolean => true;\n\tstatic FALSE = (): boolean => false;\n\n\tstatic from<T, DEF>(\n\t\texpression: string,\n\t\tcaster: string,\n\t\tdef: DEF,\n\t\tdefLiteral: string,\n\t\tnullable: boolean\n\t): EShapeActionExpression<T> | DEF;\n\tstatic from<T, P, DEF>(\n\t\texpression: string,\n\t\tcaster: string,\n\t\tdef: DEF,\n\t\tdefLiteral: string,\n\t\tnullable: boolean,\n\t\tparameter: string\n\t): EShapeActionExpressionWithParameter<T, P> | DEF;\n\tstatic from<T, P>(\n\t\texpression: string,\n\t\tcaster: string,\n\t\tdef: EShapeActionExpression<T> | EShapeActionExpressionWithParameter<T, P> | undefined,\n\t\tdefLiteral: string,\n\t\tnullable: boolean,\n\t\tparameter?: string\n\t): EShapeActionExpression<T> | EShapeActionExpressionWithParameter<T, P> | undefined {\n\t\tif (expression.trim().length <= 0) {\n\t\t\treturn def;\n\t\t}\n\n\t\ttry {\n\t\t\t/* eslint-disable prettier/prettier */\n\t\t\tconst body = `` +\n\t\t\t\t`try {` +\n\t\t\t\t\t`with (shape) {` +\n\t\t\t\t\t\t`with (state) {` +\n\t\t\t\t\t\t\t`with (environment) {` +\n\t\t\t\t\t\t\t\t( nullable ?\n\t\t\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t\t\t`var result = (${expression});` +\n\t\t\t\t\t\t\t\t\t\t`return (result != null ? ${caster}(result) : null);`\n\t\t\t\t\t\t\t\t\t) :\n\t\t\t\t\t\t\t\t\t`return ${caster}(${expression});`\n\t\t\t\t\t\t\t\t) +\n\t\t\t\t\t\t\t`}` +\n\t\t\t\t\t\t`}` +\n\t\t\t\t\t`}` +\n\t\t\t\t`} catch (e) {` +\n\t\t\t\t\t`return ${defLiteral};` +\n\t\t\t\t`}`;\n\t\t\t/* eslint-enable prettier/prettier */\n\t\t\tif (parameter == null) {\n\t\t\t\treturn Function(\"shape\", \"time\", \"environment\", body) as EShapeActionExpression<T>;\n\t\t\t} else {\n\t\t\t\treturn Function(\n\t\t\t\t\t\"shape\",\n\t\t\t\t\t\"time\",\n\t\t\t\t\t\"environment\",\n\t\t\t\t\tparameter,\n\t\t\t\t\tbody\n\t\t\t\t) as EShapeActionExpressionWithParameter<T, P>;\n\t\t\t}\n\t\t} catch (e) {\n\t\t\treturn def;\n\t\t}\n\t}\n\n\tstatic ofNumberOrNull(expression: string): EShapeActionExpression<number | null> {\n\t\treturn this.from(expression, \"Number\", this.NULL, \"null\", true);\n\t}\n\n\tstatic ofStringOrNull(expression: string): EShapeActionExpression<string | null> {\n\t\treturn this.from(expression, \"String\", this.NULL, \"null\", true);\n\t}\n\n\tstatic ofUnknown(expression: string): EShapeActionExpression<unknown> {\n\t\treturn this.from(expression, \"\", this.NULL, \"null\", false);\n\t}\n\n\tstatic ofNumber(expression: string): EShapeActionExpression<number> {\n\t\treturn this.from(expression, \"Number\", this.ZERO, \"0\", false);\n\t}\n\n\tstatic ofNumberOrOne(expression: string): EShapeActionExpression<number> {\n\t\treturn this.from(expression, \"Number\", this.ONE, \"1\", false);\n\t}\n\n\tstatic ofNumberOrOneHundred(expression: string): EShapeActionExpression<number> {\n\t\treturn this.from(expression, \"Number\", this.ONE_HUNDRED, \"100\", false);\n\t}\n\n\tstatic ofString(expression: string): EShapeActionExpression<string> {\n\t\treturn this.from(expression, \"String\", this.EMPTY, '\"\"', false);\n\t}\n\n\tstatic ofBoolean(expression: string): EShapeActionExpression<boolean> {\n\t\treturn this.from(expression, \"Boolean\", this.TRUE, \"true\", false);\n\t}\n\n\tstatic ofBooleanOrTrue(expression: string): EShapeActionExpression<boolean> {\n\t\treturn this.from(expression, \"Boolean\", this.TRUE, \"true\", false);\n\t}\n\n\tstatic ofBooleanOrFalse(expression: string): EShapeActionExpression<boolean> {\n\t\treturn this.from(expression, \"Boolean\", this.FALSE, \"false\", false);\n\t}\n\n\tstatic ofElementOrNull<ELEMENT extends HTMLElement>(\n\t\texpression: string\n\t): EShapeActionExpressionWithParameter<ELEMENT | null, HTMLElement> | undefined {\n\t\treturn this.from(expression, \"\", undefined, \"null\", false, \"container\");\n\t}\n}\n"]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { __extends } from "tslib";
|
|
6
|
+
import { EShapeActionEnvironment } from "./e-shape-action-environment";
|
|
6
7
|
import { EShapeActionRuntimeConditional } from "./e-shape-action-runtime-conditional";
|
|
7
8
|
var EShapeActionRuntimeBlink = /** @class */ (function (_super) {
|
|
8
9
|
__extends(EShapeActionRuntimeBlink, _super);
|
|
@@ -12,7 +13,7 @@ var EShapeActionRuntimeBlink = /** @class */ (function (_super) {
|
|
|
12
13
|
return _this;
|
|
13
14
|
}
|
|
14
15
|
EShapeActionRuntimeBlink.prototype.execute = function (shape, runtime, time) {
|
|
15
|
-
if (this.condition(shape, time)) {
|
|
16
|
+
if (this.condition(shape, time, EShapeActionEnvironment)) {
|
|
16
17
|
var interval = this.interval;
|
|
17
18
|
var dinterval = interval << 1;
|
|
18
19
|
var elapsed = time % dinterval;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-runtime-blink.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-blink.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAIH,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAGtF;IAA8C,4CAA8B;IAG3E,kCAAY,KAA6B,EAAE,KAAyB;QAApE,YACC,kBAAM,KAAK,EAAE,KAAK,CAAC,SAEnB;QADA,KAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;;IAChC,CAAC;IAED,0CAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"e-shape-action-runtime-blink.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-blink.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAIH,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAGtF;IAA8C,4CAA8B;IAG3E,kCAAY,KAA6B,EAAE,KAAyB;QAApE,YACC,kBAAM,KAAK,EAAE,KAAK,CAAC,SAEnB;QADA,KAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;;IAChC,CAAC;IAED,0CAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,EAAE;YACzD,IAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;YAC/B,IAAM,SAAS,GAAG,QAAQ,IAAI,CAAC,CAAC;YAChC,IAAM,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;YACjC,IAAI,OAAO,GAAG,QAAQ,EAAE;gBACvB,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;gBAC3B,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,CAAC,QAAQ,GAAG,OAAO,CAAC,CAAC;aAC7C;iBAAM;gBACN,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;gBAC1B,OAAO,CAAC,MAAM,GAAG,IAAI,GAAG,CAAC,SAAS,GAAG,OAAO,CAAC,CAAC;aAC9C;SACD;IACF,CAAC;IAES,uCAAI,GAAd,UAAe,KAAa,EAAE,OAAsB;QACnD,EAAE;IACH,CAAC;IAES,wCAAK,GAAf,UAAgB,KAAa,EAAE,OAAsB;QACpD,EAAE;IACH,CAAC;IACF,+BAAC;AAAD,CAAC,AA9BD,CAA8C,8BAA8B,GA8B3E","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 { EShapeActionEnvironment } from \"./e-shape-action-environment\";\nimport { EShapeActionRuntimeConditional } from \"./e-shape-action-runtime-conditional\";\nimport { EShapeActionValueBlink } from \"./e-shape-action-value-blink\";\n\nexport class EShapeActionRuntimeBlink extends EShapeActionRuntimeConditional {\n\tprotected interval: number;\n\n\tconstructor(value: EShapeActionValueBlink, reset: EShapeRuntimeReset) {\n\t\tsuper(value, reset);\n\t\tthis.interval = value.interval;\n\t}\n\n\texecute(shape: EShape, runtime: EShapeRuntime, time: number): void {\n\t\tif (this.condition(shape, time, EShapeActionEnvironment)) {\n\t\t\tconst interval = this.interval;\n\t\t\tconst dinterval = interval << 1;\n\t\t\tconst elapsed = time % dinterval;\n\t\t\tif (elapsed < interval) {\n\t\t\t\tthis.toOff(shape, runtime);\n\t\t\t\truntime.effect = time + (interval - elapsed);\n\t\t\t} else {\n\t\t\t\tthis.toOn(shape, runtime);\n\t\t\t\truntime.effect = time + (dinterval - elapsed);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected toOn(shape: EShape, runtime: EShapeRuntime): void {\n\t\t//\n\t}\n\n\tprotected toOff(shape: EShape, runtime: EShapeRuntime): void {\n\t\t//\n\t}\n}\n"]}
|
|
@@ -6,6 +6,7 @@ import { __extends } from "tslib";
|
|
|
6
6
|
import { UtilRgb } from "../../util/util-rgb";
|
|
7
7
|
import { EShapeRuntimeReset } from "../e-shape-runtime";
|
|
8
8
|
import { EShapeActionBases } from "./e-shape-action-bases";
|
|
9
|
+
import { EShapeActionEnvironment } from "./e-shape-action-environment";
|
|
9
10
|
import { EShapeActionExpressions } from "./e-shape-action-expressions";
|
|
10
11
|
import { EShapeActionRuntimeChangeColorBase } from "./e-shape-action-runtime-change-color-base";
|
|
11
12
|
var EShapeActionRuntimeChangeColorBrightness = /** @class */ (function (_super) {
|
|
@@ -16,8 +17,8 @@ var EShapeActionRuntimeChangeColorBrightness = /** @class */ (function (_super)
|
|
|
16
17
|
return _this;
|
|
17
18
|
}
|
|
18
19
|
EShapeActionRuntimeChangeColorBrightness.prototype.execute = function (shape, runtime, time) {
|
|
19
|
-
if (this.condition(shape, time)) {
|
|
20
|
-
var brightness = this.brightness(shape, time);
|
|
20
|
+
if (this.condition(shape, time, EShapeActionEnvironment)) {
|
|
21
|
+
var brightness = this.brightness(shape, time, EShapeActionEnvironment);
|
|
21
22
|
this.set(shape, runtime, time, brightness);
|
|
22
23
|
}
|
|
23
24
|
};
|
package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-change-color-brightness.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-runtime-change-color-brightness.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-change-color-brightness.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAiB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"e-shape-action-runtime-change-color-brightness.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-change-color-brightness.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAiB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAGhG;IAA8D,4DAAkC;IAG/F,kDAAY,KAA6C;QAAzD,YACC,kBAAM,KAAK,CAAC,SAEZ;QADA,KAAI,CAAC,UAAU,GAAG,uBAAuB,CAAC,cAAc,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;;IAC5E,CAAC;IAED,0DAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,EAAE;YACzD,IAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,CAAC;YACzE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,O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CAAC;gBACjE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;aAClF;YACD,OAAO,CAAC,OAAO,IAAI,KAAK,CAAC;SACzB;IACF,CAAC;IAES,6DAAU,GAApB,UAAqB,KAAa,EAAE,UAAkB;QACrD,IAAI,CAAC,IAAI,UAAU,EAAE;YACpB,OAAO,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,UAAU,CAAC,CAAC;SAC5C;aAAM;YACN,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,UAAU,CAAC,CAAC;SAC1C;IACF,CAAC;IACF,+CAAC;AAAD,CAAC,AApDD,CAA8D,kCAAkC,GAoD/F","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { UtilRgb } from \"../../util/util-rgb\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeRuntime, EShapeRuntimeReset } from \"../e-shape-runtime\";\nimport { EShapeActionBases } from \"./e-shape-action-bases\";\nimport { EShapeActionEnvironment } from \"./e-shape-action-environment\";\nimport { EShapeActionExpression } from \"./e-shape-action-expression\";\nimport { EShapeActionExpressions } from \"./e-shape-action-expressions\";\nimport { EShapeActionRuntimeChangeColorBase } from \"./e-shape-action-runtime-change-color-base\";\nimport { EShapeActionValueChangeColorBrightness } from \"./e-shape-action-value-change-color-brightness\";\n\nexport class EShapeActionRuntimeChangeColorBrightness extends EShapeActionRuntimeChangeColorBase {\n\tprotected readonly brightness: EShapeActionExpression<number | null>;\n\n\tconstructor(value: EShapeActionValueChangeColorBrightness) {\n\t\tsuper(value);\n\t\tthis.brightness = EShapeActionExpressions.ofNumberOrNull(value.brightness);\n\t}\n\n\texecute(shape: EShape, runtime: EShapeRuntime, time: number): void {\n\t\tif (this.condition(shape, time, EShapeActionEnvironment)) {\n\t\t\tconst brightness = this.brightness(shape, time, EShapeActionEnvironment);\n\t\t\tthis.set(shape, runtime, time, brightness);\n\t\t}\n\t}\n\n\tprotected set(\n\t\tshape: EShape,\n\t\truntime: EShapeRuntime,\n\t\ttime: number,\n\t\tbrightness: number | null\n\t): void {\n\t\tconst reset = this.reset;\n\t\tif (brightness != null) {\n\t\t\tconst toAdjusted = this.toAdjusted;\n\n\t\t\tif (reset & EShapeRuntimeReset.COLOR_FILL) {\n\t\t\t\tconst base = EShapeActionBases.toBaseFill(shape, runtime);\n\t\t\t\tshape.fill.set(undefined, toAdjusted(base.color, brightness), base.alpha);\n\t\t\t}\n\t\t\tif (reset & EShapeRuntimeReset.COLOR_STROKE) {\n\t\t\t\tconst base = EShapeActionBases.toBaseStroke(shape, runtime);\n\t\t\t\tshape.stroke.set(undefined, toAdjusted(base.color, brightness), base.alpha);\n\t\t\t}\n\t\t\tif (reset & EShapeRuntimeReset.COLOR_TEXT) {\n\t\t\t\tconst base = EShapeActionBases.toBaseText(shape, runtime);\n\t\t\t\tshape.text.set(undefined, toAdjusted(base.color, brightness), base.alpha);\n\t\t\t}\n\t\t\tif (reset & EShapeRuntimeReset.COLOR_TEXT_OUTLINE) {\n\t\t\t\tconst base = EShapeActionBases.toBaseTextOutline(shape, runtime);\n\t\t\t\tshape.text.outline.set(undefined, toAdjusted(base.color, brightness), base.alpha);\n\t\t\t}\n\t\t\truntime.written |= reset;\n\t\t}\n\t}\n\n\tprotected toAdjusted(color: number, brightness: number): number {\n\t\tif (0 <= brightness) {\n\t\t\treturn UtilRgb.brighten(color, +brightness);\n\t\t} else {\n\t\t\treturn UtilRgb.darken(color, -brightness);\n\t\t}\n\t}\n}\n"]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { __extends } from "tslib";
|
|
6
|
+
import { EShapeActionEnvironment } from "./e-shape-action-environment";
|
|
6
7
|
import { EShapeActionExpressions } from "./e-shape-action-expressions";
|
|
7
8
|
import { EShapeActionRuntimeChangeColorBase } from "./e-shape-action-runtime-change-color-base";
|
|
8
9
|
var EShapeActionRuntimeChangeColorCode = /** @class */ (function (_super) {
|
|
@@ -15,10 +16,10 @@ var EShapeActionRuntimeChangeColorCode = /** @class */ (function (_super) {
|
|
|
15
16
|
return _this;
|
|
16
17
|
}
|
|
17
18
|
EShapeActionRuntimeChangeColorCode.prototype.execute = function (shape, runtime, time) {
|
|
18
|
-
if (this.condition(shape, time)) {
|
|
19
|
-
var color = this.color(shape, time);
|
|
20
|
-
var alpha = this.alpha(shape, time);
|
|
21
|
-
var blend = this.blend(shape, time);
|
|
19
|
+
if (this.condition(shape, time, EShapeActionEnvironment)) {
|
|
20
|
+
var color = this.color(shape, time, EShapeActionEnvironment);
|
|
21
|
+
var alpha = this.alpha(shape, time, EShapeActionEnvironment);
|
|
22
|
+
var blend = this.blend(shape, time, EShapeActionEnvironment);
|
|
22
23
|
this.set(shape, runtime, time, color, alpha, blend);
|
|
23
24
|
}
|
|
24
25
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-runtime-change-color-code.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-change-color-code.ts"],"names":[],"mappings":"AAAA;;;GAGG;;
|
|
1
|
+
{"version":3,"file":"e-shape-action-runtime-change-color-code.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-change-color-code.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAIH,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAGhG;IAAwD,sDAAkC;IAKzF,4CAAY,KAAuC;QAAnD,YACC,kBAAM,KAAK,CAAC,SAIZ;QAHA,KAAI,CAAC,KAAK,GAAG,uBAAuB,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACjE,KAAI,CAAC,KAAK,GAAG,uBAAuB,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACjE,KAAI,CAAC,KAAK,GAAG,uBAAuB,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;;IAClE,CAAC;IAED,oDAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,EAAE;YACzD,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,CAAC;YAC/D,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,CAAC;YAC/D,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,CAAC;YAC/D,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;SACpD;IACF,CAAC;IACF,yCAAC;AAAD,CAAC,AApBD,CAAwD,kCAAkC,GAoBzF","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"../e-shape\";\nimport { EShapeRuntime } from \"../e-shape-runtime\";\nimport { EShapeActionEnvironment } from \"./e-shape-action-environment\";\nimport { EShapeActionExpression } from \"./e-shape-action-expression\";\nimport { EShapeActionExpressions } from \"./e-shape-action-expressions\";\nimport { EShapeActionRuntimeChangeColorBase } from \"./e-shape-action-runtime-change-color-base\";\nimport { EShapeActionValueChangeColorCode } from \"./e-shape-action-value-change-color-code\";\n\nexport class EShapeActionRuntimeChangeColorCode extends EShapeActionRuntimeChangeColorBase {\n\tprotected readonly color: EShapeActionExpression<number | null>;\n\tprotected readonly alpha: EShapeActionExpression<number | null>;\n\tprotected readonly blend: EShapeActionExpression<number | null>;\n\n\tconstructor(value: EShapeActionValueChangeColorCode) {\n\t\tsuper(value);\n\t\tthis.color = EShapeActionExpressions.ofNumberOrNull(value.color);\n\t\tthis.alpha = EShapeActionExpressions.ofNumberOrNull(value.alpha);\n\t\tthis.blend = EShapeActionExpressions.ofNumberOrNull(value.blend);\n\t}\n\n\texecute(shape: EShape, runtime: EShapeRuntime, time: number): void {\n\t\tif (this.condition(shape, time, EShapeActionEnvironment)) {\n\t\t\tconst color = this.color(shape, time, EShapeActionEnvironment);\n\t\t\tconst alpha = this.alpha(shape, time, EShapeActionEnvironment);\n\t\t\tconst blend = this.blend(shape, time, EShapeActionEnvironment);\n\t\t\tthis.set(shape, runtime, time, color, alpha, blend);\n\t\t}\n\t}\n}\n"]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
5
|
import { __extends } from "tslib";
|
|
6
|
+
import { EShapeActionEnvironment } from "./e-shape-action-environment";
|
|
6
7
|
import { EShapeActionExpressions } from "./e-shape-action-expressions";
|
|
7
8
|
import { EShapeActionRuntimeChangeColorBase } from "./e-shape-action-runtime-change-color-base";
|
|
8
9
|
import { EShapeActionValueChangeColorTarget } from "./e-shape-action-value-change-color-target";
|
|
@@ -28,10 +29,10 @@ var EShapeActionRuntimeChangeColor = /** @class */ (function (_super) {
|
|
|
28
29
|
return _this;
|
|
29
30
|
}
|
|
30
31
|
EShapeActionRuntimeChangeColor.prototype.execute = function (shape, runtime, time) {
|
|
31
|
-
if (this.condition(shape, time)) {
|
|
32
|
+
if (this.condition(shape, time, EShapeActionEnvironment)) {
|
|
32
33
|
var color = this.color;
|
|
33
34
|
var alpha = this.alpha;
|
|
34
|
-
var blend = this.blend(shape, time);
|
|
35
|
+
var blend = this.blend(shape, time, EShapeActionEnvironment);
|
|
35
36
|
this.set(shape, runtime, time, color, alpha, blend);
|
|
36
37
|
}
|
|
37
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-runtime-change-color.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-change-color.ts"],"names":[],"mappings":"AAAA;;;GAGG;;
|
|
1
|
+
{"version":3,"file":"e-shape-action-runtime-change-color.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-change-color.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAIH,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAEhG,OAAO,EAAE,kCAAkC,EAAE,MAAM,4CAA4C,CAAC;AAEhG;IAAoD,kDAAkC;IAKrF,wCAAY,KAAmC;QAA/C,YACC,kBAAM,KAAK,CAAC,SAkBZ;QAhBA,QAAQ,KAAK,CAAC,MAAM,EAAE;YACrB,KAAK,kCAAkC,CAAC,KAAK;gBAC5C,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;gBACzB,KAAI,CAAC,KAAK,GAAG,IAAI,CAAC;gBAClB,MAAM;YACP,KAAK,kCAAkC,CAAC,KAAK;gBAC5C,KAAI,CAAC,KAAK,GAAG,IAAI,CAAC;gBAClB,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;gBACzB,MAAM;YACP;gBACC,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;gBACzB,KAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;gBACzB,MAAM;SACP;QAED,KAAI,CAAC,KAAK,GAAG,uBAAuB,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;;IAClE,CAAC;IAED,gDAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,EAAE;YACzD,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YACzB,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YACzB,IAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,CAAC;YAC/D,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;SACpD;IACF,CAAC;IACF,qCAAC;AAAD,CAAC,AAlCD,CAAoD,kCAAkC,GAkCrF","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"../e-shape\";\nimport { EShapeRuntime } from \"../e-shape-runtime\";\nimport { EShapeActionEnvironment } from \"./e-shape-action-environment\";\nimport { EShapeActionExpression } from \"./e-shape-action-expression\";\nimport { EShapeActionExpressions } from \"./e-shape-action-expressions\";\nimport { EShapeActionRuntimeChangeColorBase } from \"./e-shape-action-runtime-change-color-base\";\nimport { EShapeActionValueChangeColor } from \"./e-shape-action-value-change-color\";\nimport { EShapeActionValueChangeColorTarget } from \"./e-shape-action-value-change-color-target\";\n\nexport class EShapeActionRuntimeChangeColor extends EShapeActionRuntimeChangeColorBase {\n\tprotected readonly color: number | null;\n\tprotected readonly alpha: number | null;\n\tprotected readonly blend: EShapeActionExpression<number | null>;\n\n\tconstructor(value: EShapeActionValueChangeColor) {\n\t\tsuper(value);\n\n\t\tswitch (value.target) {\n\t\t\tcase EShapeActionValueChangeColorTarget.COLOR:\n\t\t\t\tthis.color = value.color;\n\t\t\t\tthis.alpha = null;\n\t\t\t\tbreak;\n\t\t\tcase EShapeActionValueChangeColorTarget.ALPHA:\n\t\t\t\tthis.color = null;\n\t\t\t\tthis.alpha = value.alpha;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthis.color = value.color;\n\t\t\t\tthis.alpha = value.alpha;\n\t\t\t\tbreak;\n\t\t}\n\n\t\tthis.blend = EShapeActionExpressions.ofNumberOrNull(value.blend);\n\t}\n\n\texecute(shape: EShape, runtime: EShapeRuntime, time: number): void {\n\t\tif (this.condition(shape, time, EShapeActionEnvironment)) {\n\t\t\tconst color = this.color;\n\t\t\tconst alpha = this.alpha;\n\t\t\tconst blend = this.blend(shape, time, EShapeActionEnvironment);\n\t\t\tthis.set(shape, runtime, time, color, alpha, blend);\n\t\t}\n\t}\n}\n"]}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { __extends } from "tslib";
|
|
6
6
|
import { EShapeRuntimeReset } from "../e-shape-runtime";
|
|
7
|
+
import { EShapeActionEnvironment } from "./e-shape-action-environment";
|
|
7
8
|
import { EShapeActionExpressions } from "./e-shape-action-expressions";
|
|
8
9
|
import { EShapeActionRuntimeConditional } from "./e-shape-action-runtime-conditional";
|
|
9
10
|
var EShapeActionRuntimeChangeCursor = /** @class */ (function (_super) {
|
|
@@ -14,8 +15,8 @@ var EShapeActionRuntimeChangeCursor = /** @class */ (function (_super) {
|
|
|
14
15
|
return _this;
|
|
15
16
|
}
|
|
16
17
|
EShapeActionRuntimeChangeCursor.prototype.execute = function (shape, runtime, time) {
|
|
17
|
-
if (this.condition(shape, time)) {
|
|
18
|
-
var name_1 = this.name(shape, time);
|
|
18
|
+
if (this.condition(shape, time, EShapeActionEnvironment)) {
|
|
19
|
+
var name_1 = this.name(shape, time, EShapeActionEnvironment);
|
|
19
20
|
if (name_1 != null) {
|
|
20
21
|
shape.cursor = name_1;
|
|
21
22
|
runtime.written |= this.reset;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-runtime-change-cursor.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-change-cursor.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAiB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAGtF;IAAqD,mDAA8B;IAGlF,yCAAY,KAAoC;QAAhD,YACC,kBAAM,KAAK,EAAE,kBAAkB,CAAC,MAAM,CAAC,SAEvC;QADA,KAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;;IAChE,CAAC;IAED,iDAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"e-shape-action-runtime-change-cursor.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-change-cursor.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAGH,OAAO,EAAiB,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAGtF;IAAqD,mDAA8B;IAGlF,yCAAY,KAAoC;QAAhD,YACC,kBAAM,KAAK,EAAE,kBAAkB,CAAC,MAAM,CAAC,SAEvC;QADA,KAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;;IAChE,CAAC;IAED,iDAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,EAAE;YACzD,IAAM,MAAI,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,CAAC;YAC7D,IAAI,MAAI,IAAI,IAAI,EAAE;gBACjB,KAAK,CAAC,MAAM,GAAG,MAAI,CAAC;gBACpB,OAAO,CAAC,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC;aAC9B;SACD;IACF,CAAC;IACF,sCAAC;AAAD,CAAC,AAjBD,CAAqD,8BAA8B,GAiBlF","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 { EShapeActionEnvironment } from \"./e-shape-action-environment\";\nimport { EShapeActionExpression } from \"./e-shape-action-expression\";\nimport { EShapeActionExpressions } from \"./e-shape-action-expressions\";\nimport { EShapeActionRuntimeConditional } from \"./e-shape-action-runtime-conditional\";\nimport { EShapeActionValueChangeCursor } from \"./e-shape-action-value-change-cursor\";\n\nexport class EShapeActionRuntimeChangeCursor extends EShapeActionRuntimeConditional {\n\tprotected name: EShapeActionExpression<string | null>;\n\n\tconstructor(value: EShapeActionValueChangeCursor) {\n\t\tsuper(value, EShapeRuntimeReset.CURSOR);\n\t\tthis.name = EShapeActionExpressions.ofStringOrNull(value.name);\n\t}\n\n\texecute(shape: EShape, runtime: EShapeRuntime, time: number): void {\n\t\tif (this.condition(shape, time, EShapeActionEnvironment)) {\n\t\t\tconst name = this.name(shape, time, EShapeActionEnvironment);\n\t\t\tif (name != null) {\n\t\t\t\tshape.cursor = name;\n\t\t\t\truntime.written |= this.reset;\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
|