@wcardinal/wcardinal-ui 0.438.0 → 0.440.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-misc-extension.d.ts +2 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-open-dialog-opener.d.ts +2 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-open-opener.d.ts +2 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-actions.d.ts +2 -1
- package/dist/types/wcardinal/ui/util/util-extract.d.ts +13 -0
- package/dist/wcardinal/ui/shape/action/e-shape-action-misc-extension.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-open-dialog-opener.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-open-opener.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-extension.js +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-misc-extension.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-extension.js +1 -1
- 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.js +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-actions.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-actions.js.map +1 -1
- package/dist/wcardinal/ui/util/util-extract.js +61 -6
- package/dist/wcardinal/ui/util/util-extract.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.js +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.min.js +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.js +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +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-en-us.js +1 -1
- package/dist/wcardinal-ui-theme-white-en-us.min.js +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.js +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.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 +66 -12
- package/dist/wcardinal-ui.js +66 -12
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DDiagram } from "../../d-diagram";
|
|
2
2
|
import { EShape } from "../e-shape";
|
|
3
|
+
import { EShapeActionEnvironment } from "./e-shape-action-environment";
|
|
3
4
|
import { EShapeActionValueMiscType } from "./e-shape-action-value-misc-type";
|
|
4
|
-
export type EShapeActionMiscExtensionExecutor = (argument: unknown, shape: EShape, diagram: DDiagram) => void;
|
|
5
|
+
export type EShapeActionMiscExtensionExecutor = (argument: unknown, shape: EShape, diagram: DDiagram, environment: EShapeActionEnvironment) => void;
|
|
5
6
|
export interface EShapeActionMiscExtension {
|
|
6
7
|
/**
|
|
7
8
|
* An ID of the misc. extension action.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { DDiagram } from "../../d-diagram";
|
|
2
2
|
import { EShape } from "../e-shape";
|
|
3
|
-
|
|
3
|
+
import { EShapeActionEnvironment } from "./e-shape-action-environment";
|
|
4
|
+
export type EShapeActionOpenDialogOpener = (target: string, argument: unknown, shape: EShape, diagram: DDiagram, environment: EShapeActionEnvironment) => void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { DDiagram } from "../../d-diagram";
|
|
2
2
|
import { EShape } from "../e-shape";
|
|
3
|
-
|
|
3
|
+
import { EShapeActionEnvironment } from "./e-shape-action-environment";
|
|
4
|
+
export type EShapeActionOpenOpener = (target: unknown, inNewWindow: boolean, shape: EShape, diagram: DDiagram, environment: EShapeActionEnvironment) => void;
|
|
@@ -3,11 +3,12 @@ import { EShape } from "../e-shape";
|
|
|
3
3
|
import { EShapeDataValueState } from "../e-shape-data-value-state";
|
|
4
4
|
import { EShapeEmbedded } from "../variant/e-shape-embedded";
|
|
5
5
|
import { DDiagram } from "../../d-diagram";
|
|
6
|
+
import { EShapeActionEnvironment } from "./e-shape-action-environment";
|
|
6
7
|
export declare class EShapeActions {
|
|
7
8
|
static isDiagram(target: unknown): target is DDiagram;
|
|
8
9
|
static isEmbedded(target: unknown): target is EShapeEmbedded;
|
|
9
10
|
static toDiagram(shape?: EShape | null): DDiagram | null;
|
|
10
|
-
static open(shape: EShape, type: DDiagramBaseControllerOpenType, target: unknown, inNewWindow: boolean): void;
|
|
11
|
+
static open(shape: EShape, type: DDiagramBaseControllerOpenType, target: unknown, inNewWindow: boolean, environment: EShapeActionEnvironment): void;
|
|
11
12
|
static writeLocal(shape: EShape, id: string, value: unknown, time: number, state?: EShapeDataValueState): boolean;
|
|
12
13
|
static writeRemote(shape: EShape, id: string, value: unknown): boolean;
|
|
13
14
|
static emit(shape: EShape, name: string): void;
|
|
@@ -40,9 +40,22 @@ export interface UtilExtractFileOptions extends UtilExtractBase64Options {
|
|
|
40
40
|
filename: string;
|
|
41
41
|
}
|
|
42
42
|
export declare class UtilExtract {
|
|
43
|
+
protected static WORK_RENDER_TEXTURE?: RenderTexture;
|
|
43
44
|
static texture(options: UtilExtractTextureOptions): RenderTexture;
|
|
45
|
+
/**
|
|
46
|
+
* Extracts pixels from the target.
|
|
47
|
+
* This method internally creates one render texture and use that to extract pixels from the target.
|
|
48
|
+
* To free the allocated render texture, please call {@link destroy()}.
|
|
49
|
+
*
|
|
50
|
+
* @param options an extraction options
|
|
51
|
+
* @returns extracted pixels
|
|
52
|
+
*/
|
|
44
53
|
static pixels(options: UtilExtractPixelsOptions): UtilExtractorPixels;
|
|
45
54
|
static canvas(options: UtilExtractCanvasOptions): utils.CanvasRenderTarget;
|
|
46
55
|
static base64(options: UtilExtractBase64Options): string;
|
|
47
56
|
static file(options: UtilExtractFileOptions): void;
|
|
57
|
+
/**
|
|
58
|
+
* Clears all the memories.
|
|
59
|
+
*/
|
|
60
|
+
static destroy(): void;
|
|
48
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-misc-extension.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-misc-extension.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagram } from \"../../d-diagram\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeActionValueMiscType } from \"./e-shape-action-value-misc-type\";\n\nexport type EShapeActionMiscExtensionExecutor = (\n\targument: unknown,\n\tshape: EShape,\n\tdiagram: DDiagram\n) => void;\n\nexport interface EShapeActionMiscExtension {\n\t/**\n\t * An ID of the misc. extension action.\n\t * This ID must be unique and greater than or equal to {@link EShapeActionValueMiscType.EXTENSION}.\n\t **/\n\ttype: EShapeActionValueMiscType;\n\tlabel: string;\n\texecutor: EShapeActionMiscExtensionExecutor;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"e-shape-action-misc-extension.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-misc-extension.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagram } from \"../../d-diagram\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeActionEnvironment } from \"./e-shape-action-environment\";\nimport { EShapeActionValueMiscType } from \"./e-shape-action-value-misc-type\";\n\nexport type EShapeActionMiscExtensionExecutor = (\n\targument: unknown,\n\tshape: EShape,\n\tdiagram: DDiagram,\n\tenvironment: EShapeActionEnvironment\n) => void;\n\nexport interface EShapeActionMiscExtension {\n\t/**\n\t * An ID of the misc. extension action.\n\t * This ID must be unique and greater than or equal to {@link EShapeActionValueMiscType.EXTENSION}.\n\t **/\n\ttype: EShapeActionValueMiscType;\n\tlabel: string;\n\texecutor: EShapeActionMiscExtensionExecutor;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-open-dialog-opener.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-open-dialog-opener.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagram } from \"../../d-diagram\";\nimport { EShape } from \"../e-shape\";\n\nexport type EShapeActionOpenDialogOpener = (\n\ttarget: string,\n\targument: unknown,\n\tshape: EShape,\n\tdiagram: DDiagram\n) => void;\n"]}
|
|
1
|
+
{"version":3,"file":"e-shape-action-open-dialog-opener.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-open-dialog-opener.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagram } from \"../../d-diagram\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeActionEnvironment } from \"./e-shape-action-environment\";\n\nexport type EShapeActionOpenDialogOpener = (\n\ttarget: string,\n\targument: unknown,\n\tshape: EShape,\n\tdiagram: DDiagram,\n\tenvironment: EShapeActionEnvironment\n) => void;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-open-opener.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-open-opener.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagram } from \"../../d-diagram\";\nimport { EShape } from \"../e-shape\";\n\nexport type EShapeActionOpenOpener = (\n\ttarget: unknown,\n\tinNewWindow: boolean,\n\tshape: EShape,\n\tdiagram: DDiagram\n) => void;\n"]}
|
|
1
|
+
{"version":3,"file":"e-shape-action-open-opener.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-open-opener.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagram } from \"../../d-diagram\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeActionEnvironment } from \"./e-shape-action-environment\";\n\nexport type EShapeActionOpenOpener = (\n\ttarget: unknown,\n\tinNewWindow: boolean,\n\tshape: EShape,\n\tdiagram: DDiagram,\n\tenvironment: EShapeActionEnvironment\n) => void;\n"]}
|
|
@@ -22,7 +22,7 @@ var EShapeActionRuntimeMiscExtension = /** @class */ (function (_super) {
|
|
|
22
22
|
if (extension != null && this.condition(shape, time, EShapeActionEnvironment)) {
|
|
23
23
|
var diagram = EShapeActions.toDiagram(shape);
|
|
24
24
|
if (diagram != null) {
|
|
25
|
-
extension.executor(this.argument(shape, time, EShapeActionEnvironment), shape, diagram);
|
|
25
|
+
extension.executor(this.argument(shape, time, EShapeActionEnvironment), shape, diagram, EShapeActionEnvironment);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-runtime-misc-extension.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-misc-extension.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAEtF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD;IAAsD,oDAA8B;IAInF,0CAAY,KAAqC;QAAjD,YACC,kBAAM,KAAK,EAAE,kBAAkB,CAAC,IAAI,CAAC,SAGrC;QAFA,KAAI,CAAC,QAAQ,GAAG,uBAAuB,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAClE,KAAI,CAAC,SAAS,GAAG,0BAA0B,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;;IAChE,CAAC;IAED,kDAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACjC,IAAI,SAAS,IAAI,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,EAAE;YAC9E,IAAM,OAAO,GAAG,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YAC/C,IAAI,OAAO,IAAI,IAAI,EAAE;gBACpB,SAAS,CAAC,QAAQ,CACjB,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,EACnD,KAAK,EACL,OAAO,
|
|
1
|
+
{"version":3,"file":"e-shape-action-runtime-misc-extension.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-misc-extension.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAEtF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD;IAAsD,oDAA8B;IAInF,0CAAY,KAAqC;QAAjD,YACC,kBAAM,KAAK,EAAE,kBAAkB,CAAC,IAAI,CAAC,SAGrC;QAFA,KAAI,CAAC,QAAQ,GAAG,uBAAuB,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAClE,KAAI,CAAC,SAAS,GAAG,0BAA0B,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;;IAChE,CAAC;IAED,kDAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACjC,IAAI,SAAS,IAAI,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,EAAE;YAC9E,IAAM,OAAO,GAAG,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YAC/C,IAAI,OAAO,IAAI,IAAI,EAAE;gBACpB,SAAS,CAAC,QAAQ,CACjB,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,EACnD,KAAK,EACL,OAAO,EACP,uBAAuB,CACvB,CAAC;aACF;SACD;IACF,CAAC;IACF,uCAAC;AAAD,CAAC,AAxBD,CAAsD,8BAA8B,GAwBnF","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 { EShapeRuntimeReset } from \"../e-shape-runtime-reset\";\nimport { EShapeActionEnvironment } from \"./e-shape-action-environment\";\nimport { EShapeActionExpression } from \"./e-shape-action-expression\";\nimport { EShapeActionExpressions } from \"./e-shape-action-expressions\";\nimport { EShapeActionMiscExtension } from \"./e-shape-action-misc-extension\";\nimport { EShapeActionMiscExtensions } from \"./e-shape-action-misc-extensions\";\nimport { EShapeActionRuntimeConditional } from \"./e-shape-action-runtime-conditional\";\nimport { EShapeActionValueMiscExtension } from \"./e-shape-action-value-misc-extension\";\nimport { EShapeActions } from \"./e-shape-actions\";\n\nexport class EShapeActionRuntimeMiscExtension extends EShapeActionRuntimeConditional {\n\tprotected extension?: EShapeActionMiscExtension;\n\tprotected argument: EShapeActionExpression<unknown>;\n\n\tconstructor(value: EShapeActionValueMiscExtension) {\n\t\tsuper(value, EShapeRuntimeReset.NONE);\n\t\tthis.argument = EShapeActionExpressions.ofUnknown(value.argument);\n\t\tthis.extension = EShapeActionMiscExtensions.get(value.subtype);\n\t}\n\n\texecute(shape: EShape, runtime: EShapeRuntime, time: number): void {\n\t\tconst extension = this.extension;\n\t\tif (extension != null && this.condition(shape, time, EShapeActionEnvironment)) {\n\t\t\tconst diagram = EShapeActions.toDiagram(shape);\n\t\t\tif (diagram != null) {\n\t\t\t\textension.executor(\n\t\t\t\t\tthis.argument(shape, time, EShapeActionEnvironment),\n\t\t\t\t\tshape,\n\t\t\t\t\tdiagram,\n\t\t\t\t\tEShapeActionEnvironment\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
|
|
@@ -31,7 +31,7 @@ var EShapeActionRuntimeOpenDialogExtension = /** @class */ (function (_super) {
|
|
|
31
31
|
if (diagram_1 != null) {
|
|
32
32
|
var argument_1 = this.argument(shape, time, EShapeActionEnvironment);
|
|
33
33
|
setTimeout(function () {
|
|
34
|
-
opener(target_1, argument_1, shape, diagram_1);
|
|
34
|
+
opener(target_1, argument_1, shape, diagram_1, EShapeActionEnvironment);
|
|
35
35
|
}, 0);
|
|
36
36
|
}
|
|
37
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-runtime-open-dialog-extension.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-extension.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAC;AAE3F,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAEtF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD;IAA4D,0DAA8B;IAKzF,gDAAY,KAA2C;QAAvD,YACC,kBAAM,KAAK,EAAE,kBAAkB,CAAC,IAAI,CAAC,SAOrC;QANA,KAAI,CAAC,MAAM,GAAG,uBAAuB,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACnE,KAAI,CAAC,QAAQ,GAAG,uBAAuB,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAClE,IAAM,SAAS,GAAG,gCAAgC,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACzE,IAAI,SAAS,EAAE;YACd,KAAI,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;SAC/B;;IACF,CAAC;IAED,wDAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,MAAM,EAAE;YACX,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,EAAE;gBACzD,IAAM,QAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,CAAC;gBACjE,IAAI,QAAM,IAAI,IAAI,EAAE;oBACnB,IAAM,SAAO,GAAG,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;oBAC/C,IAAI,SAAO,IAAI,IAAI,EAAE;wBACpB,IAAM,UAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,CAAC;wBACrE,UAAU,CAAC;4BACV,MAAM,CAAC,QAAM,EAAE,UAAQ,EAAE,KAAK,EAAE,SAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"e-shape-action-runtime-open-dialog-extension.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-extension.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAC;AAE3F,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAEtF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD;IAA4D,0DAA8B;IAKzF,gDAAY,KAA2C;QAAvD,YACC,kBAAM,KAAK,EAAE,kBAAkB,CAAC,IAAI,CAAC,SAOrC;QANA,KAAI,CAAC,MAAM,GAAG,uBAAuB,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACnE,KAAI,CAAC,QAAQ,GAAG,uBAAuB,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAClE,IAAM,SAAS,GAAG,gCAAgC,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACzE,IAAI,SAAS,EAAE;YACd,KAAI,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;SAC/B;;IACF,CAAC;IAED,wDAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,MAAM,EAAE;YACX,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,EAAE;gBACzD,IAAM,QAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,CAAC;gBACjE,IAAI,QAAM,IAAI,IAAI,EAAE;oBACnB,IAAM,SAAO,GAAG,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;oBAC/C,IAAI,SAAO,IAAI,IAAI,EAAE;wBACpB,IAAM,UAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,CAAC;wBACrE,UAAU,CAAC;4BACV,MAAM,CAAC,QAAM,EAAE,UAAQ,EAAE,KAAK,EAAE,SAAO,EAAE,uBAAuB,CAAC,CAAC;wBACnE,CAAC,EAAE,CAAC,CAAC,CAAC;qBACN;iBACD;aACD;SACD;IACF,CAAC;IACF,6CAAC;AAAD,CAAC,AAhCD,CAA4D,8BAA8B,GAgCzF","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 { EShapeRuntimeReset } from \"../e-shape-runtime-reset\";\nimport { EShapeActionEnvironment } from \"./e-shape-action-environment\";\nimport { EShapeActionExpression } from \"./e-shape-action-expression\";\nimport { EShapeActionExpressions } from \"./e-shape-action-expressions\";\nimport { EShapeActionOpenDialogExtensions } from \"./e-shape-action-open-dialog-extensions\";\nimport { EShapeActionOpenDialogOpener } from \"./e-shape-action-open-dialog-opener\";\nimport { EShapeActionRuntimeConditional } from \"./e-shape-action-runtime-conditional\";\nimport { EShapeActionValueOpenDialogExtension } from \"./e-shape-action-value-open-dialog-extension\";\nimport { EShapeActions } from \"./e-shape-actions\";\n\nexport class EShapeActionRuntimeOpenDialogExtension extends EShapeActionRuntimeConditional {\n\tprotected readonly target: EShapeActionExpression<string | null>;\n\tprotected readonly argument: EShapeActionExpression<unknown>;\n\tprotected readonly opener?: EShapeActionOpenDialogOpener;\n\n\tconstructor(value: EShapeActionValueOpenDialogExtension) {\n\t\tsuper(value, EShapeRuntimeReset.NONE);\n\t\tthis.target = EShapeActionExpressions.ofStringOrNull(value.target);\n\t\tthis.argument = EShapeActionExpressions.ofUnknown(value.argument);\n\t\tconst extension = EShapeActionOpenDialogExtensions.get(value.dialogType);\n\t\tif (extension) {\n\t\t\tthis.opener = extension.opener;\n\t\t}\n\t}\n\n\texecute(shape: EShape, runtime: EShapeRuntime, time: number): void {\n\t\tconst opener = this.opener;\n\t\tif (opener) {\n\t\t\tif (this.condition(shape, time, EShapeActionEnvironment)) {\n\t\t\t\tconst target = this.target(shape, time, EShapeActionEnvironment);\n\t\t\t\tif (target != null) {\n\t\t\t\t\tconst diagram = EShapeActions.toDiagram(shape);\n\t\t\t\t\tif (diagram != null) {\n\t\t\t\t\t\tconst argument = this.argument(shape, time, EShapeActionEnvironment);\n\t\t\t\t\t\tsetTimeout(() => {\n\t\t\t\t\t\t\topener(target, argument, shape, diagram, EShapeActionEnvironment);\n\t\t\t\t\t\t}, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
|
|
@@ -21,7 +21,7 @@ var EShapeActionRuntimeOpen = /** @class */ (function (_super) {
|
|
|
21
21
|
if (this.condition(shape, time, EShapeActionEnvironment)) {
|
|
22
22
|
var target = this.target(shape, time, EShapeActionEnvironment);
|
|
23
23
|
if (target != null) {
|
|
24
|
-
EShapeActions.open(shape, this.subtype, target, this.inNewWindow);
|
|
24
|
+
EShapeActions.open(shape, this.subtype, target, this.inNewWindow, EShapeActionEnvironment);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-action-runtime-open.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-open.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAKH,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIlD;IAA6C,2CAA8B;IAK1E,iCACC,KAA6D,EAC7D,OAAuC;QAFxC,YAIC,kBAAM,KAAK,EAAE,kBAAkB,CAAC,IAAI,CAAC,SAIrC;QAHA,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,KAAI,CAAC,MAAM,GAAG,uBAAuB,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC9D,KAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;;IACtC,CAAC;IAED,yCAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,EAAE;YACzD,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,CAAC;YACjE,IAAI,MAAM,IAAI,IAAI,EAAE;gBACnB,aAAa,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"e-shape-action-runtime-open.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-action-runtime-open.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAKH,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAIlD;IAA6C,2CAA8B;IAK1E,iCACC,KAA6D,EAC7D,OAAuC;QAFxC,YAIC,kBAAM,KAAK,EAAE,kBAAkB,CAAC,IAAI,CAAC,SAIrC;QAHA,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,KAAI,CAAC,MAAM,GAAG,uBAAuB,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC9D,KAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;;IACtC,CAAC;IAED,yCAAO,GAAP,UAAQ,KAAa,EAAE,OAAsB,EAAE,IAAY;QAC1D,IAAI,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,EAAE;YACzD,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,uBAAuB,CAAC,CAAC;YACjE,IAAI,MAAM,IAAI,IAAI,EAAE;gBACnB,aAAa,CAAC,IAAI,CACjB,KAAK,EACL,IAAI,CAAC,OAAO,EACZ,MAAM,EACN,IAAI,CAAC,WAAW,EAChB,uBAAuB,CACvB,CAAC;aACF;SACD;IACF,CAAC;IACF,8BAAC;AAAD,CAAC,AA7BD,CAA6C,8BAA8B,GA6B1E","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramBaseControllerOpenType } from \"../../d-diagram-base-controller\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeRuntime } from \"../e-shape-runtime\";\nimport { EShapeRuntimeReset } from \"../e-shape-runtime-reset\";\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 { EShapeActions } from \"./e-shape-actions\";\nimport { EShapeActionValueOpen } from \"./e-shape-action-value-open\";\nimport { EShapeActionValueOpenExtension } from \"./e-shape-action-value-open-extension\";\n\nexport class EShapeActionRuntimeOpen extends EShapeActionRuntimeConditional {\n\tprotected subtype: number;\n\tprotected readonly target: EShapeActionExpression<unknown>;\n\tprotected inNewWindow: boolean;\n\n\tconstructor(\n\t\tvalue: EShapeActionValueOpen | EShapeActionValueOpenExtension,\n\t\tsubtype: DDiagramBaseControllerOpenType\n\t) {\n\t\tsuper(value, EShapeRuntimeReset.NONE);\n\t\tthis.subtype = subtype;\n\t\tthis.target = EShapeActionExpressions.ofUnknown(value.target);\n\t\tthis.inNewWindow = value.inNewWindow;\n\t}\n\n\texecute(shape: EShape, runtime: EShapeRuntime, time: number): void {\n\t\tif (this.condition(shape, time, EShapeActionEnvironment)) {\n\t\t\tconst target = this.target(shape, time, EShapeActionEnvironment);\n\t\t\tif (target != null) {\n\t\t\t\tEShapeActions.open(\n\t\t\t\t\tshape,\n\t\t\t\t\tthis.subtype,\n\t\t\t\t\ttarget,\n\t\t\t\t\tthis.inNewWindow,\n\t\t\t\t\tEShapeActionEnvironment\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
|
|
@@ -29,12 +29,12 @@ var EShapeActions = /** @class */ (function () {
|
|
|
29
29
|
}
|
|
30
30
|
return null;
|
|
31
31
|
};
|
|
32
|
-
EShapeActions.open = function (shape, type, target, inNewWindow) {
|
|
32
|
+
EShapeActions.open = function (shape, type, target, inNewWindow, environment) {
|
|
33
33
|
var opener = EShapeActionOpenOpeners[type];
|
|
34
34
|
if (opener != null) {
|
|
35
35
|
var diagram = this.toDiagram(shape);
|
|
36
36
|
if (diagram) {
|
|
37
|
-
opener(target, inNewWindow, shape, diagram);
|
|
37
|
+
opener(target, inNewWindow, shape, diagram, environment);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
else if (isString(target)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-actions.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-actions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"e-shape-actions.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/action/e-shape-actions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,8BAA8B,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,QAA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right (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DApplications } from \"../../d-applications\";\nimport { DDiagramBaseControllerOpenType } from \"../../d-diagram-base-controller\";\nimport { DDiagrams } from \"../../d-diagrams\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeDataValueState } from \"../e-shape-data-value-state\";\nimport { EShapeEmbedded } from \"../variant/e-shape-embedded\";\nimport { EShapeActionOpenOpeners } from \"./e-shape-action-open-openers\";\nimport { isString } from \"../../util/is-string\";\nimport { DDiagram } from \"../../d-diagram\";\nimport { EShapeActionEnvironment } from \"./e-shape-action-environment\";\n\nexport class EShapeActions {\n\tstatic isDiagram(target: unknown): target is DDiagram {\n\t\treturn target instanceof DDiagram;\n\t}\n\n\tstatic isEmbedded(target: unknown): target is EShapeEmbedded {\n\t\treturn target instanceof EShapeEmbedded;\n\t}\n\n\tstatic toDiagram(shape?: EShape | null): DDiagram | null {\n\t\tlet current: { parent: any } | null | undefined = shape;\n\t\twhile (current != null) {\n\t\t\tif (this.isDiagram(current)) {\n\t\t\t\treturn current;\n\t\t\t}\n\t\t\tcurrent = current.parent;\n\t\t}\n\t\treturn null;\n\t}\n\n\tstatic open(\n\t\tshape: EShape,\n\t\ttype: DDiagramBaseControllerOpenType,\n\t\ttarget: unknown,\n\t\tinNewWindow: boolean,\n\t\tenvironment: EShapeActionEnvironment\n\t): void {\n\t\tconst opener = EShapeActionOpenOpeners[type];\n\t\tif (opener != null) {\n\t\t\tconst diagram = this.toDiagram(shape);\n\t\t\tif (diagram) {\n\t\t\t\topener(target, inNewWindow, shape, diagram, environment);\n\t\t\t}\n\t\t} else if (isString(target)) {\n\t\t\tswitch (type) {\n\t\t\t\tcase DDiagramBaseControllerOpenType.DIAGRAM:\n\t\t\t\t\tconst diagram = this.toDiagram(shape);\n\t\t\t\t\tif (diagram) {\n\t\t\t\t\t\tconst controller = diagram.controller;\n\t\t\t\t\t\tif (controller) {\n\t\t\t\t\t\t\tcontroller.getByName(target).then((found): void => {\n\t\t\t\t\t\t\t\tdiagram.set(DDiagrams.toSerialized(found));\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\tbreak;\n\t\t\t\tcase DDiagramBaseControllerOpenType.PAGE:\n\t\t\t\t\tif (inNewWindow) {\n\t\t\t\t\t\twindow.open(target);\n\t\t\t\t\t} else {\n\t\t\t\t\t\twindow.location.href = target;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic writeLocal(\n\t\tshape: EShape,\n\t\tid: string,\n\t\tvalue: unknown,\n\t\ttime: number,\n\t\tstate: EShapeDataValueState = EShapeDataValueState.FOUND\n\t): boolean {\n\t\tlet current: { parent: any } | null | undefined = shape;\n\t\twhile (current != null) {\n\t\t\tif (this.isDiagram(current)) {\n\t\t\t\tif (current.data.private.set(id, value, time, state)) {\n\t\t\t\t\tDApplications.update(current);\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (current.data.protected.set(id, value, time, state)) {\n\t\t\t\t\tDApplications.update(current);\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\tif (current.data.set(id, value, time, state)) {\n\t\t\t\t\t\tDApplications.update(current);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} else if (this.isEmbedded(current)) {\n\t\t\t\tif (current.data.getPrivate()?.set(id, value, time, state)) {\n\t\t\t\t\tDApplications.update(current);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcurrent = current.parent;\n\t\t}\n\t\treturn false;\n\t}\n\n\tstatic writeRemote(shape: EShape, id: string, value: unknown): boolean {\n\t\tconst diagram = this.toDiagram(shape);\n\t\tif (diagram) {\n\t\t\treturn diagram.data.remote.set(id, value);\n\t\t}\n\t\treturn false;\n\t}\n\n\tstatic emit(shape: EShape, name: string): void;\n\tstatic emit(shape: EShape, name: string, value: unknown, time: number): void;\n\tstatic emit(shape: EShape, name: string, value?: unknown, time?: number): void {\n\t\tconst diagram = EShapeActions.toDiagram(shape);\n\t\tif (time === undefined) {\n\t\t\tshape.emit(name, shape);\n\t\t\tif (diagram) {\n\t\t\t\tdiagram.shape.emit(name, shape);\n\t\t\t}\n\t\t} else {\n\t\t\tshape.emit(name, value, time, shape);\n\t\t\tif (diagram) {\n\t\t\t\tdiagram.shape.emit(name, value, time, shape);\n\t\t\t}\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
|
+
import { Matrix, RenderTexture, SCALE_MODES } from "pixi.js";
|
|
5
6
|
import { DApplications } from "../d-applications";
|
|
6
7
|
import { isNumber } from "./is-number";
|
|
7
8
|
import { UtilExtractor } from "./util-extractor";
|
|
@@ -61,17 +62,61 @@ var UtilExtract = /** @class */ (function () {
|
|
|
61
62
|
var skipUpdateTransform = (_a = options.transform) === null || _a === void 0 ? void 0 : _a.update;
|
|
62
63
|
return UtilExtractor.toTexture(target, resolution, options.clear, skipUpdateTransform);
|
|
63
64
|
};
|
|
65
|
+
/**
|
|
66
|
+
* Extracts pixels from the target.
|
|
67
|
+
* This method internally creates one render texture and use that to extract pixels from the target.
|
|
68
|
+
* To free the allocated render texture, please call {@link destroy()}.
|
|
69
|
+
*
|
|
70
|
+
* @param options an extraction options
|
|
71
|
+
* @returns extracted pixels
|
|
72
|
+
*/
|
|
64
73
|
UtilExtract.pixels = function (options) {
|
|
74
|
+
var _a;
|
|
65
75
|
var renderer = toRenderer(options);
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
76
|
+
// Create a render texture
|
|
77
|
+
var target = options.target;
|
|
78
|
+
var scale = target.transform.scale;
|
|
79
|
+
var width = Math.floor(target.width * scale.x);
|
|
80
|
+
var height = Math.floor(target.height * scale.y);
|
|
81
|
+
var resolution = toResolution(options);
|
|
82
|
+
var renderTexture = UtilExtract.WORK_RENDER_TEXTURE;
|
|
83
|
+
if (renderTexture == null) {
|
|
84
|
+
renderTexture = RenderTexture.create({
|
|
85
|
+
width: width,
|
|
86
|
+
height: height,
|
|
87
|
+
scaleMode: SCALE_MODES.LINEAR,
|
|
88
|
+
resolution: resolution
|
|
89
|
+
});
|
|
90
|
+
UtilExtract.WORK_RENDER_TEXTURE = renderTexture;
|
|
69
91
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
92
|
+
else {
|
|
93
|
+
var baseTexture = renderTexture.baseTexture;
|
|
94
|
+
var baseTextureWidth = baseTexture.width;
|
|
95
|
+
var baseTextureHeight = baseTexture.height;
|
|
96
|
+
var isWidthDirty = baseTextureWidth < width;
|
|
97
|
+
var isHeightDirty = baseTextureHeight < height;
|
|
98
|
+
var isResolutionDirty = renderTexture.resolution !== resolution;
|
|
99
|
+
if (isResolutionDirty || isWidthDirty || isHeightDirty) {
|
|
100
|
+
if (isResolutionDirty) {
|
|
101
|
+
baseTexture.resolution = resolution;
|
|
102
|
+
}
|
|
103
|
+
renderTexture.resize(Math.max(width, baseTextureWidth), Math.max(height, baseTextureHeight), true);
|
|
73
104
|
}
|
|
74
105
|
}
|
|
106
|
+
// Render to the render texture
|
|
107
|
+
var frame = renderTexture.frame;
|
|
108
|
+
if (frame.x !== 0 || frame.y !== 0 || frame.width !== width || frame.height !== height) {
|
|
109
|
+
frame.x = 0;
|
|
110
|
+
frame.y = 0;
|
|
111
|
+
frame.width = width;
|
|
112
|
+
frame.height = height;
|
|
113
|
+
renderTexture.frame = frame;
|
|
114
|
+
}
|
|
115
|
+
var targetPosition = target.position;
|
|
116
|
+
var matrix = new Matrix(1, 0, 0, 1, -targetPosition.x, -targetPosition.y);
|
|
117
|
+
renderer.render(target, renderTexture, options.clear, matrix, (_a = options.transform) === null || _a === void 0 ? void 0 : _a.update);
|
|
118
|
+
// Extract pixels
|
|
119
|
+
return UtilExtractor.toPixels(renderTexture, renderer);
|
|
75
120
|
};
|
|
76
121
|
UtilExtract.canvas = function (options) {
|
|
77
122
|
var _a, _b;
|
|
@@ -94,6 +139,16 @@ var UtilExtract = /** @class */ (function () {
|
|
|
94
139
|
UtilExtract.file = function (options) {
|
|
95
140
|
UtilFileDownloader.downloadUrl(options.filename, this.base64(options));
|
|
96
141
|
};
|
|
142
|
+
/**
|
|
143
|
+
* Clears all the memories.
|
|
144
|
+
*/
|
|
145
|
+
UtilExtract.destroy = function () {
|
|
146
|
+
var texture = this.WORK_RENDER_TEXTURE;
|
|
147
|
+
if (texture != null) {
|
|
148
|
+
this.WORK_RENDER_TEXTURE = undefined;
|
|
149
|
+
texture.destroy(true);
|
|
150
|
+
}
|
|
151
|
+
};
|
|
97
152
|
return UtilExtract;
|
|
98
153
|
}());
|
|
99
154
|
export { UtilExtract };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util-extract.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/util/util-extract.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AA+C5D,IAAM,YAAY,GAAG,UAAC,OAAkC;;IACvD,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,IAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACtC,IAAI,UAAU,IAAI,IAAI,EAAE;QACvB,IAAI,QAAQ,CAAC,UAAU,CAAC,EAAE;YACzB,OAAO,UAAU,CAAC;SAClB;aAAM;YACN,IAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;YACrC,IAAM,IAAI,GAAG,IAAI,CA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AAO,CAAC,OAAO,CAAC,CAAC;SAC9E;gBAAS;YACT,IAAI,MAAM,EAAE;gBACX,MAAM,CAAC,OAAO,EAAE,CAAC;aACjB;SACD;IACF,CAAC;IAEM,gBAAI,GAAX,UAAY,OAA+B;QAC1C,kBAAkB,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACxE,CAAC;IACF,kBAAC;AAAD,CAAC,AAzCD,IAyCC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Renderer, RenderTexture, utils } from \"pixi.js\";\nimport { DApplicationLayerLike } from \"../d-application-layer-like\";\nimport { DApplicationLike } from \"../d-application-like\";\nimport { DApplications } from \"../d-applications\";\nimport { DBase } from \"../d-base\";\nimport { isNumber } from \"./is-number\";\nimport { UtilExtractor } from \"./util-extractor\";\nimport { UtilExtractorPixels } from \"./util-extractor-pixels\";\nimport { UtilFileDownloader } from \"./util-file-downloader\";\n\nexport interface UtilExtractTextureResolutionOptions {\n\tsize: number;\n}\n\nexport interface UtilExtractTextureTransformOptions {\n\tupdate?: boolean;\n}\n\nexport interface UtilExtractTextureOptions {\n\ttarget: DBase;\n\tresolution?: number | UtilExtractTextureResolutionOptions;\n\ttransform?: UtilExtractTextureTransformOptions;\n\tclear?: boolean;\n}\n\nexport interface UtilExtractPixelsOptions extends UtilExtractTextureOptions {\n\trenderer?: Renderer;\n\tapplication?: DApplicationLike;\n\tlayer?: DApplicationLayerLike;\n}\n\nexport interface UtilExtractCanvasScaleOptions {\n\tsize: number;\n}\n\nexport interface UtilExtractCanvasAlphaOptions {\n\tpremultiplied?: {\n\t\tignore?: boolean;\n\t};\n}\n\nexport interface UtilExtractCanvasOptions extends UtilExtractPixelsOptions {\n\tscale?: number | UtilExtractCanvasScaleOptions;\n\talpha?: UtilExtractCanvasAlphaOptions;\n}\n\nexport interface UtilExtractBase64Options extends UtilExtractCanvasOptions {\n\tformat?: string;\n\tquality?: number;\n}\n\nexport interface UtilExtractFileOptions extends UtilExtractBase64Options {\n\tfilename: string;\n}\n\nconst toResolution = (options: UtilExtractTextureOptions): number => {\n\tconst target = options.target;\n\tconst resolution = options.resolution;\n\tif (resolution != null) {\n\t\tif (isNumber(resolution)) {\n\t\t\treturn resolution;\n\t\t} else {\n\t\t\tconst scale = target.transform.scale;\n\t\t\tconst size = Math.max(target.width * scale.x, target.height * scale.y);\n\t\t\treturn Math.min(1, resolution.size / size);\n\t\t}\n\t} else {\n\t\treturn window.devicePixelRatio ?? 1;\n\t}\n};\n\nconst toScale = (\n\tpixels: UtilExtractorPixels,\n\toptions: UtilExtractCanvasOptions\n): number | undefined => {\n\tconst scale = options.scale;\n\tif (scale != null) {\n\t\tif (isNumber(scale)) {\n\t\t\treturn scale;\n\t\t} else {\n\t\t\tconst size = scale.size;\n\t\t\treturn Math.min(1, size / pixels.width, size / pixels.height);\n\t\t}\n\t}\n};\n\nconst toRenderer = (options: UtilExtractPixelsOptions): Renderer => {\n\tconst renderer = options.renderer;\n\tif (renderer) {\n\t\treturn renderer;\n\t}\n\tconst application = options.application;\n\tif (application) {\n\t\treturn application.getLayerBase().renderer;\n\t}\n\tconst layer = options.layer || DApplications.getLayer(options.target);\n\tif (layer) {\n\t\treturn layer.renderer;\n\t}\n\tthrow new Error(\"No renderer / application / layer found.\");\n};\n\nexport class UtilExtract {\n\tstatic texture(options: UtilExtractTextureOptions): RenderTexture {\n\t\tconst target = options.target;\n\t\tconst resolution = toResolution(options);\n\t\tconst skipUpdateTransform = options.transform?.update;\n\t\treturn UtilExtractor.toTexture(target, resolution, options.clear, skipUpdateTransform);\n\t}\n\n\tstatic pixels(options: UtilExtractPixelsOptions): UtilExtractorPixels {\n\t\tconst renderer = toRenderer(options);\n\t\tconst texture = this.texture(options);\n\t\ttry {\n\t\t\treturn UtilExtractor.toPixels(texture, renderer);\n\t\t} finally {\n\t\t\tif (texture) {\n\t\t\t\ttexture.destroy();\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic canvas(options: UtilExtractCanvasOptions): utils.CanvasRenderTarget {\n\t\tconst pixels = this.pixels(options);\n\t\tconst ignorePremutipliedAlpha = options.alpha?.premultiplied?.ignore;\n\t\tconst scale = toScale(pixels, options);\n\t\treturn UtilExtractor.toCanvas(pixels, scale, ignorePremutipliedAlpha);\n\t}\n\n\tstatic base64(options: UtilExtractBase64Options): string {\n\t\tconst canvas = this.canvas(options);\n\t\ttry {\n\t\t\treturn UtilExtractor.toBase64(canvas.canvas, options.format, options.quality);\n\t\t} finally {\n\t\t\tif (canvas) {\n\t\t\t\tcanvas.destroy();\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic file(options: UtilExtractFileOptions): void {\n\t\tUtilFileDownloader.downloadUrl(options.filename, this.base64(options));\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"util-extract.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/util/util-extract.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAY,aAAa,EAAE,WAAW,EAAS,MAAM,SAAS,CAAC;AAG9E,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AA+C5D,IAAM,YAAY,GAAG,UAAC,OAAkC;;IACvD,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAC9B,IAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACtC,IAAI,UAAU,IAAI,IAAI,EAAE;QACvB,IAAI,QAAQ,CAAC,UAAU,CAAC,EAAE;YACzB,OAAO,UAAU,CAAC;SAClB;aAAM;YACN,IAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,KA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I,CAAC,CAAC;SACtB;IACF,CAAC;IACF,kBAAC;AAAD,CAAC,AA1GD,IA0GC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Matrix, Renderer, RenderTexture, SCALE_MODES, utils } from \"pixi.js\";\nimport { DApplicationLayerLike } from \"../d-application-layer-like\";\nimport { DApplicationLike } from \"../d-application-like\";\nimport { DApplications } from \"../d-applications\";\nimport { DBase } from \"../d-base\";\nimport { isNumber } from \"./is-number\";\nimport { UtilExtractor } from \"./util-extractor\";\nimport { UtilExtractorPixels } from \"./util-extractor-pixels\";\nimport { UtilFileDownloader } from \"./util-file-downloader\";\n\nexport interface UtilExtractTextureResolutionOptions {\n\tsize: number;\n}\n\nexport interface UtilExtractTextureTransformOptions {\n\tupdate?: boolean;\n}\n\nexport interface UtilExtractTextureOptions {\n\ttarget: DBase;\n\tresolution?: number | UtilExtractTextureResolutionOptions;\n\ttransform?: UtilExtractTextureTransformOptions;\n\tclear?: boolean;\n}\n\nexport interface UtilExtractPixelsOptions extends UtilExtractTextureOptions {\n\trenderer?: Renderer;\n\tapplication?: DApplicationLike;\n\tlayer?: DApplicationLayerLike;\n}\n\nexport interface UtilExtractCanvasScaleOptions {\n\tsize: number;\n}\n\nexport interface UtilExtractCanvasAlphaOptions {\n\tpremultiplied?: {\n\t\tignore?: boolean;\n\t};\n}\n\nexport interface UtilExtractCanvasOptions extends UtilExtractPixelsOptions {\n\tscale?: number | UtilExtractCanvasScaleOptions;\n\talpha?: UtilExtractCanvasAlphaOptions;\n}\n\nexport interface UtilExtractBase64Options extends UtilExtractCanvasOptions {\n\tformat?: string;\n\tquality?: number;\n}\n\nexport interface UtilExtractFileOptions extends UtilExtractBase64Options {\n\tfilename: string;\n}\n\nconst toResolution = (options: UtilExtractTextureOptions): number => {\n\tconst target = options.target;\n\tconst resolution = options.resolution;\n\tif (resolution != null) {\n\t\tif (isNumber(resolution)) {\n\t\t\treturn resolution;\n\t\t} else {\n\t\t\tconst scale = target.transform.scale;\n\t\t\tconst size = Math.max(target.width * scale.x, target.height * scale.y);\n\t\t\treturn Math.min(1, resolution.size / size);\n\t\t}\n\t} else {\n\t\treturn window.devicePixelRatio ?? 1;\n\t}\n};\n\nconst toScale = (\n\tpixels: UtilExtractorPixels,\n\toptions: UtilExtractCanvasOptions\n): number | undefined => {\n\tconst scale = options.scale;\n\tif (scale != null) {\n\t\tif (isNumber(scale)) {\n\t\t\treturn scale;\n\t\t} else {\n\t\t\tconst size = scale.size;\n\t\t\treturn Math.min(1, size / pixels.width, size / pixels.height);\n\t\t}\n\t}\n};\n\nconst toRenderer = (options: UtilExtractPixelsOptions): Renderer => {\n\tconst renderer = options.renderer;\n\tif (renderer) {\n\t\treturn renderer;\n\t}\n\tconst application = options.application;\n\tif (application) {\n\t\treturn application.getLayerBase().renderer;\n\t}\n\tconst layer = options.layer || DApplications.getLayer(options.target);\n\tif (layer) {\n\t\treturn layer.renderer;\n\t}\n\tthrow new Error(\"No renderer / application / layer found.\");\n};\n\nexport class UtilExtract {\n\tprotected static WORK_RENDER_TEXTURE?: RenderTexture;\n\n\tstatic texture(options: UtilExtractTextureOptions): RenderTexture {\n\t\tconst target = options.target;\n\t\tconst resolution = toResolution(options);\n\t\tconst skipUpdateTransform = options.transform?.update;\n\t\treturn UtilExtractor.toTexture(target, resolution, options.clear, skipUpdateTransform);\n\t}\n\n\t/**\n\t * Extracts pixels from the target.\n\t * This method internally creates one render texture and use that to extract pixels from the target.\n\t * To free the allocated render texture, please call {@link destroy()}.\n\t *\n\t * @param options an extraction options\n\t * @returns extracted pixels\n\t */\n\tstatic pixels(options: UtilExtractPixelsOptions): UtilExtractorPixels {\n\t\tconst renderer = toRenderer(options);\n\n\t\t// Create a render texture\n\t\tconst target = options.target;\n\t\tconst scale = target.transform.scale;\n\t\tconst width = Math.floor(target.width * scale.x);\n\t\tconst height = Math.floor(target.height * scale.y);\n\t\tconst resolution = toResolution(options);\n\t\tlet renderTexture = UtilExtract.WORK_RENDER_TEXTURE;\n\t\tif (renderTexture == null) {\n\t\t\trenderTexture = RenderTexture.create({\n\t\t\t\twidth,\n\t\t\t\theight,\n\t\t\t\tscaleMode: SCALE_MODES.LINEAR,\n\t\t\t\tresolution\n\t\t\t});\n\t\t\tUtilExtract.WORK_RENDER_TEXTURE = renderTexture;\n\t\t} else {\n\t\t\tconst baseTexture = renderTexture.baseTexture;\n\t\t\tconst baseTextureWidth = baseTexture.width;\n\t\t\tconst baseTextureHeight = baseTexture.height;\n\t\t\tconst isWidthDirty = baseTextureWidth < width;\n\t\t\tconst isHeightDirty = baseTextureHeight < height;\n\t\t\tconst isResolutionDirty = renderTexture.resolution !== resolution;\n\t\t\tif (isResolutionDirty || isWidthDirty || isHeightDirty) {\n\t\t\t\tif (isResolutionDirty) {\n\t\t\t\t\tbaseTexture.resolution = resolution;\n\t\t\t\t}\n\t\t\t\trenderTexture.resize(\n\t\t\t\t\tMath.max(width, baseTextureWidth),\n\t\t\t\t\tMath.max(height, baseTextureHeight),\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// Render to the render texture\n\t\tconst frame = renderTexture.frame;\n\t\tif (frame.x !== 0 || frame.y !== 0 || frame.width !== width || frame.height !== height) {\n\t\t\tframe.x = 0;\n\t\t\tframe.y = 0;\n\t\t\tframe.width = width;\n\t\t\tframe.height = height;\n\t\t\trenderTexture.frame = frame;\n\t\t}\n\n\t\tconst targetPosition = target.position;\n\t\tconst matrix = new Matrix(1, 0, 0, 1, -targetPosition.x, -targetPosition.y);\n\n\t\trenderer.render(target, renderTexture, options.clear, matrix, options.transform?.update);\n\n\t\t// Extract pixels\n\t\treturn UtilExtractor.toPixels(renderTexture, renderer);\n\t}\n\n\tstatic canvas(options: UtilExtractCanvasOptions): utils.CanvasRenderTarget {\n\t\tconst pixels = this.pixels(options);\n\t\tconst ignorePremutipliedAlpha = options.alpha?.premultiplied?.ignore;\n\t\tconst scale = toScale(pixels, options);\n\t\treturn UtilExtractor.toCanvas(pixels, scale, ignorePremutipliedAlpha);\n\t}\n\n\tstatic base64(options: UtilExtractBase64Options): string {\n\t\tconst canvas = this.canvas(options);\n\t\ttry {\n\t\t\treturn UtilExtractor.toBase64(canvas.canvas, options.format, options.quality);\n\t\t} finally {\n\t\t\tif (canvas) {\n\t\t\t\tcanvas.destroy();\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic file(options: UtilExtractFileOptions): void {\n\t\tUtilFileDownloader.downloadUrl(options.filename, this.base64(options));\n\t}\n\n\t/**\n\t * Clears all the memories.\n\t */\n\tstatic destroy(): void {\n\t\tconst texture = this.WORK_RENDER_TEXTURE;\n\t\tif (texture != null) {\n\t\t\tthis.WORK_RENDER_TEXTURE = undefined;\n\t\t\ttexture.destroy(true);\n\t\t}\n\t}\n}\n"]}
|
package/dist/wcardinal-ui.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.440.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -23797,17 +23797,61 @@ var UtilExtract = /** @class */ (function () {
|
|
|
23797
23797
|
var skipUpdateTransform = (_a = options.transform) === null || _a === void 0 ? void 0 : _a.update;
|
|
23798
23798
|
return UtilExtractor.toTexture(target, resolution, options.clear, skipUpdateTransform);
|
|
23799
23799
|
};
|
|
23800
|
+
/**
|
|
23801
|
+
* Extracts pixels from the target.
|
|
23802
|
+
* This method internally creates one render texture and use that to extract pixels from the target.
|
|
23803
|
+
* To free the allocated render texture, please call {@link destroy()}.
|
|
23804
|
+
*
|
|
23805
|
+
* @param options an extraction options
|
|
23806
|
+
* @returns extracted pixels
|
|
23807
|
+
*/
|
|
23800
23808
|
UtilExtract.pixels = function (options) {
|
|
23809
|
+
var _a;
|
|
23801
23810
|
var renderer = toRenderer(options);
|
|
23802
|
-
|
|
23803
|
-
|
|
23804
|
-
|
|
23811
|
+
// Create a render texture
|
|
23812
|
+
var target = options.target;
|
|
23813
|
+
var scale = target.transform.scale;
|
|
23814
|
+
var width = Math.floor(target.width * scale.x);
|
|
23815
|
+
var height = Math.floor(target.height * scale.y);
|
|
23816
|
+
var resolution = toResolution(options);
|
|
23817
|
+
var renderTexture = UtilExtract.WORK_RENDER_TEXTURE;
|
|
23818
|
+
if (renderTexture == null) {
|
|
23819
|
+
renderTexture = pixi_js.RenderTexture.create({
|
|
23820
|
+
width: width,
|
|
23821
|
+
height: height,
|
|
23822
|
+
scaleMode: pixi_js.SCALE_MODES.LINEAR,
|
|
23823
|
+
resolution: resolution
|
|
23824
|
+
});
|
|
23825
|
+
UtilExtract.WORK_RENDER_TEXTURE = renderTexture;
|
|
23805
23826
|
}
|
|
23806
|
-
|
|
23807
|
-
|
|
23808
|
-
|
|
23827
|
+
else {
|
|
23828
|
+
var baseTexture = renderTexture.baseTexture;
|
|
23829
|
+
var baseTextureWidth = baseTexture.width;
|
|
23830
|
+
var baseTextureHeight = baseTexture.height;
|
|
23831
|
+
var isWidthDirty = baseTextureWidth < width;
|
|
23832
|
+
var isHeightDirty = baseTextureHeight < height;
|
|
23833
|
+
var isResolutionDirty = renderTexture.resolution !== resolution;
|
|
23834
|
+
if (isResolutionDirty || isWidthDirty || isHeightDirty) {
|
|
23835
|
+
if (isResolutionDirty) {
|
|
23836
|
+
baseTexture.resolution = resolution;
|
|
23837
|
+
}
|
|
23838
|
+
renderTexture.resize(Math.max(width, baseTextureWidth), Math.max(height, baseTextureHeight), true);
|
|
23809
23839
|
}
|
|
23810
23840
|
}
|
|
23841
|
+
// Render to the render texture
|
|
23842
|
+
var frame = renderTexture.frame;
|
|
23843
|
+
if (frame.x !== 0 || frame.y !== 0 || frame.width !== width || frame.height !== height) {
|
|
23844
|
+
frame.x = 0;
|
|
23845
|
+
frame.y = 0;
|
|
23846
|
+
frame.width = width;
|
|
23847
|
+
frame.height = height;
|
|
23848
|
+
renderTexture.frame = frame;
|
|
23849
|
+
}
|
|
23850
|
+
var targetPosition = target.position;
|
|
23851
|
+
var matrix = new pixi_js.Matrix(1, 0, 0, 1, -targetPosition.x, -targetPosition.y);
|
|
23852
|
+
renderer.render(target, renderTexture, options.clear, matrix, (_a = options.transform) === null || _a === void 0 ? void 0 : _a.update);
|
|
23853
|
+
// Extract pixels
|
|
23854
|
+
return UtilExtractor.toPixels(renderTexture, renderer);
|
|
23811
23855
|
};
|
|
23812
23856
|
UtilExtract.canvas = function (options) {
|
|
23813
23857
|
var _a, _b;
|
|
@@ -23830,6 +23874,16 @@ var UtilExtract = /** @class */ (function () {
|
|
|
23830
23874
|
UtilExtract.file = function (options) {
|
|
23831
23875
|
UtilFileDownloader.downloadUrl(options.filename, this.base64(options));
|
|
23832
23876
|
};
|
|
23877
|
+
/**
|
|
23878
|
+
* Clears all the memories.
|
|
23879
|
+
*/
|
|
23880
|
+
UtilExtract.destroy = function () {
|
|
23881
|
+
var texture = this.WORK_RENDER_TEXTURE;
|
|
23882
|
+
if (texture != null) {
|
|
23883
|
+
this.WORK_RENDER_TEXTURE = undefined;
|
|
23884
|
+
texture.destroy(true);
|
|
23885
|
+
}
|
|
23886
|
+
};
|
|
23833
23887
|
return UtilExtract;
|
|
23834
23888
|
}());
|
|
23835
23889
|
|
|
@@ -27377,12 +27431,12 @@ var EShapeActions = /** @class */ (function () {
|
|
|
27377
27431
|
}
|
|
27378
27432
|
return null;
|
|
27379
27433
|
};
|
|
27380
|
-
EShapeActions.open = function (shape, type, target, inNewWindow) {
|
|
27434
|
+
EShapeActions.open = function (shape, type, target, inNewWindow, environment) {
|
|
27381
27435
|
var opener = EShapeActionOpenOpeners[type];
|
|
27382
27436
|
if (opener != null) {
|
|
27383
27437
|
var diagram = this.toDiagram(shape);
|
|
27384
27438
|
if (diagram) {
|
|
27385
|
-
opener(target, inNewWindow, shape, diagram);
|
|
27439
|
+
opener(target, inNewWindow, shape, diagram, environment);
|
|
27386
27440
|
}
|
|
27387
27441
|
}
|
|
27388
27442
|
else if (isString(target)) {
|
|
@@ -29625,7 +29679,7 @@ var EShapeActionRuntimeMiscExtension = /** @class */ (function (_super) {
|
|
|
29625
29679
|
if (extension != null && this.condition(shape, time, EShapeActionEnvironment)) {
|
|
29626
29680
|
var diagram = EShapeActions.toDiagram(shape);
|
|
29627
29681
|
if (diagram != null) {
|
|
29628
|
-
extension.executor(this.argument(shape, time, EShapeActionEnvironment), shape, diagram);
|
|
29682
|
+
extension.executor(this.argument(shape, time, EShapeActionEnvironment), shape, diagram, EShapeActionEnvironment);
|
|
29629
29683
|
}
|
|
29630
29684
|
}
|
|
29631
29685
|
};
|
|
@@ -29677,7 +29731,7 @@ var EShapeActionRuntimeOpen = /** @class */ (function (_super) {
|
|
|
29677
29731
|
if (this.condition(shape, time, EShapeActionEnvironment)) {
|
|
29678
29732
|
var target = this.target(shape, time, EShapeActionEnvironment);
|
|
29679
29733
|
if (target != null) {
|
|
29680
|
-
EShapeActions.open(shape, this.subtype, target, this.inNewWindow);
|
|
29734
|
+
EShapeActions.open(shape, this.subtype, target, this.inNewWindow, EShapeActionEnvironment);
|
|
29681
29735
|
}
|
|
29682
29736
|
}
|
|
29683
29737
|
};
|
|
@@ -37941,7 +37995,7 @@ var EShapeActionRuntimeOpenDialogExtension = /** @class */ (function (_super) {
|
|
|
37941
37995
|
if (diagram_1 != null) {
|
|
37942
37996
|
var argument_1 = this.argument(shape, time, EShapeActionEnvironment);
|
|
37943
37997
|
setTimeout(function () {
|
|
37944
|
-
opener(target_1, argument_1, shape, diagram_1);
|
|
37998
|
+
opener(target_1, argument_1, shape, diagram_1, EShapeActionEnvironment);
|
|
37945
37999
|
}, 0);
|
|
37946
38000
|
}
|
|
37947
38001
|
}
|