@wcardinal/wcardinal-ui 0.164.0 → 0.167.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-gesture-impl.d.ts +28 -0
- package/dist/types/wcardinal/ui/d-dialog-gesture-mode.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-dialog-gesture.d.ts +29 -0
- package/dist/types/wcardinal/ui/d-dialog.d.ts +43 -10
- package/dist/types/wcardinal/ui/d-table-column.d.ts +2 -1
- package/dist/types/wcardinal/ui/index.d.ts +3 -0
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-boolean.d.ts +2 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-date.d.ts +2 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-datetime.d.ts +2 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-integer.d.ts +2 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-real.d.ts +2 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-text.d.ts +2 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-time.d.ts +2 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape.d.ts +3 -3
- package/dist/types/wcardinal/ui/shape/variant/e-shape-base.d.ts +4 -4
- package/dist/types/wcardinal/ui/shape/variant/e-shape-group-size-editor.d.ts +0 -1
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-dialog.d.ts +12 -4
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-picker-datetime-label.d.ts +2 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-picker-datetime-space.d.ts +2 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-picker-time.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-dialog.d.ts +12 -4
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-picker-datetime-label.d.ts +2 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-picker-datetime-space.d.ts +2 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-picker-time.d.ts +1 -0
- package/dist/wcardinal/ui/d-chart-plot-area-container.js +1 -1
- package/dist/wcardinal/ui/d-chart-plot-area-container.js.map +1 -1
- package/dist/wcardinal/ui/d-dialog-gesture-impl.js +133 -0
- package/dist/wcardinal/ui/d-dialog-gesture-impl.js.map +1 -0
- package/dist/wcardinal/ui/d-dialog-gesture-mode.js +9 -0
- package/dist/wcardinal/ui/d-dialog-gesture-mode.js.map +1 -0
- package/dist/wcardinal/ui/d-dialog-gesture.js +6 -0
- package/dist/wcardinal/ui/d-dialog-gesture.js.map +1 -0
- package/dist/wcardinal/ui/d-dialog-input.js +7 -1
- package/dist/wcardinal/ui/d-dialog-input.js.map +1 -1
- package/dist/wcardinal/ui/d-dialog.js +196 -84
- package/dist/wcardinal/ui/d-dialog.js.map +1 -1
- package/dist/wcardinal/ui/d-image-base.js +3 -1
- package/dist/wcardinal/ui/d-image-base.js.map +1 -1
- package/dist/wcardinal/ui/d-picker-color.js +5 -2
- package/dist/wcardinal/ui/d-picker-color.js.map +1 -1
- package/dist/wcardinal/ui/d-scroll-bar-thumb.js +0 -1
- package/dist/wcardinal/ui/d-scroll-bar-thumb.js.map +1 -1
- package/dist/wcardinal/ui/d-table-body-cell-select-dialog.js +1 -1
- package/dist/wcardinal/ui/d-table-body-cell-select-dialog.js.map +1 -1
- package/dist/wcardinal/ui/d-table-column.js.map +1 -1
- package/dist/wcardinal/ui/index.js +3 -0
- package/dist/wcardinal/ui/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-boolean.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-boolean.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-date.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-date.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-datetime.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-datetime.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-integer.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-integer.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-real.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-real.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-text.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-text.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-time.js +2 -2
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-time.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog.js +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-base.js +7 -7
- package/dist/wcardinal/ui/shape/variant/e-shape-base.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-group-size-editor.js +2 -4
- package/dist/wcardinal/ui/shape/variant/e-shape-group-size-editor.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-dialog.js +42 -7
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-dialog.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-picker-color-gradient.js +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-picker-color-gradient.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-picker-color.js +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-picker-color.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-picker-datetime-label.js +4 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-picker-datetime-label.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-picker-datetime-space.js +4 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-picker-datetime-space.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-picker-time.js +4 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-picker-time.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-dialog.js +42 -7
- package/dist/wcardinal/ui/theme/white/d-theme-white-dialog.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-picker-color-gradient.js +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-picker-color-gradient.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-picker-color.js +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-picker-color.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-picker-datetime-label.js +4 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-picker-datetime-label.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-picker-datetime-space.js +4 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-picker-datetime-space.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-picker-time.js +4 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-picker-time.js.map +1 -1
- package/dist/wcardinal/ui/util/util-html-element.js +3 -1
- package/dist/wcardinal/ui/util/util-html-element.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +57 -11
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +57 -11
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui-theme-white.min.js.map +1 -1
- package/dist/wcardinal-ui.cjs.js +4288 -3953
- package/dist/wcardinal-ui.js +19213 -18958
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Rectangle } from "pixi.js";
|
|
2
|
+
import { DApplicationLayerLike } from "./d-application-layer-like";
|
|
3
|
+
import { DBase } from "./d-base";
|
|
4
|
+
import { DDialogGesture, DDialogGestureConstraint, DDialogGestureOptions, DDialogGestureParent } from "./d-dialog-gesture";
|
|
5
|
+
import { DDialogGestureMode } from "./d-dialog-gesture-mode";
|
|
6
|
+
import { UtilGesture } from "./util/util-gesture";
|
|
7
|
+
export declare class DDialogGestureImpl<PARENT extends DDialogGestureParent> implements DDialogGesture<PARENT> {
|
|
8
|
+
protected static WORK_BOUNDS?: Rectangle;
|
|
9
|
+
protected _parent: PARENT;
|
|
10
|
+
protected _mode: DDialogGestureMode;
|
|
11
|
+
protected _options?: DDialogGestureOptions;
|
|
12
|
+
protected _isEnabled: boolean;
|
|
13
|
+
protected _isDirty: boolean;
|
|
14
|
+
protected _constraint?: DDialogGestureConstraint;
|
|
15
|
+
protected _util?: UtilGesture<any>;
|
|
16
|
+
constructor(parent: PARENT, options: DDialogGestureOptions);
|
|
17
|
+
get parent(): PARENT;
|
|
18
|
+
get mode(): DDialogGestureMode;
|
|
19
|
+
set mode(mode: DDialogGestureMode);
|
|
20
|
+
get constraint(): DDialogGestureConstraint;
|
|
21
|
+
set constraint(constraint: DDialogGestureConstraint);
|
|
22
|
+
protected newConstraint(): DDialogGestureConstraint;
|
|
23
|
+
isDirty(): boolean;
|
|
24
|
+
isClean(): boolean;
|
|
25
|
+
toClean(): void;
|
|
26
|
+
protected newUtil(): UtilGesture<any>;
|
|
27
|
+
protected toConstrained(target: DBase, layer: DApplicationLayerLike, x: number, y: number): void;
|
|
28
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DApplicationLayerLike } from "./d-application-layer-like";
|
|
2
|
+
import { DBase } from "./d-base";
|
|
3
|
+
import { DDialogGestureMode } from "./d-dialog-gesture-mode";
|
|
4
|
+
export declare type DDialogGestureConstraint = (target: DBase, layer: DApplicationLayerLike, x: number, y: number) => void;
|
|
5
|
+
export interface DDialogGestureOptions {
|
|
6
|
+
enable?: boolean;
|
|
7
|
+
mode?: DDialogGestureMode | keyof typeof DDialogGestureMode;
|
|
8
|
+
constraint?: DDialogGestureConstraint;
|
|
9
|
+
}
|
|
10
|
+
export interface DDialogGestureParent extends DBase {
|
|
11
|
+
readonly layer: DApplicationLayerLike | null;
|
|
12
|
+
}
|
|
13
|
+
export interface DDialogGesture<PARENT extends DDialogGestureParent> {
|
|
14
|
+
parent: PARENT;
|
|
15
|
+
mode: DDialogGestureMode;
|
|
16
|
+
constraint: DDialogGestureConstraint;
|
|
17
|
+
/**
|
|
18
|
+
* Returns true if thhe dialog position is changed by gestures.
|
|
19
|
+
*/
|
|
20
|
+
isDirty(): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Returns true if the dialog position is not changed by gestures.
|
|
23
|
+
*/
|
|
24
|
+
isClean(): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Marks the dialog position is not changed by gestures.
|
|
27
|
+
*/
|
|
28
|
+
toClean(): void;
|
|
29
|
+
}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import { Point } from "pixi.js";
|
|
1
|
+
import { Point, Rectangle } from "pixi.js";
|
|
2
2
|
import { DAnimation } from "./d-animation";
|
|
3
|
+
import { DApplicationLayerLike } from "./d-application-layer-like";
|
|
3
4
|
import { DBase, DBaseEvents, DBaseOptions, DThemeBase } from "./d-base";
|
|
4
5
|
import { DFocusable } from "./d-controller-focus";
|
|
5
6
|
import { DDialogAlign } from "./d-dialog-align";
|
|
6
7
|
import { DDialogCloseOn } from "./d-dialog-close-on";
|
|
8
|
+
import { DDialogGesture, DDialogGestureOptions } from "./d-dialog-gesture";
|
|
9
|
+
import { DDialogGestureMode } from "./d-dialog-gesture-mode";
|
|
7
10
|
import { DDialogMode } from "./d-dialog-mode";
|
|
8
11
|
import { DOnOptions } from "./d-on-options";
|
|
12
|
+
import { DPadding } from "./d-padding";
|
|
9
13
|
import { UtilOverlay } from "./util/util-overlay";
|
|
10
14
|
/**
|
|
11
15
|
* {@link DDialog} events.
|
|
@@ -33,14 +37,15 @@ export interface DDialogOnOptions<EMITTER> extends Partial<DDialogEvents<EMITTER
|
|
|
33
37
|
* {@link DDialog} options.
|
|
34
38
|
*/
|
|
35
39
|
export interface DDialogOptions<THEME extends DThemeDialog = DThemeDialog, EMITTER = any> extends DBaseOptions<THEME> {
|
|
36
|
-
closeOn?: DDialogCloseOn;
|
|
40
|
+
closeOn?: DDialogCloseOn | Array<keyof typeof DDialogCloseOn> | keyof typeof DDialogCloseOn;
|
|
37
41
|
animation?: DAnimation<DBase>;
|
|
38
42
|
/**
|
|
39
43
|
* A dialog mode.
|
|
40
44
|
*/
|
|
41
45
|
mode?: DDialogMode | keyof typeof DDialogMode;
|
|
42
46
|
sticky?: boolean;
|
|
43
|
-
|
|
47
|
+
gesture?: boolean | DDialogGestureOptions;
|
|
48
|
+
align?: DDialogAlign | null | keyof typeof DDialogAlign;
|
|
44
49
|
/**
|
|
45
50
|
* Mappings of event names and handlers.
|
|
46
51
|
*/
|
|
@@ -51,10 +56,17 @@ export interface DDialogOptions<THEME extends DThemeDialog = DThemeDialog, EMITT
|
|
|
51
56
|
*/
|
|
52
57
|
export interface DThemeDialog extends DThemeBase {
|
|
53
58
|
getMode(): DDialogMode;
|
|
54
|
-
closeOn(): DDialogCloseOn;
|
|
55
|
-
isSticky(): boolean;
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
closeOn(mode: DDialogMode): DDialogCloseOn;
|
|
60
|
+
isSticky(mode: DDialogMode): boolean;
|
|
61
|
+
isGestureEnabled(mode: DDialogMode): boolean;
|
|
62
|
+
getGestureMode(mode: DDialogMode): DDialogGestureMode;
|
|
63
|
+
getOffsetX(mode: DDialogMode): number;
|
|
64
|
+
getOffsetY(mode: DDialogMode): number;
|
|
65
|
+
getAlign(mode: DDialogMode): DDialogAlign | null;
|
|
66
|
+
newAnimation(mode: DDialogMode): DAnimation<DBase> | null;
|
|
67
|
+
}
|
|
68
|
+
export interface DDialogOpener {
|
|
69
|
+
getBounds(skipUpdate: boolean, result: Rectangle): Rectangle;
|
|
58
70
|
}
|
|
59
71
|
/**
|
|
60
72
|
* A dialog class.
|
|
@@ -65,6 +77,7 @@ export interface DThemeDialog extends DThemeBase {
|
|
|
65
77
|
* the one it belongs to at the time when it is created.
|
|
66
78
|
*/
|
|
67
79
|
export declare class DDialog<VALUE = void, THEME extends DThemeDialog = DThemeDialog, OPTIONS extends DDialogOptions<THEME> = DDialogOptions<THEME>> extends DBase<THEME, OPTIONS> {
|
|
80
|
+
protected static WORK_BOUNDS?: Rectangle;
|
|
68
81
|
protected _promise?: Promise<VALUE>;
|
|
69
82
|
protected _resolve?: (value: VALUE | PromiseLike<VALUE>) => void;
|
|
70
83
|
protected _reject?: (reason?: any) => void;
|
|
@@ -75,12 +88,32 @@ export declare class DDialog<VALUE = void, THEME extends DThemeDialog = DThemeDi
|
|
|
75
88
|
protected _mode: DDialogMode;
|
|
76
89
|
protected _sticky: boolean;
|
|
77
90
|
protected _onPrerenderBound: () => void;
|
|
78
|
-
protected _align: DDialogAlign;
|
|
79
|
-
protected
|
|
91
|
+
protected _align: DDialogAlign | null;
|
|
92
|
+
protected _opener?: DDialogOpener | null;
|
|
93
|
+
protected _gesture: DDialogGesture<this>;
|
|
94
|
+
protected _layer: DApplicationLayerLike | null;
|
|
80
95
|
protected init(options?: OPTIONS): void;
|
|
96
|
+
protected toCloseOn(mode: DDialogMode, theme: THEME, options?: OPTIONS): DDialogCloseOn;
|
|
97
|
+
protected toAlign(mode: DDialogMode, theme: THEME, options?: OPTIONS): DDialogAlign | null;
|
|
98
|
+
get mode(): DDialogMode;
|
|
99
|
+
get align(): DDialogAlign | null;
|
|
100
|
+
set algin(align: DDialogAlign | null);
|
|
101
|
+
get gesture(): DDialogGesture<this>;
|
|
102
|
+
get layer(): DApplicationLayerLike | null;
|
|
103
|
+
protected toGestureOptions(mode: DDialogMode, theme: THEME, options?: OPTIONS): DDialogGestureOptions;
|
|
104
|
+
onParentResize(parentWidth: number, parentHeight: number, parentPadding: DPadding): void;
|
|
81
105
|
protected getAnimation(): DAnimation | null;
|
|
82
106
|
protected onAnimationEnd(isReverse: boolean): void;
|
|
83
|
-
|
|
107
|
+
/**
|
|
108
|
+
* Opens a dialog.
|
|
109
|
+
*
|
|
110
|
+
* @param opener An opener of a dialog.
|
|
111
|
+
* The dialog position is determined based on a position and a size of the opener.
|
|
112
|
+
* If the opener is undefined, the dialog is placed at the center of the screen.
|
|
113
|
+
*
|
|
114
|
+
* @returns a value of this dialog
|
|
115
|
+
*/
|
|
116
|
+
open(opener?: DDialogOpener): Promise<VALUE>;
|
|
84
117
|
protected onPrerender(): void;
|
|
85
118
|
protected onOpen(): void;
|
|
86
119
|
isOpened(): boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DAlignHorizontal } from "./d-align-horizontal";
|
|
2
|
+
import { DDialogOpener } from "./d-dialog";
|
|
2
3
|
import { DDialogSelectOptions } from "./d-dialog-select";
|
|
3
4
|
import { DMenu, DMenuOptions } from "./d-menu";
|
|
4
5
|
import { DTableBodyCellButtonOptions } from "./d-table-body-cell-button";
|
|
@@ -71,7 +72,7 @@ export interface DTableColumnSorting<ROW_VALUE> {
|
|
|
71
72
|
}
|
|
72
73
|
export interface DTableColumnSelectingDialog<DIALOG_VALUE> {
|
|
73
74
|
readonly value: DIALOG_VALUE;
|
|
74
|
-
open(): Promise<DIALOG_VALUE>;
|
|
75
|
+
open(owner?: DDialogOpener): Promise<DIALOG_VALUE>;
|
|
75
76
|
}
|
|
76
77
|
export interface DTableColumnSelectingOptions<CELL_VALUE, DIALOG_VALUE, DIALOG extends DTableColumnSelectingDialog<DIALOG_VALUE>> {
|
|
77
78
|
getter?: DTableSelectingGetter<CELL_VALUE, DIALOG>;
|
|
@@ -221,6 +221,9 @@ export * from "./d-dialog-confirm-message";
|
|
|
221
221
|
export * from "./d-dialog-confirm";
|
|
222
222
|
export * from "./d-dialog-date";
|
|
223
223
|
export * from "./d-dialog-datetime";
|
|
224
|
+
export * from "./d-dialog-gesture-impl";
|
|
225
|
+
export * from "./d-dialog-gesture-mode";
|
|
226
|
+
export * from "./d-dialog-gesture";
|
|
224
227
|
export * from "./d-dialog-input-boolean";
|
|
225
228
|
export * from "./d-dialog-input-integer";
|
|
226
229
|
export * from "./d-dialog-input-real";
|
package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-boolean.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DDialogInputBoolean } from "../../d-dialog-input-boolean";
|
|
2
|
+
import { EShape } from "../e-shape";
|
|
2
3
|
import { EShapeActionExpression } from "./e-shape-action-expression";
|
|
3
4
|
import { EShapeActionRuntimeOpenDialog } from "./e-shape-action-runtime-open-dialog";
|
|
4
5
|
import { EShapeActionValueOpen } from "./e-shape-action-value-open";
|
|
@@ -6,5 +7,5 @@ export declare class EShapeActionRuntimeOpenDialogBoolean extends EShapeActionRu
|
|
|
6
7
|
protected static DIALOG?: DDialogInputBoolean;
|
|
7
8
|
protected initial: EShapeActionExpression<boolean>;
|
|
8
9
|
constructor(value: EShapeActionValueOpen);
|
|
9
|
-
protected open(target: string, initial: boolean): Promise<boolean>;
|
|
10
|
+
protected open(shape: EShape, target: string, initial: boolean): Promise<boolean>;
|
|
10
11
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DDialogDate } from "../../d-dialog-date";
|
|
2
2
|
import { NumberFormatter } from "../../util/number-formatter";
|
|
3
|
+
import { EShape } from "../e-shape";
|
|
3
4
|
import { EShapeActionExpression } from "./e-shape-action-expression";
|
|
4
5
|
import { EShapeActionRuntimeOpenDialog } from "./e-shape-action-runtime-open-dialog";
|
|
5
6
|
import { EShapeActionValueOpen } from "./e-shape-action-value-open";
|
|
@@ -8,7 +9,7 @@ export declare class EShapeActionRuntimeOpenDialogDate extends EShapeActionRunti
|
|
|
8
9
|
protected static FORMATTER?: NumberFormatter;
|
|
9
10
|
protected initial: EShapeActionExpression<unknown>;
|
|
10
11
|
constructor(value: EShapeActionValueOpen);
|
|
11
|
-
protected open(target: string, initial: unknown): Promise<string>;
|
|
12
|
+
protected open(shape: EShape, target: string, initial: unknown): Promise<string>;
|
|
12
13
|
protected toDate(value: unknown): Date;
|
|
13
14
|
protected getFormatter(): NumberFormatter;
|
|
14
15
|
protected newFormatter(): NumberFormatter;
|
package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-datetime.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DDialogDatetime } from "../../d-dialog-datetime";
|
|
2
|
+
import { EShape } from "../e-shape";
|
|
2
3
|
import { EShapeActionExpression } from "./e-shape-action-expression";
|
|
3
4
|
import { EShapeActionRuntimeOpenDialog } from "./e-shape-action-runtime-open-dialog";
|
|
4
5
|
import { EShapeActionValueOpen } from "./e-shape-action-value-open";
|
|
@@ -6,6 +7,6 @@ export declare class EShapeActionRuntimeOpenDialogDatetime extends EShapeActionR
|
|
|
6
7
|
protected static DIALOG?: DDialogDatetime;
|
|
7
8
|
protected initial: EShapeActionExpression<unknown>;
|
|
8
9
|
constructor(value: EShapeActionValueOpen);
|
|
9
|
-
protected open(target: string, initial: unknown): Promise<string>;
|
|
10
|
+
protected open(shape: EShape, target: string, initial: unknown): Promise<string>;
|
|
10
11
|
protected toDate(value: unknown): Date;
|
|
11
12
|
}
|
package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtime-open-dialog-integer.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DDialogInputInteger } from "../../d-dialog-input-integer";
|
|
2
|
+
import { EShape } from "../e-shape";
|
|
2
3
|
import { EShapeActionExpression } from "./e-shape-action-expression";
|
|
3
4
|
import { EShapeActionRuntimeOpenDialog } from "./e-shape-action-runtime-open-dialog";
|
|
4
5
|
import { EShapeActionValueOpen } from "./e-shape-action-value-open";
|
|
@@ -6,5 +7,5 @@ export declare class EShapeActionRuntimeOpenDialogInteger extends EShapeActionRu
|
|
|
6
7
|
protected static DIALOG?: DDialogInputInteger;
|
|
7
8
|
protected initial: EShapeActionExpression<number>;
|
|
8
9
|
constructor(value: EShapeActionValueOpen);
|
|
9
|
-
protected open(target: string, initial: number): Promise<number>;
|
|
10
|
+
protected open(shape: EShape, target: string, initial: number): Promise<number>;
|
|
10
11
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DDialogInputReal } from "../../d-dialog-input-real";
|
|
2
|
+
import { EShape } from "../e-shape";
|
|
2
3
|
import { EShapeActionExpression } from "./e-shape-action-expression";
|
|
3
4
|
import { EShapeActionRuntimeOpenDialog } from "./e-shape-action-runtime-open-dialog";
|
|
4
5
|
import { EShapeActionValueOpen } from "./e-shape-action-value-open";
|
|
@@ -6,5 +7,5 @@ export declare class EShapeActionRuntimeOpenDialogReal extends EShapeActionRunti
|
|
|
6
7
|
protected static DIALOG?: DDialogInputReal;
|
|
7
8
|
protected initial: EShapeActionExpression<number>;
|
|
8
9
|
constructor(value: EShapeActionValueOpen);
|
|
9
|
-
protected open(target: string, initial: number): Promise<number>;
|
|
10
|
+
protected open(shape: EShape, target: string, initial: number): Promise<number>;
|
|
10
11
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DDialogInputText } from "../../d-dialog-input-text";
|
|
2
|
+
import { EShape } from "../e-shape";
|
|
2
3
|
import { EShapeActionExpression } from "./e-shape-action-expression";
|
|
3
4
|
import { EShapeActionRuntimeOpenDialog } from "./e-shape-action-runtime-open-dialog";
|
|
4
5
|
import { EShapeActionValueOpen } from "./e-shape-action-value-open";
|
|
@@ -6,5 +7,5 @@ export declare class EShapeActionRuntimeOpenDialogText extends EShapeActionRunti
|
|
|
6
7
|
protected static DIALOG?: DDialogInputText;
|
|
7
8
|
protected initial: EShapeActionExpression<string>;
|
|
8
9
|
constructor(value: EShapeActionValueOpen);
|
|
9
|
-
protected open(target: string, initial: string): Promise<string>;
|
|
10
|
+
protected open(shape: EShape, target: string, initial: string): Promise<string>;
|
|
10
11
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DDialogTime } from "../../d-dialog-time";
|
|
2
2
|
import { NumberFormatter } from "../../util/number-formatter";
|
|
3
|
+
import { EShape } from "../e-shape";
|
|
3
4
|
import { EShapeActionExpression } from "./e-shape-action-expression";
|
|
4
5
|
import { EShapeActionRuntimeOpenDialog } from "./e-shape-action-runtime-open-dialog";
|
|
5
6
|
import { EShapeActionValueOpen } from "./e-shape-action-value-open";
|
|
@@ -9,7 +10,7 @@ export declare class EShapeActionRuntimeOpenDialogTime extends EShapeActionRunti
|
|
|
9
10
|
protected static FORMATTER?: NumberFormatter;
|
|
10
11
|
protected initial: EShapeActionExpression<unknown>;
|
|
11
12
|
constructor(value: EShapeActionValueOpen);
|
|
12
|
-
protected open(target: string, initial: unknown): Promise<string>;
|
|
13
|
+
protected open(shape: EShape, target: string, initial: unknown): Promise<string>;
|
|
13
14
|
protected toDate(value: unknown): Date;
|
|
14
15
|
protected toHours(value: string): number | null;
|
|
15
16
|
protected toMinutes(value: string): number | null;
|
|
@@ -10,5 +10,5 @@ export declare abstract class EShapeActionRuntimeOpenDialog<VALUE = unknown, INI
|
|
|
10
10
|
protected abstract initial: EShapeActionExpression<INITIAL>;
|
|
11
11
|
constructor(value: EShapeActionValueOpen);
|
|
12
12
|
execute(shape: EShape, runtime: EShapeRuntime, time: number): void;
|
|
13
|
-
protected abstract open(target: string, initial: INITIAL): Promise<VALUE>;
|
|
13
|
+
protected abstract open(shape: EShape, target: string, initial: INITIAL): Promise<VALUE>;
|
|
14
14
|
}
|
|
@@ -90,7 +90,7 @@ export interface EShape extends utils.EventEmitter {
|
|
|
90
90
|
containsAbsBBox(x: number, y: number, ax: number, ay: number): boolean;
|
|
91
91
|
toGlobal(position: IPoint, result: Point, skipUpdate?: boolean): Point;
|
|
92
92
|
toLocal(position: IPoint, from?: DisplayObject, result?: Point, skipUpdate?: boolean): Point;
|
|
93
|
-
getBounds(
|
|
94
|
-
getBoundsInternal(
|
|
95
|
-
getBoundsLocal(
|
|
93
|
+
getBounds(skipUpdate: boolean, result: Rectangle): Rectangle;
|
|
94
|
+
getBoundsInternal(skipUpdate: boolean, result: Rectangle): Rectangle;
|
|
95
|
+
getBoundsLocal(skipUpdate: boolean, result: Rectangle): Rectangle;
|
|
96
96
|
}
|
|
@@ -119,11 +119,11 @@ export declare abstract class EShapeBase extends utils.EventEmitter implements E
|
|
|
119
119
|
select(point: Point): boolean;
|
|
120
120
|
toGlobal(position: IPoint, result: Point, skipUpdate?: boolean): Point;
|
|
121
121
|
toLocal(position: IPoint, from?: DisplayObject, result?: Point, skipUpdate?: boolean): Point;
|
|
122
|
-
getBounds(
|
|
123
|
-
getBoundsInternal(
|
|
124
|
-
getBoundsLocal(
|
|
122
|
+
getBounds(skipUpdate: boolean, result: Rectangle): Rectangle;
|
|
123
|
+
getBoundsInternal(skipUpdate: boolean, result: Rectangle): Rectangle;
|
|
124
|
+
getBoundsLocal(skipUpdate: boolean, result: Rectangle): Rectangle;
|
|
125
125
|
protected getBoundsSize(): IPoint;
|
|
126
|
-
protected getBounds_(transform: Matrix,
|
|
126
|
+
protected getBounds_(transform: Matrix, result: Rectangle): Rectangle;
|
|
127
127
|
destroy(): void;
|
|
128
128
|
protected onStateChange(newState: DBaseStateSet, oldState: DBaseStateSet): void;
|
|
129
129
|
get state(): EShapeStateSet;
|
|
@@ -7,7 +7,6 @@ export declare class EShapeGroupSizeEditor implements EShapeGroupSize {
|
|
|
7
7
|
protected _parent: EShapeGroupSizeParent;
|
|
8
8
|
protected _size: Point;
|
|
9
9
|
protected _layouts: EShapeLayout[];
|
|
10
|
-
protected _workPoint: Point;
|
|
11
10
|
protected _workRectForCalcRect: Rectangle;
|
|
12
11
|
protected _workRectForFit: Rectangle;
|
|
13
12
|
protected _isFittable: boolean;
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
+
import { DAnimation } from "../../d-animation";
|
|
2
|
+
import { DBase } from "../../d-base";
|
|
1
3
|
import { DBaseInteractive } from "../../d-base-interactive";
|
|
2
4
|
import { DBaseStateSet } from "../../d-base-state-set";
|
|
3
5
|
import { DCoordinatePosition, DCoordinateSize } from "../../d-coordinate";
|
|
4
6
|
import { DThemeDialog } from "../../d-dialog";
|
|
7
|
+
import { DDialogAlign } from "../../d-dialog-align";
|
|
5
8
|
import { DDialogCloseOn } from "../../d-dialog-close-on";
|
|
9
|
+
import { DDialogGestureMode } from "../../d-dialog-gesture-mode";
|
|
6
10
|
import { DDialogMode } from "../../d-dialog-mode";
|
|
7
11
|
import { DShadow } from "../../d-shadow";
|
|
8
12
|
import { DThemeDarkBase } from "./d-theme-dark-base";
|
|
9
13
|
export declare class DThemeDarkDialog extends DThemeDarkBase implements DThemeDialog {
|
|
10
14
|
getMode(): DDialogMode;
|
|
11
|
-
closeOn(): DDialogCloseOn;
|
|
12
|
-
isSticky(): boolean;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
closeOn(mode: DDialogMode): DDialogCloseOn;
|
|
16
|
+
isSticky(mode: DDialogMode): boolean;
|
|
17
|
+
isGestureEnabled(mode: DDialogMode): boolean;
|
|
18
|
+
getGestureMode(mode: DDialogMode): DDialogGestureMode;
|
|
19
|
+
getOffsetX(mode: DDialogMode): number;
|
|
20
|
+
getOffsetY(mode: DDialogMode): number;
|
|
21
|
+
getAlign(mode: DDialogMode): DDialogAlign;
|
|
22
|
+
newAnimation(mode: DDialogMode): DAnimation<DBase> | null;
|
|
15
23
|
getBackgroundColor(state: DBaseStateSet): number;
|
|
16
24
|
getBorderColor(state: DBaseStateSet): number | null;
|
|
17
25
|
getOutlineColor(state: DBaseStateSet): number | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DAlignHorizontal } from "../../d-align-horizontal";
|
|
2
|
+
import { DBaseInteractive } from "../../d-base-interactive";
|
|
2
3
|
import { DBaseStateSet } from "../../d-base-state-set";
|
|
3
4
|
import { DCoordinateSize } from "../../d-coordinate";
|
|
4
5
|
import { DFontWeight } from "../../d-font";
|
|
@@ -14,4 +15,5 @@ export declare class DThemeDarkPickerDatetimeLabel extends DThemeDarkText<Date>
|
|
|
14
15
|
getFontWeight(): DFontWeight;
|
|
15
16
|
getFontSize(): number;
|
|
16
17
|
newTextValue(): DStateAwareOrValueMightBe<Date>;
|
|
18
|
+
getInteractive(): DBaseInteractive;
|
|
17
19
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DBaseInteractive } from "../../d-base-interactive";
|
|
1
2
|
import { DBaseStateSet } from "../../d-base-state-set";
|
|
2
3
|
import { DCoordinateSize } from "../../d-coordinate";
|
|
3
4
|
import { DThemePickerDatetimeSpace } from "../../d-picker-datetime-space";
|
|
@@ -8,4 +9,5 @@ export declare class DThemeDarkPickerDatetimeSpace extends DThemeDarkBase implem
|
|
|
8
9
|
getWidth(): DCoordinateSize;
|
|
9
10
|
getHeight(): DCoordinateSize;
|
|
10
11
|
newState(state: DBaseStateSet): void;
|
|
12
|
+
getInteractive(): DBaseInteractive;
|
|
11
13
|
}
|
|
@@ -6,6 +6,7 @@ import { DPickerDatetimeMask } from "../../d-picker-datetime-mask";
|
|
|
6
6
|
import { DThemePickerTime } from "../../d-picker-time";
|
|
7
7
|
import { DThemeDarkBase } from "./d-theme-dark-base";
|
|
8
8
|
export declare class DThemeDarkPickerTime extends DThemeDarkBase implements DThemePickerTime {
|
|
9
|
+
getBackgroundColor(state: DBaseStateSet): number | null;
|
|
9
10
|
getInteractive(): DBaseInteractive;
|
|
10
11
|
newState(state: DBaseStateSet): void;
|
|
11
12
|
getMargin(): number;
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
+
import { DAnimation } from "../../d-animation";
|
|
2
|
+
import { DBase } from "../../d-base";
|
|
1
3
|
import { DBaseInteractive } from "../../d-base-interactive";
|
|
2
4
|
import { DBaseStateSet } from "../../d-base-state-set";
|
|
3
5
|
import { DCoordinatePosition, DCoordinateSize } from "../../d-coordinate";
|
|
4
6
|
import { DThemeDialog } from "../../d-dialog";
|
|
7
|
+
import { DDialogAlign } from "../../d-dialog-align";
|
|
5
8
|
import { DDialogCloseOn } from "../../d-dialog-close-on";
|
|
9
|
+
import { DDialogGestureMode } from "../../d-dialog-gesture-mode";
|
|
6
10
|
import { DDialogMode } from "../../d-dialog-mode";
|
|
7
11
|
import { DShadow } from "../../d-shadow";
|
|
8
12
|
import { DThemeWhiteBase } from "./d-theme-white-base";
|
|
9
13
|
export declare class DThemeWhiteDialog extends DThemeWhiteBase implements DThemeDialog {
|
|
10
14
|
getMode(): DDialogMode;
|
|
11
|
-
closeOn(): DDialogCloseOn;
|
|
12
|
-
isSticky(): boolean;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
closeOn(mode: DDialogMode): DDialogCloseOn;
|
|
16
|
+
isSticky(mode: DDialogMode): boolean;
|
|
17
|
+
isGestureEnabled(mode: DDialogMode): boolean;
|
|
18
|
+
getGestureMode(mode: DDialogMode): DDialogGestureMode;
|
|
19
|
+
getOffsetX(mode: DDialogMode): number;
|
|
20
|
+
getOffsetY(mode: DDialogMode): number;
|
|
21
|
+
getAlign(mode: DDialogMode): DDialogAlign;
|
|
22
|
+
newAnimation(mode: DDialogMode): DAnimation<DBase> | null;
|
|
15
23
|
getBackgroundColor(state: DBaseStateSet): number;
|
|
16
24
|
getBorderColor(state: DBaseStateSet): number | null;
|
|
17
25
|
getOutlineColor(state: DBaseStateSet): number | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DAlignHorizontal } from "../../d-align-horizontal";
|
|
2
|
+
import { DBaseInteractive } from "../../d-base-interactive";
|
|
2
3
|
import { DBaseStateSet } from "../../d-base-state-set";
|
|
3
4
|
import { DCoordinateSize } from "../../d-coordinate";
|
|
4
5
|
import { DFontWeight } from "../../d-font";
|
|
@@ -14,4 +15,5 @@ export declare class DThemeWhitePickerDatetimeLabel extends DThemeWhiteText<Date
|
|
|
14
15
|
getFontWeight(): DFontWeight;
|
|
15
16
|
getFontSize(): number;
|
|
16
17
|
newTextValue(): DStateAwareOrValueMightBe<Date>;
|
|
18
|
+
getInteractive(): DBaseInteractive;
|
|
17
19
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DBaseInteractive } from "../../d-base-interactive";
|
|
1
2
|
import { DBaseStateSet } from "../../d-base-state-set";
|
|
2
3
|
import { DCoordinateSize } from "../../d-coordinate";
|
|
3
4
|
import { DThemePickerDatetimeSpace } from "../../d-picker-datetime-space";
|
|
@@ -8,4 +9,5 @@ export declare class DThemeWhitePickerDatetimeSpace extends DThemeWhiteBase impl
|
|
|
8
9
|
getWidth(): DCoordinateSize;
|
|
9
10
|
getHeight(): DCoordinateSize;
|
|
10
11
|
newState(state: DBaseStateSet): void;
|
|
12
|
+
getInteractive(): DBaseInteractive;
|
|
11
13
|
}
|
|
@@ -6,6 +6,7 @@ import { DPickerDatetimeMask } from "../../d-picker-datetime-mask";
|
|
|
6
6
|
import { DThemePickerTime } from "../../d-picker-time";
|
|
7
7
|
import { DThemeWhiteBase } from "./d-theme-white-base";
|
|
8
8
|
export declare class DThemeWhitePickerTime extends DThemeWhiteBase implements DThemePickerTime {
|
|
9
|
+
getBackgroundColor(state: DBaseStateSet): number | null;
|
|
9
10
|
getInteractive(): DBaseInteractive;
|
|
10
11
|
newState(state: DBaseStateSet): void;
|
|
11
12
|
getMargin(): number;
|
|
@@ -51,7 +51,7 @@ var DChartPlotAreaContainer = /** @class */ (function (_super) {
|
|
|
51
51
|
for (var i = 0, imax = children.length; i < imax; ++i) {
|
|
52
52
|
var child = children[i];
|
|
53
53
|
if (child.visible) {
|
|
54
|
-
child.getBoundsInternal(
|
|
54
|
+
child.getBoundsInternal(false, rect);
|
|
55
55
|
if (isFirst) {
|
|
56
56
|
isFirst = false;
|
|
57
57
|
xmin = rect.x;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-chart-plot-area-container.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-container.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,SAAS,EAAa,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D;IAA6C,2CAAe;IAK3D,iCAAY,QAAoB;QAAhC,YACC,iBAAO,SAKP;QAJA,IAAM,SAAS,GAAc,KAAI,CAAC,SAAS,CAAC;QAC5C,KAAI,CAAC,SAAS,GAAG,IAAI,UAAU,CAAC,SAAS,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC9D,KAAI,CAAC,MAAM,GAAG,IAAI,UAAU,CAAC,SAAS,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACxD,KAAI,CAAC,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;;IAClC,CAAC;IAGD,sBAAI,6CAAQ;QADZ,aAAa;aACb;YACC,OAAO,IAAI,CAAC,SAAS,CAAC;QACvB,CAAC;;;OAAA;IAGD,sBAAI,0CAAK;QADT,aAAa;aACb;YACC,OAAO,IAAI,CAAC,MAAM,CAAC;QACpB,CAAC;;;OAAA;IAED,2CAAS,GAAT,UAAU,UAAoB,EAAE,IAAgB;QAC9C,IAAY,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC;QACjC,OAAO,iBAAM,SAAS,YAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAC1C,CAAC;IAED,iDAAe,GAAf;QACC,IA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corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Rectangle, Transform } from \"pixi.js\";\nimport { DBasePoint } from \"./d-base-point\";\nimport { DViewTarget } from \"./d-view-to-target\";\nimport { EShapeContainer } from \"./shape/e-shape-container\";\n\nexport class DChartPlotAreaContainer extends EShapeContainer implements DViewTarget {\n\tprotected _position: DBasePoint;\n\tprotected _scale: DBasePoint;\n\tprotected _workRect: Rectangle;\n\n\tconstructor(onChange: () => void) {\n\t\tsuper();\n\t\tconst transform: Transform = this.transform;\n\t\tthis._position = new DBasePoint(transform.position, onChange);\n\t\tthis._scale = new DBasePoint(transform.scale, onChange);\n\t\tthis._workRect = new Rectangle();\n\t}\n\n\t// @ts-ignore\n\tget position(): DBasePoint {\n\t\treturn this._position;\n\t}\n\n\t// @ts-ignore\n\tget scale(): DBasePoint {\n\t\treturn this._scale;\n\t}\n\n\tgetBounds(skipUpdate?: boolean, rect?: Rectangle): Rectangle {\n\t\t(this as any)._lastBoundsID = -1;\n\t\treturn super.getBounds(skipUpdate, rect);\n\t}\n\n\tcalculateBounds(): void {\n\t\tconst bounds = this._bounds;\n\t\tconst work = this._work;\n\t\tconst rect = this._workRect;\n\t\tconst worldTransform = this.transform.worldTransform;\n\n\t\tlet xmin = 0;\n\t\tlet xmax = 0;\n\t\tlet ymin = 0;\n\t\tlet ymax = 0;\n\t\tconst children = this.children;\n\t\tif (0 < children.length) {\n\t\t\tlet isFirst = true;\n\t\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\t\tconst child = children[i];\n\t\t\t\tif (child.visible) {\n\t\t\t\t\tchild.getBoundsInternal(false, rect);\n\t\t\t\t\tif (isFirst) {\n\t\t\t\t\t\tisFirst = false;\n\t\t\t\t\t\txmin = rect.x;\n\t\t\t\t\t\tymin = rect.y;\n\t\t\t\t\t\txmax = rect.x + rect.width;\n\t\t\t\t\t\tymax = rect.y + rect.height;\n\t\t\t\t\t} else {\n\t\t\t\t\t\txmin = Math.min(xmin, rect.x);\n\t\t\t\t\t\tymin = Math.min(ymin, rect.y);\n\t\t\t\t\t\txmax = Math.max(xmax, rect.x + rect.width);\n\t\t\t\t\t\tymax = Math.max(ymax, rect.y + rect.height);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbounds.clear();\n\n\t\twork.set(xmin, ymin);\n\t\tworldTransform.apply(work, work);\n\t\tbounds.addPoint(work);\n\n\t\twork.set(xmax, ymax);\n\t\tworldTransform.apply(work, work);\n\t\tbounds.addPoint(work);\n\t}\n}\n"]}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { Point, Rectangle } from "pixi.js";
|
|
6
|
+
import { DDialogGestureMode } from "./d-dialog-gesture-mode";
|
|
7
|
+
import { toEnum } from "./util/to-enum";
|
|
8
|
+
import { UtilGesture } from "./util/util-gesture";
|
|
9
|
+
var DDialogGestureImpl = /** @class */ (function () {
|
|
10
|
+
function DDialogGestureImpl(parent, options) {
|
|
11
|
+
var _a;
|
|
12
|
+
this._parent = parent;
|
|
13
|
+
this._options = options;
|
|
14
|
+
if (options.enable) {
|
|
15
|
+
this._util = this.newUtil();
|
|
16
|
+
}
|
|
17
|
+
this._mode = toEnum((_a = options.mode) !== null && _a !== void 0 ? _a : DDialogGestureMode.DIRTY, DDialogGestureMode);
|
|
18
|
+
this._isEnabled = true;
|
|
19
|
+
this._isDirty = false;
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(DDialogGestureImpl.prototype, "parent", {
|
|
22
|
+
get: function () {
|
|
23
|
+
return this._parent;
|
|
24
|
+
},
|
|
25
|
+
enumerable: false,
|
|
26
|
+
configurable: true
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(DDialogGestureImpl.prototype, "mode", {
|
|
29
|
+
get: function () {
|
|
30
|
+
return this._mode;
|
|
31
|
+
},
|
|
32
|
+
set: function (mode) {
|
|
33
|
+
this._mode = mode;
|
|
34
|
+
},
|
|
35
|
+
enumerable: false,
|
|
36
|
+
configurable: true
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(DDialogGestureImpl.prototype, "constraint", {
|
|
39
|
+
get: function () {
|
|
40
|
+
var _a, _b;
|
|
41
|
+
var result = this._constraint;
|
|
42
|
+
if (result == null) {
|
|
43
|
+
result = (_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.constraint) !== null && _b !== void 0 ? _b : this.newConstraint();
|
|
44
|
+
this._constraint = result;
|
|
45
|
+
}
|
|
46
|
+
return result;
|
|
47
|
+
},
|
|
48
|
+
set: function (constraint) {
|
|
49
|
+
this._constraint = constraint;
|
|
50
|
+
},
|
|
51
|
+
enumerable: false,
|
|
52
|
+
configurable: true
|
|
53
|
+
});
|
|
54
|
+
DDialogGestureImpl.prototype.newConstraint = function () {
|
|
55
|
+
var _this = this;
|
|
56
|
+
return function (target, layer, x, y) {
|
|
57
|
+
_this.toConstrained(target, layer, x, y);
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
DDialogGestureImpl.prototype.isDirty = function () {
|
|
61
|
+
return this._isDirty;
|
|
62
|
+
};
|
|
63
|
+
DDialogGestureImpl.prototype.isClean = function () {
|
|
64
|
+
return !this._isDirty;
|
|
65
|
+
};
|
|
66
|
+
DDialogGestureImpl.prototype.toClean = function () {
|
|
67
|
+
if (this._isDirty) {
|
|
68
|
+
this._isDirty = false;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
DDialogGestureImpl.prototype.newUtil = function () {
|
|
72
|
+
var _this = this;
|
|
73
|
+
var p = new Point();
|
|
74
|
+
var parent = this._parent;
|
|
75
|
+
var position = parent.position;
|
|
76
|
+
return new UtilGesture({
|
|
77
|
+
bind: parent,
|
|
78
|
+
checker: {
|
|
79
|
+
start: function (e) {
|
|
80
|
+
// Are children clicked?
|
|
81
|
+
if (e.target !== parent) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
// Is clicked outside?
|
|
85
|
+
p.copyFrom(e.data.global);
|
|
86
|
+
parent.toLocal(p, undefined, p, true);
|
|
87
|
+
var x = p.x;
|
|
88
|
+
var y = p.y;
|
|
89
|
+
if (x < 0 || y < 0 || parent.width < x || parent.height < y) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
// Ok
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
on: {
|
|
97
|
+
start: function () {
|
|
98
|
+
p.copyFrom(position);
|
|
99
|
+
},
|
|
100
|
+
move: function (target, dx, dy) {
|
|
101
|
+
p.set(p.x + dx, p.y + dy);
|
|
102
|
+
if (!_this._isDirty) {
|
|
103
|
+
_this._isDirty = true;
|
|
104
|
+
parent.setX(position.x);
|
|
105
|
+
parent.setY(position.y);
|
|
106
|
+
}
|
|
107
|
+
var layer = parent.layer;
|
|
108
|
+
if (layer != null) {
|
|
109
|
+
_this.constraint(parent, layer, p.x, p.y);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
DDialogGestureImpl.prototype.toConstrained = function (target, layer, x, y) {
|
|
116
|
+
var _a;
|
|
117
|
+
var position = target.position;
|
|
118
|
+
if (layer) {
|
|
119
|
+
var bounds = target.getBounds(false, ((_a = DDialogGestureImpl.WORK_BOUNDS) !== null && _a !== void 0 ? _a : (DDialogGestureImpl.WORK_BOUNDS = new Rectangle())));
|
|
120
|
+
var obx = bounds.x + x - position.x;
|
|
121
|
+
var oby = bounds.y + y - position.y;
|
|
122
|
+
var nbx = Math.min(Math.max(0, obx), layer.width - bounds.width);
|
|
123
|
+
var nby = Math.min(Math.max(0, oby), layer.height - bounds.height);
|
|
124
|
+
position.set(x + nbx - obx, y + nby - oby);
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
position.set(x, y);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
return DDialogGestureImpl;
|
|
131
|
+
}());
|
|
132
|
+
export { DDialogGestureImpl };
|
|
133
|
+
//# sourceMappingURL=d-dialog-gesture-impl.js.map
|