@wcardinal/wcardinal-ui 0.334.0 → 0.336.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/wcardinal/ui/d-dialog-select.d.ts +2 -2
- package/dist/types/wcardinal/ui/d-view-gesture-impl.d.ts +3 -3
- package/dist/types/wcardinal/ui/d-view.d.ts +51 -10
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-open-opener.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtime-open.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-actions.d.ts +1 -1
- package/dist/wcardinal/ui/d-dialog-select.js.map +1 -1
- package/dist/wcardinal/ui/d-view-gesture-impl.js +12 -12
- package/dist/wcardinal/ui/d-view-gesture-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-view-impl.js +2 -0
- package/dist/wcardinal/ui/d-view-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-view-transform-impl.js +3 -3
- package/dist/wcardinal/ui/d-view-transform-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-view.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-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 -1
- package/dist/wcardinal/ui/shape/action/e-shape-actions.js.map +1 -1
- package/dist/wcardinal/ui/util/util-gesture.js +3 -2
- package/dist/wcardinal/ui/util/util-gesture.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 +23 -20
- package/dist/wcardinal-ui.js +23 -20
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-view.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-view.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { IPoint } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { UtilGestureModifier } from \"./util/util-gesture-modifier\";\nimport { DThemeViewGesture, DViewGesture, DViewGestureOptions } from \"./d-view-gesture\";\nimport { DViewTargetPoint } from \"./d-view-to-target\";\nimport { DViewConstraint } from \"./d-view-constraint\";\nimport { DOnOptions } from \"./d-on-options\";\
|
|
1
|
+
{"version":3,"file":"d-view.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-view.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { IPoint } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { UtilGestureModifier } from \"./util/util-gesture-modifier\";\nimport { DThemeViewGesture, DViewGesture, DViewGestureOptions } from \"./d-view-gesture\";\nimport { DViewTargetPoint } from \"./d-view-to-target\";\nimport { DViewConstraint } from \"./d-view-constraint\";\nimport { DOnOptions } from \"./d-on-options\";\n\nexport type DViewChecker = (\n\te: WheelEvent | MouseEvent | TouchEvent,\n\tmodifier: UtilGestureModifier,\n\ttarget: DBase\n) => boolean;\n\n/**\n * {@link DView} wheel zoom options.\n */\nexport interface DViewZoomWheelOptions {\n\t/** True to enable wheel zoom */\n\tenable?: boolean;\n\n\t/** Zoom speed */\n\tspeed?: number;\n\n\t/** Mouse modifiers */\n\tmodifier?: keyof typeof UtilGestureModifier | UtilGestureModifier;\n\n\t/**\n\t * Wheel zoom checker.\n\t * If a checker returns false, wheel zooms will be canceled.\n\t */\n\tchecker?: DViewChecker;\n}\n\n/**\n * {@link DView} double-click zoom options.\n */\nexport interface DViewZoomDblClickOptions {\n\t/** True to enable double click zoom */\n\tenable?: boolean;\n\n\t/** Zoom amount */\n\tamount?: number;\n\n\t/** Mouse modifiers */\n\tmodifier?: keyof typeof UtilGestureModifier | UtilGestureModifier;\n\n\t/**\n\t * Double click zoom checker.\n\t * If a checker returns false, double click zooms will be canceled.\n\t */\n\tchecker?: DViewChecker;\n\n\t/** Zoom duration */\n\tduration?: number;\n}\n\n/**\n * {@link DView} zoom options.\n */\nexport interface DViewZoomOptions {\n\t/** Minimum scale */\n\tmin?: number;\n\n\t/** Maximum scale */\n\tmax?: number;\n\n\t/** True to keep size ratio */\n\tkeepRatio?: boolean;\n\n\t/** Wheel zoom options */\n\twheel?: DViewZoomWheelOptions;\n\n\t/** Double click zoom options */\n\tdblclick?: DViewZoomDblClickOptions;\n}\n\n/**\n * {@link DView} wheel translation options.\n */\nexport interface DViewTranslationWheelOptions {\n\t/** True to enable wheel translation */\n\tenable?: boolean;\n\n\t/** Translation speed */\n\tspeed?: number;\n\n\t/** Mouse modifiers */\n\tmodifier?: keyof typeof UtilGestureModifier | UtilGestureModifier;\n\n\t/**\n\t * Wheel translation checker.\n\t * If a checker returns false, wheel translations will be canceled.\n\t */\n\tchecker?: DViewChecker;\n}\n\n/**\n * {@link DView} translation options.\n */\nexport interface DViewTranslationOptions {\n\t/** Wheel translation options */\n\twheel?: DViewTranslationWheelOptions;\n}\n\n/**\n * {@link DView} events.\n */\nexport interface DViewEvents<EMITTER> {\n\t/**\n\t * Triggered when a gesture starts.\n\t *\n\t * @param target an operation target\n\t * @param emitter an emitter\n\t */\n\tgesturestart(target: DBase, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a gesture ends.\n\t *\n\t * @param target an operation target\n\t * @param emitter an emitter\n\t */\n\tgestureend(target: DBase, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a gesture stops.\n\t *\n\t * @param target an operation target\n\t * @param emitter an emitter\n\t */\n\tgesturestop(target: DBase, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a transform starts.\n\t *\n\t * @param target an operation target\n\t * @param emitter an emitter\n\t */\n\ttransformstart(target: DBase, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a transform ends.\n\t *\n\t * @param target an operation target\n\t * @param emitter an emitter\n\t */\n\ttransformend(target: DBase, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a transform stops.\n\t *\n\t * @param target an operation target\n\t * @param emitter an emitter\n\t */\n\ttransformstop(target: DBase, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a wheel translation starts.\n\t *\n\t * @param target an operation target\n\t * @param emitter an emitter\n\t */\n\twheeltranslationstart(target: DBase, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a wheel translation ends.\n\t *\n\t * @param target an operation target\n\t * @param emitter an emitter\n\t */\n\twheeltranslationend(target: DBase, emitter: EMITTER): void;\n\n\t/**\n\t * Triggered when a wheel translation stops.\n\t *\n\t * @param target an operation target\n\t * @param emitter an emitter\n\t */\n\twheeltranslationstop(target: DBase, emitter: EMITTER): void;\n}\n\n/**\n * {@link DView} \"on\" options.\n */\nexport interface DViewOnOptions<EMITTER> extends Partial<DViewEvents<EMITTER>>, DOnOptions {}\n\n/**\n * {@link DView} options.\n */\nexport interface DViewOptions {\n\t/** Gesture options */\n\tgesture?: DViewGestureOptions;\n\n\t/** Zoom options */\n\tzoom?: DViewZoomOptions;\n\n\t/** Translation options */\n\ttranslation?: DViewTranslationOptions;\n\n\t/** Constraint options */\n\tconstraint?: DViewConstraint;\n\n\t/** Theme */\n\ttheme?: DThemeView | string;\n\n\t/** On options */\n\ton?: DViewOnOptions<DView>;\n}\n\n/**\n * {@link DView} theme.\n */\nexport interface DThemeView extends DThemeViewGesture {\n\tisWheelZoomEnabled(): boolean;\n\tisDblClickZoomEnabled(): boolean;\n\tisWheelTranslationEnabled(): boolean;\n\tgetWheelZoomSpeed(): number;\n\tgetWheelZoomModifier(): UtilGestureModifier;\n\tgetDblClickZoomSpeed(): number;\n\tgetDblClickZoomModifier(): UtilGestureModifier;\n\tgetDblClickZoomDuration(): number;\n\tgetWheelTranslationSpeed(): number;\n\tgetWheelTranslationModifier(): UtilGestureModifier;\n\tgetZoomMin(): number;\n\tgetZoomMax(): number;\n\tgetZoomKeepRatio(): boolean;\n}\n\nexport interface DView {\n\treadonly gesture: DViewGesture;\n\tscale: DViewTargetPoint;\n\tposition: DViewTargetPoint;\n\n\t/**\n\t * Stops an animation if exits.\n\t */\n\tstop(): void;\n\n\t/**\n\t * Resets a position and a scale.\n\t *\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\treset(duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Fits into a screen.\n\t *\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tfit(duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Zooms in at the current position.\n\t *\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tzoomIn(duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Zooms out at the current position.\n\t *\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tzoomOut(duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Zooms into the given position.\n\t *\n\t * @param x a local X coordinate position\n\t * @param y a local Y coordinate position\n\t * @param scaleX a X coordinate scale\n\t * @param scaleY a Y coordinate scale\n\t * @param duration an duration\n\t * @param stop false to keep a previous animation\n\t */\n\tzoomAt(\n\t\tx: number,\n\t\ty: number,\n\t\tscaleX: number,\n\t\tscaleY: number,\n\t\tduration?: number,\n\t\tstop?: boolean\n\t): void;\n\n\t/**\n\t * Zooms into the specified global position.\n\t *\n\t * @param x a global X coordinate position\n\t * @param y a global Y coordinate position\n\t * @param scaleX a X coordinate scale\n\t * @param scaleY a Y coordinate scale\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tzoomAtGlobal(\n\t\tx: number,\n\t\ty: number,\n\t\tscaleX: number,\n\t\tscaleY: number,\n\t\tduration?: number,\n\t\tstop?: boolean\n\t): void;\n\n\t/**\n\t * Zooms in / out at the current position.\n\t *\n\t * @param scaleX a X coordinate scale\n\t * @param scaleY a Y coordinate scale\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tzoom(scaleX: number, scaleY: number, duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Moves to the given position.\n\t *\n\t * @param x a local X coordinate position\n\t * @param y a local Y coordinate position\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\tmoveTo(x: number, y: number, duration?: number, stop?: boolean): void;\n\n\t/**\n\t * Sets to the specified position and scale.\n\t *\n\t * @param x a local X coordinate position\n\t * @param y a local Y coordinate position\n\t * @param scaleX a X coordinate scale\n\t * @param scaleY a Y coordinate scale\n\t * @param duration an animation duration\n\t * @param stop false to keep a previous animation\n\t */\n\ttransform(\n\t\tx: number,\n\t\ty: number,\n\t\tscaleX: number,\n\t\tscaleY: number,\n\t\tduration?: number,\n\t\tstop?: boolean\n\t): void;\n\n\ttoLocal(global: IPoint, local: IPoint, skipUpdate?: boolean): IPoint;\n\ttoGlobal(local: IPoint, global: IPoint, skipUpdate?: boolean): IPoint;\n}\n"]}
|
|
@@ -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 { EShape } from \"../e-shape\";\n\nexport type EShapeActionOpenOpener = (target:
|
|
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 { EShape } from \"../e-shape\";\n\nexport type EShapeActionOpenOpener = (target: unknown, inNewWindow: boolean, shape: EShape) => void;\n"]}
|
|
@@ -13,7 +13,7 @@ var EShapeActionRuntimeOpen = /** @class */ (function (_super) {
|
|
|
13
13
|
function EShapeActionRuntimeOpen(value, subtype) {
|
|
14
14
|
var _this = _super.call(this, value, EShapeRuntimeReset.NONE) || this;
|
|
15
15
|
_this.subtype = subtype;
|
|
16
|
-
_this.target = EShapeActionExpressions.
|
|
16
|
+
_this.target = EShapeActionExpressions.ofUnknown(value.target);
|
|
17
17
|
_this.inNewWindow = value.inNewWindow;
|
|
18
18
|
return _this;
|
|
19
19
|
}
|
|
@@ -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,
|
|
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,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;aAClE;SACD;IACF,CAAC;IACF,8BAAC;AAAD,CAAC,AAvBD,CAA6C,8BAA8B,GAuB1E","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(shape, this.subtype, target, this.inNewWindow);\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
|
|
@@ -9,6 +9,7 @@ import { DDiagrams } from "../../d-diagrams";
|
|
|
9
9
|
import { EShapeDataValueState } from "../e-shape-data-value-state";
|
|
10
10
|
import { EShapeEmbedded } from "../variant/e-shape-embedded";
|
|
11
11
|
import { EShapeActionOpenOpeners } from "./e-shape-action-open-openers";
|
|
12
|
+
import { isString } from "../../util/is-string";
|
|
12
13
|
var EShapeActions = /** @class */ (function () {
|
|
13
14
|
function EShapeActions() {
|
|
14
15
|
}
|
|
@@ -33,7 +34,7 @@ var EShapeActions = /** @class */ (function () {
|
|
|
33
34
|
if (opener != null) {
|
|
34
35
|
opener(target, inNewWindow, shape);
|
|
35
36
|
}
|
|
36
|
-
else {
|
|
37
|
+
else if (isString(target)) {
|
|
37
38
|
switch (type) {
|
|
38
39
|
case DDiagramBaseControllerOpenType.DIAGRAM:
|
|
39
40
|
var container_1 = this.toContainer(shape);
|
|
@@ -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;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAEN,8BAA8B,EAC9B,MAAM,iCAAiC,CAAC;AAGzC,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;
|
|
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;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAEN,8BAA8B,EAC9B,MAAM,iCAAiC,CAAC;AAGzC,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,C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AE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE;oBAC3D,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;oBAC9B,OAAO,IAAI,CAAC;iBACZ;aACD;YACD,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;SACzB;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IAEM,yBAAW,GAAlB,UAAmB,KAAa,EAAE,EAAU,EAAE,KAAc;QAC3D,IAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAC1C,IAAI,SAAS,EAAE;YACd,OAAO,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC5C;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IAIM,kBAAI,GAAX,UAAY,KAAa,EAAE,IAAY,EAAE,KAAe,EAAE,IAAa;QACtE,IAAM,SAAS,GAAG,aAAa,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACnD,IAAI,IAAI,KAAK,SAAS,EAAE;YACvB,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YACxB,IAAI,SAAS,EAAE;gBACd,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;aAClC;SACD;aAAM;YACN,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;YACrC,IAAI,SAAS,EAAE;gBACd,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;aAC/C;SACD;IACF,CAAC;IACF,oBAAC;AAAD,CAAC,AA/GD,IA+GC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { utils } from \"pixi.js\";\nimport { DApplications } from \"../../d-applications\";\nimport { DCanvasContainer } from \"../../d-canvas-container\";\nimport {\n\tDDiagramBaseController,\n\tDDiagramBaseControllerOpenType\n} from \"../../d-diagram-base-controller\";\nimport { DDiagramData } from \"../../d-diagram-data\";\nimport { DDiagramSerialized } from \"../../d-diagram-serialized\";\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\";\n\nexport interface EShapeActionsContainer extends DCanvasContainer {\n\treadonly shape: utils.EventEmitter;\n\treadonly data: DDiagramData;\n\treadonly controller: DDiagramBaseController | null;\n\n\tset(serialized: DDiagramSerialized | null): void;\n}\n\nexport class EShapeActions {\n\tstatic isContainer(target: unknown): target is EShapeActionsContainer {\n\t\treturn target instanceof DCanvasContainer;\n\t}\n\n\tstatic isEmbedded(target: unknown): target is EShapeEmbedded {\n\t\treturn target instanceof EShapeEmbedded;\n\t}\n\n\tstatic toContainer(shape?: EShape | null): EShapeActionsContainer | null {\n\t\tlet current: { parent: any } | null | undefined = shape;\n\t\twhile (current != null) {\n\t\t\tif (this.isContainer(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): void {\n\t\tconst opener = EShapeActionOpenOpeners[type];\n\t\tif (opener != null) {\n\t\t\topener(target, inNewWindow, shape);\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 container = this.toContainer(shape);\n\t\t\t\t\tif (container) {\n\t\t\t\t\t\tconst controller = container.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\tcontainer.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.isContainer(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 container = this.toContainer(shape);\n\t\tif (container) {\n\t\t\treturn container.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 container = EShapeActions.toContainer(shape);\n\t\tif (time === undefined) {\n\t\t\tshape.emit(name, shape);\n\t\t\tif (container) {\n\t\t\t\tcontainer.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 (container) {\n\t\t\t\tcontainer.shape.emit(name, value, time, shape);\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
|
|
@@ -255,10 +255,11 @@ var UtilGesture = /** @class */ (function () {
|
|
|
255
255
|
onMove(data.target, dx, dy, x, y, ds);
|
|
256
256
|
};
|
|
257
257
|
UtilGesture.prototype.onEasingEnd = function (data) {
|
|
258
|
+
var target = data.target;
|
|
258
259
|
this.deleteData(data);
|
|
259
260
|
var onEasingEnd = this._onEasingEnd;
|
|
260
|
-
if (onEasingEnd) {
|
|
261
|
-
onEasingEnd(
|
|
261
|
+
if (onEasingEnd && target != null) {
|
|
262
|
+
onEasingEnd(target);
|
|
262
263
|
}
|
|
263
264
|
};
|
|
264
265
|
UtilGesture.prototype.stop = function (target) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util-gesture.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/util/util-gesture.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAA4B,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAuExD;IAgBC,qBAAY,OAAmC;;QAC9C,IAAM,EAAE,GAAG,OAAO,CA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toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { interaction, utils } from \"pixi.js\";\nimport { DApplicationTarget } from \"../d-application-like\";\nimport { DApplications } from \"../d-applications\";\nimport { DBaseStateSet } from \"../d-base-state-set\";\nimport { UtilGestureModifier } from \"./util-gesture-modifier\";\nimport { UtilGestureModifiers } from \"./util-gesture-modifiers\";\nimport { UtilGestureData } from \"./util-gesture-data\";\nimport { UtilGestureEasing, UtilGestureEasingOptions } from \"./util-gesture-easing\";\nimport { UtilPointerEvent } from \"./util-pointer-event\";\nimport InteractionEvent = interaction.InteractionEvent;\n\nexport interface UtilGestureTarget extends DApplicationTarget {\n\tstate: DBaseStateSet;\n}\nexport type UtilGestureOnMove<TARGET> = (\n\ttarget: TARGET,\n\tdx: number,\n\tdy: number,\n\tx: number,\n\ty: number,\n\tds: number\n) => void;\nexport type UtilGestureOnStart<TARGET> = (target: TARGET) => void;\nexport type UtilGestureOnEnd<TARGET> = (target: TARGET) => void;\nexport type UtilGestureOnStop<TARGET> = (target: TARGET) => void;\nexport type UtilGestureOnEasingStart<TARGET> = (target: TARGET) => void;\nexport type UtilGestureOnEasingEnd<TARGET> = (target: TARGET) => void;\nexport type UtilGestureChecker<TARGET> = (\n\te: InteractionEvent,\n\tmodifier: UtilGestureModifier,\n\ttarget: TARGET\n) => boolean;\n\nexport interface UtilGestureCheckerOptions<TARGET> {\n\tstart?: UtilGestureChecker<TARGET>;\n\tmove?: UtilGestureChecker<TARGET>;\n}\n\nexport interface UtilGestureOnEasingOptions<TARGET> {\n\tstart?: UtilGestureOnEasingStart<TARGET>;\n\tend?: UtilGestureOnEasingEnd<TARGET>;\n}\n\nexport interface UtilGestureOnOptions<TARGET> {\n\tstart?: UtilGestureOnStart<TARGET>;\n\tmove?: UtilGestureOnMove<TARGET>;\n\tend?: UtilGestureOnEnd<TARGET>;\n\tstop?: UtilGestureOnStop<TARGET>;\n\teasing?: UtilGestureOnEasingOptions<TARGET>;\n}\n\nexport interface UtilGestureOptions<TARGET> {\n\t/**\n\t * True to restrict to touch gestures only.\n\t */\n\ttouch?: boolean;\n\n\t/**\n\t * Expected mouse modifiers\n\t */\n\tmodifier?: UtilGestureModifier;\n\n\t/**\n\t * Checker options\n\t */\n\tchecker?: UtilGestureCheckerOptions<TARGET>;\n\n\t/**\n\t * Easing options\n\t */\n\teasing?: boolean | UtilGestureEasingOptions;\n\n\t/** Binds the pointerdown event of the given target. */\n\tbind?: TARGET & utils.EventEmitter;\n\n\t/** Event options */\n\ton?: UtilGestureOnOptions<TARGET>;\n}\n\nexport class UtilGesture<TARGET extends UtilGestureTarget> {\n\tprotected _onStart?: UtilGestureOnStart<TARGET>;\n\tprotected _onMove?: UtilGestureOnMove<TARGET>;\n\tprotected _onEnd?: UtilGestureOnEnd<TARGET>;\n\tprotected _onStop?: UtilGestureOnStop<TARGET>;\n\tprotected _onEasingStart?: UtilGestureOnEasingStart<TARGET>;\n\tprotected _onEasingEnd?: UtilGestureOnEasingEnd<TARGET>;\n\tprotected _modifier: UtilGestureModifier;\n\tprotected _checkerStart: UtilGestureChecker<TARGET>;\n\tprotected _checkerMove: UtilGestureChecker<TARGET>;\n\tprotected _easing?: boolean | UtilGestureEasingOptions;\n\tprotected _touch: boolean;\n\n\tprotected _unused: Array<UtilGestureData<TARGET>>;\n\tprotected _used: Map<TARGET, UtilGestureData<TARGET>>;\n\n\tconstructor(options: UtilGestureOptions<TARGET>) {\n\t\tconst on = options.on;\n\t\tif (on) {\n\t\t\tthis._onStart = on.start;\n\t\t\tthis._onMove = on.move;\n\t\t\tthis._onEnd = on.end;\n\t\t\tthis._onStop = on.stop;\n\t\t\tconst easing = on.easing;\n\t\t\tif (easing != null) {\n\t\t\t\tthis._onEasingStart = easing.start;\n\t\t\t\tthis._onEasingEnd = easing.end;\n\t\t\t}\n\t\t}\n\t\tthis._modifier = options?.modifier ?? UtilGestureModifier.NONE;\n\t\tconst checker = options.checker;\n\t\tconst defaultChecker = UtilGestureModifiers.match;\n\t\tthis._checkerStart = checker?.start ?? defaultChecker;\n\t\tthis._checkerMove = checker?.move ?? defaultChecker;\n\t\tthis._easing = options.easing;\n\t\tthis._touch = !!options.touch;\n\n\t\tthis._unused = [];\n\t\tthis._used = new Map<TARGET, UtilGestureData<TARGET>>();\n\n\t\tconst bind = options.bind;\n\t\tif (bind != null) {\n\t\t\tthis.bind(bind);\n\t\t}\n\t}\n\n\tprotected newData(target: TARGET): UtilGestureData<TARGET> {\n\t\tconst used = this._used;\n\t\tconst result = used.get(target);\n\t\tif (result != null) {\n\t\t\treturn result;\n\t\t}\n\t\tconst poped = this._unused.pop();\n\t\tif (poped != null) {\n\t\t\tused.set(target, poped);\n\t\t\treturn poped;\n\t\t}\n\t\tconst created = new UtilGestureData<TARGET>();\n\t\tcreated.easing = this.newEasing(created);\n\t\tcreated.onMove = this.newOnMove(created);\n\t\tcreated.onEnd = this.newOnEnd(created);\n\t\tused.set(target, created);\n\t\treturn created;\n\t}\n\n\tprotected newEasing(data: UtilGestureData<TARGET>): UtilGestureEasing | undefined {\n\t\tconst easing = this._easing;\n\t\tif (easing == null || easing !== false) {\n\t\t\tconst onEasingMoveBound = (dx: number, dy: number, ds: number, time: number): void => {\n\t\t\t\tthis.onEasingMove(dx, dy, ds, time, data);\n\t\t\t};\n\t\t\tconst onEasingEndBound = (): void => {\n\t\t\t\tthis.onEasingEnd(data);\n\t\t\t};\n\t\t\treturn new UtilGestureEasing(\n\t\t\t\tonEasingMoveBound,\n\t\t\t\tonEasingEndBound,\n\t\t\t\tthis.toEasingOptions(easing)\n\t\t\t);\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprotected toEasingOptions(\n\t\toptions?: true | UtilGestureEasingOptions\n\t): UtilGestureEasingOptions | undefined {\n\t\treturn options == null || options === true ? undefined : options;\n\t}\n\n\tprotected deleteData(data: UtilGestureData<TARGET>): void {\n\t\tconst target = data.target;\n\t\tif (target) {\n\t\t\tif (this._used.delete(target)) {\n\t\t\t\tdata.target = undefined;\n\t\t\t\tdata.pointers.clear();\n\t\t\t\tthis._unused.push(data);\n\t\t\t}\n\t\t}\n\t}\n\n\tbind(target: TARGET & utils.EventEmitter): this {\n\t\ttarget.on(UtilPointerEvent.down, (e: InteractionEvent): void => {\n\t\t\tthis.onDown(target, e);\n\t\t});\n\t\treturn this;\n\t}\n\n\tprotected isTouch(e: InteractionEvent): boolean {\n\t\tconst oe = e.data.originalEvent;\n\t\tif (\"touches\" in oe) {\n\t\t\treturn true;\n\t\t} else if (\"pointerId\" in oe) {\n\t\t\treturn oe.pointerType !== \"mouse\";\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tonDown(target: TARGET, e: InteractionEvent): void {\n\t\tif (this._touch && !this.isTouch(e)) {\n\t\t\treturn;\n\t\t}\n\t\tif (!this._checkerStart(e, this._modifier, target)) {\n\t\t\treturn;\n\t\t}\n\t\tconst layer = DApplications.getLayer(target);\n\t\tif (layer == null) {\n\t\t\treturn;\n\t\t}\n\n\t\te.stopPropagation();\n\t\tif (target.state.isGesturing) {\n\t\t\tthis._used.get(target)?.start(e);\n\t\t} else {\n\t\t\t// User-defined handler\n\t\t\tconst onStart = this._onStart;\n\t\t\tif (onStart != null) {\n\t\t\t\tonStart(target);\n\t\t\t}\n\n\t\t\tconst data = this.newData(target);\n\t\t\tdata.target = target;\n\t\t\ttarget.state.isGesturing = true;\n\n\t\t\t// Interaction manager\n\t\t\tconst interactionManager = layer.renderer.plugins.interaction;\n\t\t\tdata.interactionManager = interactionManager;\n\n\t\t\t// Update the center\n\t\t\tdata.start(e);\n\n\t\t\t// Easing util\n\t\t\tconst easing = data.easing;\n\t\t\tif (easing) {\n\t\t\t\teasing.onStart();\n\t\t\t}\n\n\t\t\t// Event handler\n\t\t\tdata.bind(e);\n\t\t}\n\t}\n\n\tprotected newOnMove(data: UtilGestureData<TARGET>): (e: InteractionEvent) => void {\n\t\treturn (e: InteractionEvent): void => {\n\t\t\tthis.onMove(e, data);\n\t\t};\n\t}\n\n\tprotected newOnEnd(data: UtilGestureData<TARGET>): (e: InteractionEvent) => void {\n\t\treturn (e: InteractionEvent): void => {\n\t\t\tthis.onEnd(e, data);\n\t\t};\n\t}\n\n\tprotected onMove(e: InteractionEvent, data: UtilGestureData<TARGET>): void {\n\t\tconst target = data.target;\n\t\tif (target == null || !target.state.isGesturing) {\n\t\t\treturn;\n\t\t}\n\t\tif (!data.isUpdatable(e) || !this._checkerMove(e, this._modifier, target)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Update the center\n\t\tconst center = data.center;\n\t\tconst oldCenterX = center.x;\n\t\tconst oldCenterY = center.y;\n\t\tconst oldScale = data.scale;\n\t\tconst oldTime = data.time;\n\t\tdata.update(e);\n\t\tconst newCenterX = center.x;\n\t\tconst newCenterY = center.y;\n\t\tconst newScale = data.scale;\n\t\tconst newTime = data.time;\n\n\t\t// Calculate the position\n\t\tconst dx = newCenterX - oldCenterX;\n\t\tconst dy = newCenterY - oldCenterY;\n\t\tconst dt = newTime - oldTime;\n\t\tconst epsilon = 0.00001;\n\t\tconst ds = epsilon < oldScale && epsilon < newScale ? newScale / oldScale : 1;\n\n\t\t// Easing\n\t\tconst easing = data.easing;\n\t\tif (easing) {\n\t\t\teasing.onMove(dx, dy, ds, dt);\n\t\t}\n\n\t\t// Call the user-defined handler\n\t\tconst onMove = this._onMove;\n\t\tif (onMove != null) {\n\t\t\tif (dx !== 0 || dy !== 0 || ds !== 1) {\n\t\t\t\tonMove(target, dx, dy, newCenterX, newCenterY, ds);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected onEnd(e: InteractionEvent, data: UtilGestureData<TARGET>): void {\n\t\tconst target = data.target;\n\t\tif (target == null || !target.state.isGesturing) {\n\t\t\treturn;\n\t\t}\n\t\tif (!data.end(e)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// State\n\t\ttarget.state.isGesturing = false;\n\n\t\t// Remove event handlers\n\t\tconst interactionManager = data.interactionManager;\n\t\tdata.interactionManager = undefined;\n\t\tif (interactionManager) {\n\t\t\tconst onMoveBound = data.onMove;\n\t\t\tif (onMoveBound) {\n\t\t\t\tinteractionManager.off(UtilPointerEvent.move, onMoveBound);\n\t\t\t}\n\t\t\tconst onEndBound = data.onEnd;\n\t\t\tif (onEndBound) {\n\t\t\t\tinteractionManager.off(UtilPointerEvent.up, onEndBound);\n\t\t\t\tinteractionManager.off(UtilPointerEvent.cancel, onEndBound);\n\t\t\t}\n\t\t}\n\n\t\t// Call the user-defined handler\n\t\tconst onEnd = this._onEnd;\n\t\tif (onEnd != null) {\n\t\t\tonEnd(target);\n\t\t}\n\n\t\t// Start the Easing\n\t\tconst onEasingStart = this._onEasingStart;\n\t\tif (onEasingStart) {\n\t\t\tonEasingStart(data.target!);\n\t\t}\n\t\tconst easing = data.easing;\n\t\tif (easing) {\n\t\t\teasing.onEnd(e.data.originalEvent.timeStamp - data.time);\n\t\t} else {\n\t\t\tthis.deleteData(data);\n\t\t\tconst onEasingEnd = this._onEasingEnd;\n\t\t\tif (onEasingEnd) {\n\t\t\t\tonEasingEnd(data.target!);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected onEasingMove(\n\t\tdx: number,\n\t\tdy: number,\n\t\tds: number,\n\t\ttime: number,\n\t\tdata: UtilGestureData<TARGET>\n\t): void {\n\t\tconst target = data.target;\n\t\tif (target == null) {\n\t\t\treturn;\n\t\t}\n\t\tconst onMove = this._onMove;\n\t\tif (onMove == null) {\n\t\t\treturn;\n\t\t}\n\t\tif (dx === 0 && dy === 0 && ds === 1) {\n\t\t\treturn;\n\t\t}\n\t\tconst center = data.center;\n\t\tconst x = center.x + dx;\n\t\tconst y = center.y + dy;\n\t\tcenter.set(x, y);\n\t\tonMove(data.target!, dx, dy, x, y, ds);\n\t}\n\n\tprotected onEasingEnd(data: UtilGestureData<TARGET>): void {\n\t\tthis.deleteData(data);\n\t\tconst onEasingEnd = this._onEasingEnd;\n\t\tif (onEasingEnd) {\n\t\t\tonEasingEnd(data.target!);\n\t\t}\n\t}\n\n\tstop(target: TARGET): void {\n\t\tconst data = this._used.get(target);\n\t\tif (data == null) {\n\t\t\treturn;\n\t\t}\n\t\tdata.easing?.stop();\n\t\tthis.deleteData(data);\n\t\tconst onStop = this._onStop;\n\t\tif (onStop) {\n\t\t\tonStop(target);\n\t\t}\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"util-gesture.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/util/util-gesture.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAA4B,MAAM,uBAAuB,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAuExD;IAgBC,qBAAY,OAAmC;;QAC9C,IAAM,EAAE,GAAG,OAAO,CAAC,EAAE,CAAC;QACtB,IAAI,EAAE,EAAE;YACP,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC,KAAK,CAAC;YACzB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC;YACvB,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC;YACrB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC;YACvB,IAAM,MAAM,GAAG,EAAE,CAAC,MAAM,CAAC;YACzB,IAAI,MAAM,IAAI,IAAI,EAAE;gBACnB,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC;gBACnC,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC;aAC/B;SACD;QACD,IAAI,CAAC,SAAS,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,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IACxC,CAAC;IAES,iCAAW,GAArB,UAAsB,IAA6B;QAClD,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACtB,IAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC;QACtC,IAAI,WAAW,IAAI,MAAM,IAAI,IAAI,EAAE;YAClC,WAAW,CAAC,MAAM,CAAC,CAAC;SACpB;IACF,CAAC;IAED,0BAAI,GAAJ,UAAK,MAAc;;QAClB,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACpC,IAAI,IAAI,IAAI,IAAI,EAAE;YACjB,OAAO;SACP;QACD,MAAA,IAAI,CAAC,MAAM,0CAAE,IAAI,EAAE,CAAC;QACpB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACtB,IAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;QAC5B,IAAI,MAAM,EAAE;YACX,MAAM,CAAC,MAAM,CAAC,CAAC;SACf;IACF,CAAC;IACF,kBAAC;AAAD,CAAC,AAzTD,IAyTC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { interaction, utils } from \"pixi.js\";\nimport { DApplicationTarget } from \"../d-application-like\";\nimport { DApplications } from \"../d-applications\";\nimport { DBaseStateSet } from \"../d-base-state-set\";\nimport { UtilGestureModifier } from \"./util-gesture-modifier\";\nimport { UtilGestureModifiers } from \"./util-gesture-modifiers\";\nimport { UtilGestureData } from \"./util-gesture-data\";\nimport { UtilGestureEasing, UtilGestureEasingOptions } from \"./util-gesture-easing\";\nimport { UtilPointerEvent } from \"./util-pointer-event\";\nimport InteractionEvent = interaction.InteractionEvent;\n\nexport interface UtilGestureTarget extends DApplicationTarget {\n\tstate: DBaseStateSet;\n}\nexport type UtilGestureOnMove<TARGET> = (\n\ttarget: TARGET,\n\tdx: number,\n\tdy: number,\n\tx: number,\n\ty: number,\n\tds: number\n) => void;\nexport type UtilGestureOnStart<TARGET> = (target: TARGET) => void;\nexport type UtilGestureOnEnd<TARGET> = (target: TARGET) => void;\nexport type UtilGestureOnStop<TARGET> = (target: TARGET) => void;\nexport type UtilGestureOnEasingStart<TARGET> = (target: TARGET) => void;\nexport type UtilGestureOnEasingEnd<TARGET> = (target: TARGET) => void;\nexport type UtilGestureChecker<TARGET> = (\n\te: InteractionEvent,\n\tmodifier: UtilGestureModifier,\n\ttarget: TARGET\n) => boolean;\n\nexport interface UtilGestureCheckerOptions<TARGET> {\n\tstart?: UtilGestureChecker<TARGET>;\n\tmove?: UtilGestureChecker<TARGET>;\n}\n\nexport interface UtilGestureOnEasingOptions<TARGET> {\n\tstart?: UtilGestureOnEasingStart<TARGET>;\n\tend?: UtilGestureOnEasingEnd<TARGET>;\n}\n\nexport interface UtilGestureOnOptions<TARGET> {\n\tstart?: UtilGestureOnStart<TARGET>;\n\tmove?: UtilGestureOnMove<TARGET>;\n\tend?: UtilGestureOnEnd<TARGET>;\n\tstop?: UtilGestureOnStop<TARGET>;\n\teasing?: UtilGestureOnEasingOptions<TARGET>;\n}\n\nexport interface UtilGestureOptions<TARGET> {\n\t/**\n\t * True to restrict to touch gestures only.\n\t */\n\ttouch?: boolean;\n\n\t/**\n\t * Expected mouse modifiers\n\t */\n\tmodifier?: UtilGestureModifier;\n\n\t/**\n\t * Checker options\n\t */\n\tchecker?: UtilGestureCheckerOptions<TARGET>;\n\n\t/**\n\t * Easing options\n\t */\n\teasing?: boolean | UtilGestureEasingOptions;\n\n\t/** Binds the pointerdown event of the given target. */\n\tbind?: TARGET & utils.EventEmitter;\n\n\t/** Event options */\n\ton?: UtilGestureOnOptions<TARGET>;\n}\n\nexport class UtilGesture<TARGET extends UtilGestureTarget> {\n\tprotected _onStart?: UtilGestureOnStart<TARGET>;\n\tprotected _onMove?: UtilGestureOnMove<TARGET>;\n\tprotected _onEnd?: UtilGestureOnEnd<TARGET>;\n\tprotected _onStop?: UtilGestureOnStop<TARGET>;\n\tprotected _onEasingStart?: UtilGestureOnEasingStart<TARGET>;\n\tprotected _onEasingEnd?: UtilGestureOnEasingEnd<TARGET>;\n\tprotected _modifier: UtilGestureModifier;\n\tprotected _checkerStart: UtilGestureChecker<TARGET>;\n\tprotected _checkerMove: UtilGestureChecker<TARGET>;\n\tprotected _easing?: boolean | UtilGestureEasingOptions;\n\tprotected _touch: boolean;\n\n\tprotected _unused: Array<UtilGestureData<TARGET>>;\n\tprotected _used: Map<TARGET, UtilGestureData<TARGET>>;\n\n\tconstructor(options: UtilGestureOptions<TARGET>) {\n\t\tconst on = options.on;\n\t\tif (on) {\n\t\t\tthis._onStart = on.start;\n\t\t\tthis._onMove = on.move;\n\t\t\tthis._onEnd = on.end;\n\t\t\tthis._onStop = on.stop;\n\t\t\tconst easing = on.easing;\n\t\t\tif (easing != null) {\n\t\t\t\tthis._onEasingStart = easing.start;\n\t\t\t\tthis._onEasingEnd = easing.end;\n\t\t\t}\n\t\t}\n\t\tthis._modifier = options?.modifier ?? UtilGestureModifier.NONE;\n\t\tconst checker = options.checker;\n\t\tconst defaultChecker = UtilGestureModifiers.match;\n\t\tthis._checkerStart = checker?.start ?? defaultChecker;\n\t\tthis._checkerMove = checker?.move ?? defaultChecker;\n\t\tthis._easing = options.easing;\n\t\tthis._touch = !!options.touch;\n\n\t\tthis._unused = [];\n\t\tthis._used = new Map<TARGET, UtilGestureData<TARGET>>();\n\n\t\tconst bind = options.bind;\n\t\tif (bind != null) {\n\t\t\tthis.bind(bind);\n\t\t}\n\t}\n\n\tprotected newData(target: TARGET): UtilGestureData<TARGET> {\n\t\tconst used = this._used;\n\t\tconst result = used.get(target);\n\t\tif (result != null) {\n\t\t\treturn result;\n\t\t}\n\t\tconst poped = this._unused.pop();\n\t\tif (poped != null) {\n\t\t\tused.set(target, poped);\n\t\t\treturn poped;\n\t\t}\n\t\tconst created = new UtilGestureData<TARGET>();\n\t\tcreated.easing = this.newEasing(created);\n\t\tcreated.onMove = this.newOnMove(created);\n\t\tcreated.onEnd = this.newOnEnd(created);\n\t\tused.set(target, created);\n\t\treturn created;\n\t}\n\n\tprotected newEasing(data: UtilGestureData<TARGET>): UtilGestureEasing | undefined {\n\t\tconst easing = this._easing;\n\t\tif (easing == null || easing !== false) {\n\t\t\tconst onEasingMoveBound = (dx: number, dy: number, ds: number, time: number): void => {\n\t\t\t\tthis.onEasingMove(dx, dy, ds, time, data);\n\t\t\t};\n\t\t\tconst onEasingEndBound = (): void => {\n\t\t\t\tthis.onEasingEnd(data);\n\t\t\t};\n\t\t\treturn new UtilGestureEasing(\n\t\t\t\tonEasingMoveBound,\n\t\t\t\tonEasingEndBound,\n\t\t\t\tthis.toEasingOptions(easing)\n\t\t\t);\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tprotected toEasingOptions(\n\t\toptions?: true | UtilGestureEasingOptions\n\t): UtilGestureEasingOptions | undefined {\n\t\treturn options == null || options === true ? undefined : options;\n\t}\n\n\tprotected deleteData(data: UtilGestureData<TARGET>): void {\n\t\tconst target = data.target;\n\t\tif (target) {\n\t\t\tif (this._used.delete(target)) {\n\t\t\t\tdata.target = undefined;\n\t\t\t\tdata.pointers.clear();\n\t\t\t\tthis._unused.push(data);\n\t\t\t}\n\t\t}\n\t}\n\n\tbind(target: TARGET & utils.EventEmitter): this {\n\t\ttarget.on(UtilPointerEvent.down, (e: InteractionEvent): void => {\n\t\t\tthis.onDown(target, e);\n\t\t});\n\t\treturn this;\n\t}\n\n\tprotected isTouch(e: InteractionEvent): boolean {\n\t\tconst oe = e.data.originalEvent;\n\t\tif (\"touches\" in oe) {\n\t\t\treturn true;\n\t\t} else if (\"pointerId\" in oe) {\n\t\t\treturn oe.pointerType !== \"mouse\";\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tonDown(target: TARGET, e: InteractionEvent): void {\n\t\tif (this._touch && !this.isTouch(e)) {\n\t\t\treturn;\n\t\t}\n\t\tif (!this._checkerStart(e, this._modifier, target)) {\n\t\t\treturn;\n\t\t}\n\t\tconst layer = DApplications.getLayer(target);\n\t\tif (layer == null) {\n\t\t\treturn;\n\t\t}\n\n\t\te.stopPropagation();\n\t\tif (target.state.isGesturing) {\n\t\t\tthis._used.get(target)?.start(e);\n\t\t} else {\n\t\t\t// User-defined handler\n\t\t\tconst onStart = this._onStart;\n\t\t\tif (onStart != null) {\n\t\t\t\tonStart(target);\n\t\t\t}\n\n\t\t\tconst data = this.newData(target);\n\t\t\tdata.target = target;\n\t\t\ttarget.state.isGesturing = true;\n\n\t\t\t// Interaction manager\n\t\t\tconst interactionManager = layer.renderer.plugins.interaction;\n\t\t\tdata.interactionManager = interactionManager;\n\n\t\t\t// Update the center\n\t\t\tdata.start(e);\n\n\t\t\t// Easing util\n\t\t\tconst easing = data.easing;\n\t\t\tif (easing) {\n\t\t\t\teasing.onStart();\n\t\t\t}\n\n\t\t\t// Event handler\n\t\t\tdata.bind(e);\n\t\t}\n\t}\n\n\tprotected newOnMove(data: UtilGestureData<TARGET>): (e: InteractionEvent) => void {\n\t\treturn (e: InteractionEvent): void => {\n\t\t\tthis.onMove(e, data);\n\t\t};\n\t}\n\n\tprotected newOnEnd(data: UtilGestureData<TARGET>): (e: InteractionEvent) => void {\n\t\treturn (e: InteractionEvent): void => {\n\t\t\tthis.onEnd(e, data);\n\t\t};\n\t}\n\n\tprotected onMove(e: InteractionEvent, data: UtilGestureData<TARGET>): void {\n\t\tconst target = data.target;\n\t\tif (target == null || !target.state.isGesturing) {\n\t\t\treturn;\n\t\t}\n\t\tif (!data.isUpdatable(e) || !this._checkerMove(e, this._modifier, target)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Update the center\n\t\tconst center = data.center;\n\t\tconst oldCenterX = center.x;\n\t\tconst oldCenterY = center.y;\n\t\tconst oldScale = data.scale;\n\t\tconst oldTime = data.time;\n\t\tdata.update(e);\n\t\tconst newCenterX = center.x;\n\t\tconst newCenterY = center.y;\n\t\tconst newScale = data.scale;\n\t\tconst newTime = data.time;\n\n\t\t// Calculate the position\n\t\tconst dx = newCenterX - oldCenterX;\n\t\tconst dy = newCenterY - oldCenterY;\n\t\tconst dt = newTime - oldTime;\n\t\tconst epsilon = 0.00001;\n\t\tconst ds = epsilon < oldScale && epsilon < newScale ? newScale / oldScale : 1;\n\n\t\t// Easing\n\t\tconst easing = data.easing;\n\t\tif (easing) {\n\t\t\teasing.onMove(dx, dy, ds, dt);\n\t\t}\n\n\t\t// Call the user-defined handler\n\t\tconst onMove = this._onMove;\n\t\tif (onMove != null) {\n\t\t\tif (dx !== 0 || dy !== 0 || ds !== 1) {\n\t\t\t\tonMove(target, dx, dy, newCenterX, newCenterY, ds);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected onEnd(e: InteractionEvent, data: UtilGestureData<TARGET>): void {\n\t\tconst target = data.target;\n\t\tif (target == null || !target.state.isGesturing) {\n\t\t\treturn;\n\t\t}\n\t\tif (!data.end(e)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// State\n\t\ttarget.state.isGesturing = false;\n\n\t\t// Remove event handlers\n\t\tconst interactionManager = data.interactionManager;\n\t\tdata.interactionManager = undefined;\n\t\tif (interactionManager) {\n\t\t\tconst onMoveBound = data.onMove;\n\t\t\tif (onMoveBound) {\n\t\t\t\tinteractionManager.off(UtilPointerEvent.move, onMoveBound);\n\t\t\t}\n\t\t\tconst onEndBound = data.onEnd;\n\t\t\tif (onEndBound) {\n\t\t\t\tinteractionManager.off(UtilPointerEvent.up, onEndBound);\n\t\t\t\tinteractionManager.off(UtilPointerEvent.cancel, onEndBound);\n\t\t\t}\n\t\t}\n\n\t\t// Call the user-defined handler\n\t\tconst onEnd = this._onEnd;\n\t\tif (onEnd != null) {\n\t\t\tonEnd(target);\n\t\t}\n\n\t\t// Start the Easing\n\t\tconst onEasingStart = this._onEasingStart;\n\t\tif (onEasingStart) {\n\t\t\tonEasingStart(data.target!);\n\t\t}\n\t\tconst easing = data.easing;\n\t\tif (easing) {\n\t\t\teasing.onEnd(e.data.originalEvent.timeStamp - data.time);\n\t\t} else {\n\t\t\tthis.deleteData(data);\n\t\t\tconst onEasingEnd = this._onEasingEnd;\n\t\t\tif (onEasingEnd) {\n\t\t\t\tonEasingEnd(data.target!);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected onEasingMove(\n\t\tdx: number,\n\t\tdy: number,\n\t\tds: number,\n\t\ttime: number,\n\t\tdata: UtilGestureData<TARGET>\n\t): void {\n\t\tconst target = data.target;\n\t\tif (target == null) {\n\t\t\treturn;\n\t\t}\n\t\tconst onMove = this._onMove;\n\t\tif (onMove == null) {\n\t\t\treturn;\n\t\t}\n\t\tif (dx === 0 && dy === 0 && ds === 1) {\n\t\t\treturn;\n\t\t}\n\t\tconst center = data.center;\n\t\tconst x = center.x + dx;\n\t\tconst y = center.y + dy;\n\t\tcenter.set(x, y);\n\t\tonMove(data.target!, dx, dy, x, y, ds);\n\t}\n\n\tprotected onEasingEnd(data: UtilGestureData<TARGET>): void {\n\t\tconst target = data.target;\n\t\tthis.deleteData(data);\n\t\tconst onEasingEnd = this._onEasingEnd;\n\t\tif (onEasingEnd && target != null) {\n\t\t\tonEasingEnd(target);\n\t\t}\n\t}\n\n\tstop(target: TARGET): void {\n\t\tconst data = this._used.get(target);\n\t\tif (data == null) {\n\t\t\treturn;\n\t\t}\n\t\tdata.easing?.stop();\n\t\tthis.deleteData(data);\n\t\tconst onStop = this._onStop;\n\t\tif (onStop) {\n\t\t\tonStop(target);\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.336.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -15852,10 +15852,11 @@ var UtilGesture = /** @class */ (function () {
|
|
|
15852
15852
|
onMove(data.target, dx, dy, x, y, ds);
|
|
15853
15853
|
};
|
|
15854
15854
|
UtilGesture.prototype.onEasingEnd = function (data) {
|
|
15855
|
+
var target = data.target;
|
|
15855
15856
|
this.deleteData(data);
|
|
15856
15857
|
var onEasingEnd = this._onEasingEnd;
|
|
15857
|
-
if (onEasingEnd) {
|
|
15858
|
-
onEasingEnd(
|
|
15858
|
+
if (onEasingEnd && target != null) {
|
|
15859
|
+
onEasingEnd(target);
|
|
15859
15860
|
}
|
|
15860
15861
|
};
|
|
15861
15862
|
UtilGesture.prototype.stop = function (target) {
|
|
@@ -15896,36 +15897,36 @@ var DViewGestureImpl = /** @class */ (function () {
|
|
|
15896
15897
|
duration: options === null || options === void 0 ? void 0 : options.duration
|
|
15897
15898
|
},
|
|
15898
15899
|
on: {
|
|
15899
|
-
start: function () {
|
|
15900
|
-
_this.onStart();
|
|
15900
|
+
start: function (target) {
|
|
15901
|
+
_this.onStart(target);
|
|
15901
15902
|
},
|
|
15902
15903
|
move: function (target, dx, dy, x, y, ds) {
|
|
15903
15904
|
_this.onGestureMove(toTarget(owner), dx, dy, x, y, ds);
|
|
15904
15905
|
},
|
|
15905
15906
|
easing: {
|
|
15906
|
-
end: function () {
|
|
15907
|
-
_this.onEnd();
|
|
15907
|
+
end: function (target) {
|
|
15908
|
+
_this.onEnd(target);
|
|
15908
15909
|
}
|
|
15909
15910
|
},
|
|
15910
|
-
stop: function () {
|
|
15911
|
-
_this.onStop();
|
|
15911
|
+
stop: function (target) {
|
|
15912
|
+
_this.onStop(target);
|
|
15912
15913
|
}
|
|
15913
15914
|
}
|
|
15914
15915
|
});
|
|
15915
15916
|
}
|
|
15916
15917
|
}
|
|
15917
|
-
DViewGestureImpl.prototype.onStart = function () {
|
|
15918
|
+
DViewGestureImpl.prototype.onStart = function (target) {
|
|
15918
15919
|
var parent = this._parent;
|
|
15919
15920
|
parent.stop();
|
|
15920
|
-
parent.emit("
|
|
15921
|
+
parent.emit("gesturestart", target, parent);
|
|
15921
15922
|
};
|
|
15922
|
-
DViewGestureImpl.prototype.onEnd = function () {
|
|
15923
|
+
DViewGestureImpl.prototype.onEnd = function (target) {
|
|
15923
15924
|
var parent = this._parent;
|
|
15924
|
-
parent.emit("
|
|
15925
|
+
parent.emit("gestureend", target, parent);
|
|
15925
15926
|
};
|
|
15926
|
-
DViewGestureImpl.prototype.onStop = function () {
|
|
15927
|
+
DViewGestureImpl.prototype.onStop = function (target) {
|
|
15927
15928
|
var parent = this._parent;
|
|
15928
|
-
parent.emit("
|
|
15929
|
+
parent.emit("gesturestop", target, parent);
|
|
15929
15930
|
};
|
|
15930
15931
|
DViewGestureImpl.prototype.onGestureMove = function (target, dx, dy, x, y, ds) {
|
|
15931
15932
|
if (target) {
|
|
@@ -16001,7 +16002,7 @@ var DViewTransformImpl = /** @class */ (function () {
|
|
|
16001
16002
|
}
|
|
16002
16003
|
DViewTransformImpl.prototype.onStart = function () {
|
|
16003
16004
|
var parent = this._parent;
|
|
16004
|
-
parent.emit("
|
|
16005
|
+
parent.emit("transformstart", this._owner, parent);
|
|
16005
16006
|
};
|
|
16006
16007
|
DViewTransformImpl.prototype.onTime = function (time) {
|
|
16007
16008
|
var w0 = 1 - time;
|
|
@@ -16017,11 +16018,11 @@ var DViewTransformImpl = /** @class */ (function () {
|
|
|
16017
16018
|
};
|
|
16018
16019
|
DViewTransformImpl.prototype.onEnd = function () {
|
|
16019
16020
|
var parent = this._parent;
|
|
16020
|
-
parent.emit("
|
|
16021
|
+
parent.emit("transformend", this._owner, parent);
|
|
16021
16022
|
};
|
|
16022
16023
|
DViewTransformImpl.prototype.onStop = function () {
|
|
16023
16024
|
var parent = this._parent;
|
|
16024
|
-
parent.emit("
|
|
16025
|
+
parent.emit("transformstop", this._owner, parent);
|
|
16025
16026
|
};
|
|
16026
16027
|
DViewTransformImpl.prototype.start = function (target, x, y, scaleX, scaleY, duration, stop) {
|
|
16027
16028
|
var parent = this._parent;
|
|
@@ -16290,12 +16291,14 @@ var DViewImpl = /** @class */ (function (_super) {
|
|
|
16290
16291
|
var target = this._toTarget(this._parent);
|
|
16291
16292
|
if (target) {
|
|
16292
16293
|
this.stop();
|
|
16294
|
+
this.emit("wheeltranslationstart", this._parent, this);
|
|
16293
16295
|
var speed = deltas.lowest * this._wheelTranslationSpeed;
|
|
16294
16296
|
var targetPosition = target.position;
|
|
16295
16297
|
var newX = targetPosition.x - deltas.deltaX * speed;
|
|
16296
16298
|
var newY = targetPosition.y + deltas.deltaY * speed;
|
|
16297
16299
|
var targetScale = target.scale;
|
|
16298
16300
|
this._constraint(target, newX, newY, targetScale.x, targetScale.y);
|
|
16301
|
+
this.emit("wheeltranslationend", this._parent, this);
|
|
16299
16302
|
return true;
|
|
16300
16303
|
}
|
|
16301
16304
|
}
|
|
@@ -22633,7 +22636,7 @@ var EShapeActions = /** @class */ (function () {
|
|
|
22633
22636
|
if (opener != null) {
|
|
22634
22637
|
opener(target, inNewWindow, shape);
|
|
22635
22638
|
}
|
|
22636
|
-
else {
|
|
22639
|
+
else if (isString(target)) {
|
|
22637
22640
|
switch (type) {
|
|
22638
22641
|
case DDiagramBaseControllerOpenType.DIAGRAM:
|
|
22639
22642
|
var container_1 = this.toContainer(shape);
|
|
@@ -25555,7 +25558,7 @@ var EShapeActionRuntimeOpen = /** @class */ (function (_super) {
|
|
|
25555
25558
|
function EShapeActionRuntimeOpen(value, subtype) {
|
|
25556
25559
|
var _this = _super.call(this, value, EShapeRuntimeReset.NONE) || this;
|
|
25557
25560
|
_this.subtype = subtype;
|
|
25558
|
-
_this.target = EShapeActionExpressions.
|
|
25561
|
+
_this.target = EShapeActionExpressions.ofUnknown(value.target);
|
|
25559
25562
|
_this.inNewWindow = value.inNewWindow;
|
|
25560
25563
|
return _this;
|
|
25561
25564
|
}
|
package/dist/wcardinal-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.336.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -15849,10 +15849,11 @@
|
|
|
15849
15849
|
onMove(data.target, dx, dy, x, y, ds);
|
|
15850
15850
|
};
|
|
15851
15851
|
UtilGesture.prototype.onEasingEnd = function (data) {
|
|
15852
|
+
var target = data.target;
|
|
15852
15853
|
this.deleteData(data);
|
|
15853
15854
|
var onEasingEnd = this._onEasingEnd;
|
|
15854
|
-
if (onEasingEnd) {
|
|
15855
|
-
onEasingEnd(
|
|
15855
|
+
if (onEasingEnd && target != null) {
|
|
15856
|
+
onEasingEnd(target);
|
|
15856
15857
|
}
|
|
15857
15858
|
};
|
|
15858
15859
|
UtilGesture.prototype.stop = function (target) {
|
|
@@ -15893,36 +15894,36 @@
|
|
|
15893
15894
|
duration: options === null || options === void 0 ? void 0 : options.duration
|
|
15894
15895
|
},
|
|
15895
15896
|
on: {
|
|
15896
|
-
start: function () {
|
|
15897
|
-
_this.onStart();
|
|
15897
|
+
start: function (target) {
|
|
15898
|
+
_this.onStart(target);
|
|
15898
15899
|
},
|
|
15899
15900
|
move: function (target, dx, dy, x, y, ds) {
|
|
15900
15901
|
_this.onGestureMove(toTarget(owner), dx, dy, x, y, ds);
|
|
15901
15902
|
},
|
|
15902
15903
|
easing: {
|
|
15903
|
-
end: function () {
|
|
15904
|
-
_this.onEnd();
|
|
15904
|
+
end: function (target) {
|
|
15905
|
+
_this.onEnd(target);
|
|
15905
15906
|
}
|
|
15906
15907
|
},
|
|
15907
|
-
stop: function () {
|
|
15908
|
-
_this.onStop();
|
|
15908
|
+
stop: function (target) {
|
|
15909
|
+
_this.onStop(target);
|
|
15909
15910
|
}
|
|
15910
15911
|
}
|
|
15911
15912
|
});
|
|
15912
15913
|
}
|
|
15913
15914
|
}
|
|
15914
|
-
DViewGestureImpl.prototype.onStart = function () {
|
|
15915
|
+
DViewGestureImpl.prototype.onStart = function (target) {
|
|
15915
15916
|
var parent = this._parent;
|
|
15916
15917
|
parent.stop();
|
|
15917
|
-
parent.emit("
|
|
15918
|
+
parent.emit("gesturestart", target, parent);
|
|
15918
15919
|
};
|
|
15919
|
-
DViewGestureImpl.prototype.onEnd = function () {
|
|
15920
|
+
DViewGestureImpl.prototype.onEnd = function (target) {
|
|
15920
15921
|
var parent = this._parent;
|
|
15921
|
-
parent.emit("
|
|
15922
|
+
parent.emit("gestureend", target, parent);
|
|
15922
15923
|
};
|
|
15923
|
-
DViewGestureImpl.prototype.onStop = function () {
|
|
15924
|
+
DViewGestureImpl.prototype.onStop = function (target) {
|
|
15924
15925
|
var parent = this._parent;
|
|
15925
|
-
parent.emit("
|
|
15926
|
+
parent.emit("gesturestop", target, parent);
|
|
15926
15927
|
};
|
|
15927
15928
|
DViewGestureImpl.prototype.onGestureMove = function (target, dx, dy, x, y, ds) {
|
|
15928
15929
|
if (target) {
|
|
@@ -15998,7 +15999,7 @@
|
|
|
15998
15999
|
}
|
|
15999
16000
|
DViewTransformImpl.prototype.onStart = function () {
|
|
16000
16001
|
var parent = this._parent;
|
|
16001
|
-
parent.emit("
|
|
16002
|
+
parent.emit("transformstart", this._owner, parent);
|
|
16002
16003
|
};
|
|
16003
16004
|
DViewTransformImpl.prototype.onTime = function (time) {
|
|
16004
16005
|
var w0 = 1 - time;
|
|
@@ -16014,11 +16015,11 @@
|
|
|
16014
16015
|
};
|
|
16015
16016
|
DViewTransformImpl.prototype.onEnd = function () {
|
|
16016
16017
|
var parent = this._parent;
|
|
16017
|
-
parent.emit("
|
|
16018
|
+
parent.emit("transformend", this._owner, parent);
|
|
16018
16019
|
};
|
|
16019
16020
|
DViewTransformImpl.prototype.onStop = function () {
|
|
16020
16021
|
var parent = this._parent;
|
|
16021
|
-
parent.emit("
|
|
16022
|
+
parent.emit("transformstop", this._owner, parent);
|
|
16022
16023
|
};
|
|
16023
16024
|
DViewTransformImpl.prototype.start = function (target, x, y, scaleX, scaleY, duration, stop) {
|
|
16024
16025
|
var parent = this._parent;
|
|
@@ -16287,12 +16288,14 @@
|
|
|
16287
16288
|
var target = this._toTarget(this._parent);
|
|
16288
16289
|
if (target) {
|
|
16289
16290
|
this.stop();
|
|
16291
|
+
this.emit("wheeltranslationstart", this._parent, this);
|
|
16290
16292
|
var speed = deltas.lowest * this._wheelTranslationSpeed;
|
|
16291
16293
|
var targetPosition = target.position;
|
|
16292
16294
|
var newX = targetPosition.x - deltas.deltaX * speed;
|
|
16293
16295
|
var newY = targetPosition.y + deltas.deltaY * speed;
|
|
16294
16296
|
var targetScale = target.scale;
|
|
16295
16297
|
this._constraint(target, newX, newY, targetScale.x, targetScale.y);
|
|
16298
|
+
this.emit("wheeltranslationend", this._parent, this);
|
|
16296
16299
|
return true;
|
|
16297
16300
|
}
|
|
16298
16301
|
}
|
|
@@ -22630,7 +22633,7 @@
|
|
|
22630
22633
|
if (opener != null) {
|
|
22631
22634
|
opener(target, inNewWindow, shape);
|
|
22632
22635
|
}
|
|
22633
|
-
else {
|
|
22636
|
+
else if (isString(target)) {
|
|
22634
22637
|
switch (type) {
|
|
22635
22638
|
case DDiagramBaseControllerOpenType.DIAGRAM:
|
|
22636
22639
|
var container_1 = this.toContainer(shape);
|
|
@@ -25552,7 +25555,7 @@
|
|
|
25552
25555
|
function EShapeActionRuntimeOpen(value, subtype) {
|
|
25553
25556
|
var _this = _super.call(this, value, EShapeRuntimeReset.NONE) || this;
|
|
25554
25557
|
_this.subtype = subtype;
|
|
25555
|
-
_this.target = EShapeActionExpressions.
|
|
25558
|
+
_this.target = EShapeActionExpressions.ofUnknown(value.target);
|
|
25556
25559
|
_this.inNewWindow = value.inNewWindow;
|
|
25557
25560
|
return _this;
|
|
25558
25561
|
}
|