@wcardinal/wcardinal-ui 0.460.0-beta.0 → 0.461.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-application-layer.d.ts +5 -4
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-base.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-primary.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub-secondary.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-chart-plot-area-twofold-sub.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-diagram-canvas-editor.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-diagram-canvas.d.ts +3 -1
- package/dist/types/wcardinal/ui/d-diagram.d.ts +1 -0
- package/dist/types/wcardinal/ui/d-view-to-target.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtime-base.d.ts +5 -3
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtime-open-dropped.d.ts +19 -0
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtime-open.d.ts +4 -0
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-runtime.d.ts +22 -3
- package/dist/types/wcardinal/ui/shape/action/e-shape-action-value-open.d.ts +7 -0
- package/dist/types/wcardinal/ui/shape/action/index.d.ts +1 -0
- package/dist/types/wcardinal/ui/shape/e-shape-runtime-impl.d.ts +3 -1
- package/dist/types/wcardinal/ui/shape/e-shape-runtime.d.ts +3 -1
- package/dist/types/wcardinal/ui/shape/e-shape-state-set-impl-observable.d.ts +5 -0
- package/dist/types/wcardinal/ui/shape/e-shape-state-set.d.ts +4 -0
- package/dist/types/wcardinal/ui/shape/e-shape-state.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/common/new-shape-drag-image.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/dark/e-theme-dark-shape-action-value-open.d.ts +9 -0
- package/dist/types/wcardinal/ui/theme/dark/index-zz-zz.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/e-theme-white-shape-action-value-open.d.ts +9 -0
- package/dist/types/wcardinal/ui/theme/white/index-zz-zz.d.ts +1 -0
- package/dist/types/wcardinal/ui/util/util-file-opener.d.ts +3 -1
- package/dist/wcardinal/ui/d-application-layer.js +30 -8
- package/dist/wcardinal/ui/d-application-layer.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-base.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-primary.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub-secondary.js.map +1 -1
- package/dist/wcardinal/ui/d-chart-plot-area-twofold-sub.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram-canvas-editor.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram-canvas.js +66 -14
- package/dist/wcardinal/ui/d-diagram-canvas.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram.js +7 -0
- package/dist/wcardinal/ui/d-diagram.js.map +1 -1
- package/dist/wcardinal/ui/d-view-to-target.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-base.js +6 -0
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-base.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dropped.js +17 -0
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open-dropped.js.map +1 -0
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open.js +39 -0
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime-open.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-runtime.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/e-shape-action-value-open.js.map +1 -1
- package/dist/wcardinal/ui/shape/action/index.js +1 -0
- package/dist/wcardinal/ui/shape/action/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-runtime-impl.js +32 -0
- package/dist/wcardinal/ui/shape/e-shape-runtime-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-runtime.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-state-set-impl-observable.js +31 -0
- package/dist/wcardinal/ui/shape/e-shape-state-set-impl-observable.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-state-set.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-state.js +1 -0
- package/dist/wcardinal/ui/shape/e-shape-state.js.map +1 -1
- package/dist/wcardinal/ui/theme/common/new-shape-drag-image.js +26 -0
- package/dist/wcardinal/ui/theme/common/new-shape-drag-image.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/e-theme-dark-shape-action-value-open.js +32 -0
- package/dist/wcardinal/ui/theme/dark/e-theme-dark-shape-action-value-open.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/index-zz-zz.js +1 -0
- package/dist/wcardinal/ui/theme/dark/index-zz-zz.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/load/load-theme-dark-shape-action-value.js +2 -0
- package/dist/wcardinal/ui/theme/dark/load/load-theme-dark-shape-action-value.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/e-theme-white-shape-action-value-open.js +32 -0
- package/dist/wcardinal/ui/theme/white/e-theme-white-shape-action-value-open.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/index-zz-zz.js +1 -0
- package/dist/wcardinal/ui/theme/white/index-zz-zz.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/load/load-theme-white-shape-action-value.js +2 -0
- package/dist/wcardinal/ui/theme/white/load/load-theme-white-shape-action-value.js.map +1 -1
- package/dist/wcardinal/ui/util/util-file-downloader.js +21 -1
- package/dist/wcardinal/ui/util/util-file-downloader.js.map +1 -1
- package/dist/wcardinal/ui/util/util-file-opener.js +5 -3
- package/dist/wcardinal/ui/util/util-file-opener.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.js +57 -1
- package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.js +57 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +57 -1
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.js +57 -1
- package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.js +57 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +57 -1
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui.cjs.js +38861 -38548
- package/dist/wcardinal-ui.js +254 -27
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -23,11 +23,12 @@ export declare class DApplicationLayer extends Application implements DApplicati
|
|
|
23
23
|
protected initStage(): void;
|
|
24
24
|
protected initView(): void;
|
|
25
25
|
protected initRootElement(): void;
|
|
26
|
-
protected
|
|
27
|
-
protected
|
|
26
|
+
protected initFocus(): void;
|
|
27
|
+
protected initResize(): void;
|
|
28
28
|
protected onResize(): void;
|
|
29
|
-
protected
|
|
30
|
-
protected
|
|
29
|
+
protected initWheel(): void;
|
|
30
|
+
protected initDblClick(): void;
|
|
31
|
+
protected initDragStart(): void;
|
|
31
32
|
lock(): void;
|
|
32
33
|
unlock(): void;
|
|
33
34
|
update(): void;
|
|
@@ -46,6 +46,6 @@ export declare abstract class DChartPlotAreaTwofoldSubBase<CHART extends DBase =
|
|
|
46
46
|
getSelectionBoundsY(): Rectangle;
|
|
47
47
|
toBoundsDirty(): void;
|
|
48
48
|
toLocal(position: IPoint, from?: DisplayObject, result?: Point, skipUpdate?: boolean): Point;
|
|
49
|
-
abstract getContainerBounds():
|
|
49
|
+
abstract getContainerBounds(): Rectangle;
|
|
50
50
|
destroy(): void;
|
|
51
51
|
}
|
|
@@ -7,5 +7,5 @@ export declare class DChartPlotAreaTwofoldSubPrimary<CHART extends DBase = DBase
|
|
|
7
7
|
protected getOverflowMask(): DBaseOverflowMaskSimple;
|
|
8
8
|
getPixelRange(result: DChartRegion): DChartRegion;
|
|
9
9
|
getPixelBounds(): Rectangle;
|
|
10
|
-
getContainerBounds():
|
|
10
|
+
getContainerBounds(): Rectangle;
|
|
11
11
|
}
|
|
@@ -7,5 +7,5 @@ export declare class DChartPlotAreaTwofoldSubSecondary<CHART extends DBase = DBa
|
|
|
7
7
|
protected getOverflowMask(): DBaseOverflowMaskSimple;
|
|
8
8
|
getPixelRange(result: DChartRegion): DChartRegion;
|
|
9
9
|
getPixelBounds(): Rectangle;
|
|
10
|
-
getContainerBounds():
|
|
10
|
+
getContainerBounds(): Rectangle;
|
|
11
11
|
}
|
|
@@ -5,6 +5,7 @@ import { DChartSeriesContainerOptions } from "./d-chart-series-container";
|
|
|
5
5
|
import { DChartSeriesContainerImpl } from "./d-chart-series-container-impl";
|
|
6
6
|
import { DChartCoordinateContainer, DChartCoordinateContainerOptions } from "./d-chart-coordinate-container";
|
|
7
7
|
import { DChartAxisContainer, DChartAxisContainerOptions } from "./d-chart-axis-container";
|
|
8
|
+
import { Rectangle } from "pixi.js";
|
|
8
9
|
export interface DChartPlotAreaTwofoldSubOptions<CHART extends DBase = DBase> {
|
|
9
10
|
series?: DChartSeriesContainerOptions<CHART>;
|
|
10
11
|
coordinate?: DChartCoordinateContainerOptions<CHART>;
|
|
@@ -17,6 +18,6 @@ export interface DChartPlotAreaTwofoldSub<CHART extends DBase = DBase> extends D
|
|
|
17
18
|
readonly series: DChartSeriesContainerImpl<CHART>;
|
|
18
19
|
readonly coordinate: DChartCoordinateContainer<CHART>;
|
|
19
20
|
readonly axis: DChartAxisContainer<CHART>;
|
|
20
|
-
getContainerBounds():
|
|
21
|
+
getContainerBounds(): Rectangle;
|
|
21
22
|
destroy(): void;
|
|
22
23
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Renderer } from "pixi.js";
|
|
1
2
|
import { DDiagramCanvasBase, DDiagramCanvasBaseOptions, DThemeDiagramCanvasBase } from "./d-diagram-canvas-base";
|
|
2
3
|
import { DDiagramCanvasEditorShape } from "./d-diagram-canvas-editor-shape";
|
|
3
4
|
import { DDiagramCanvasEditorSnap, DDiagramCanvasEditorSnapOptions, DThemeDiagramCanvasEditorSnap } from "./d-diagram-canvas-editor-snap";
|
|
@@ -21,6 +22,6 @@ export declare class DDiagramCanvasEditor<THEME extends DThemeDiagramCanvasEdito
|
|
|
21
22
|
serialize(id?: number, thumbnail?: DDiagramCanvasEditorThumbnail): DDiagramSerialized;
|
|
22
23
|
onResize(newWidth: number, newHeight: number, oldWidth: number, oldHeight: number): void;
|
|
23
24
|
protected onScale(newX: number, newY: number, oldX: number, oldY: number): void;
|
|
24
|
-
render(renderer:
|
|
25
|
+
render(renderer: Renderer): void;
|
|
25
26
|
protected getType(): string;
|
|
26
27
|
}
|
|
@@ -24,6 +24,7 @@ export declare class DDiagramCanvas<THEME extends DThemeDiagramCanvas = DThemeDi
|
|
|
24
24
|
protected _overed?: EShape | null;
|
|
25
25
|
protected _downed?: EShape | null;
|
|
26
26
|
protected _downeds: Set<EShape>;
|
|
27
|
+
protected _dragging: HTMLCanvasElement | null;
|
|
27
28
|
protected _updateBound: () => void;
|
|
28
29
|
constructor(options: OPTIONS);
|
|
29
30
|
get data(): DDiagramCanvasData;
|
|
@@ -49,9 +50,10 @@ export declare class DDiagramCanvas<THEME extends DThemeDiagramCanvas = DThemeDi
|
|
|
49
50
|
protected onShapeOver(e: InteractionEvent, target?: EShape | EShapeContainer | null, except?: EShape | null): void;
|
|
50
51
|
onShapeDown(e: InteractionEvent): boolean;
|
|
51
52
|
onShapeUp(e: InteractionEvent): boolean;
|
|
52
|
-
onShapeCancel(e: InteractionEvent):
|
|
53
|
+
onShapeCancel(e: InteractionEvent | DragEvent): void;
|
|
53
54
|
onShapeClick(e: InteractionEvent): boolean;
|
|
54
55
|
onShapeDblClick(e: MouseEvent | TouchEvent, interactionManager: InteractionManager): boolean;
|
|
56
|
+
onShapeDragStart(e: DragEvent, interactionManager: InteractionManager): boolean;
|
|
55
57
|
onShapeRightClick(e: InteractionEvent): boolean;
|
|
56
58
|
onShapeRightDown(e: InteractionEvent): boolean;
|
|
57
59
|
onShapeRightUp(e: InteractionEvent): boolean;
|
|
@@ -43,6 +43,7 @@ export declare class DDiagram<THEME extends DThemeDiagram = DThemeDiagram, OPTIO
|
|
|
43
43
|
protected onShapeRightUp(e: InteractionEvent): void;
|
|
44
44
|
protected onShapeRightCancel(e: InteractionEvent): void;
|
|
45
45
|
onDblClick(e: MouseEvent | TouchEvent, manager: InteractionManager): boolean;
|
|
46
|
+
onDragStart(e: DragEvent, manager: InteractionManager): boolean;
|
|
46
47
|
protected onPrerender(renderer: Renderer): void;
|
|
47
48
|
render(newRenderer: Renderer): void;
|
|
48
49
|
destroy(): void;
|
|
@@ -6,7 +6,7 @@ export interface DViewTargetPoint {
|
|
|
6
6
|
set(x?: number, y?: number): void;
|
|
7
7
|
}
|
|
8
8
|
export interface DViewTargetParent {
|
|
9
|
-
toLocal(position: IPointData, from?: DisplayObject, point?: Point, skipUpdate?: boolean):
|
|
9
|
+
toLocal(position: IPointData, from?: DisplayObject, point?: Point, skipUpdate?: boolean): Point;
|
|
10
10
|
}
|
|
11
11
|
export interface DViewTarget {
|
|
12
12
|
parent?: DViewTargetParent | null;
|
|
@@ -16,15 +16,17 @@ export declare class EShapeActionRuntimeBase implements EShapeActionRuntime {
|
|
|
16
16
|
onBlur(shape: EShape, runtime: EShapeRuntime): void;
|
|
17
17
|
onClick(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent | KeyboardEvent): void;
|
|
18
18
|
onDblClick(shape: EShape, runtime: EShapeRuntime, e: MouseEvent | TouchEvent, manager: InteractionManager): void;
|
|
19
|
+
isDraggable(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent): boolean;
|
|
20
|
+
onDragStart(shape: EShape, runtime: EShapeRuntime, e: DragEvent, manager: InteractionManager): boolean;
|
|
19
21
|
onDowning(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent | KeyboardEvent): void;
|
|
20
22
|
onDown(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent | KeyboardEvent): void;
|
|
21
23
|
onMove(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent): void;
|
|
22
24
|
onOver(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent): void;
|
|
23
25
|
onOut(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent): void;
|
|
24
26
|
onUp(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent | KeyboardEvent): void;
|
|
25
|
-
onUpOutside(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent | KeyboardEvent): void;
|
|
26
|
-
onPressed(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent | KeyboardEvent): void;
|
|
27
|
-
onUnpressed(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent | KeyboardEvent): void;
|
|
27
|
+
onUpOutside(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent | DragEvent | KeyboardEvent): void;
|
|
28
|
+
onPressed(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent | DragEvent | KeyboardEvent): void;
|
|
29
|
+
onUnpressed(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent | DragEvent | KeyboardEvent): void;
|
|
28
30
|
onKeyDown(shape: EShape, runtime: EShapeRuntime, e: KeyboardEvent): void;
|
|
29
31
|
onKeyUp(shape: EShape, runtime: EShapeRuntime, e: KeyboardEvent): void;
|
|
30
32
|
onRightClick(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EShape } from "../e-shape";
|
|
2
|
+
/**
|
|
3
|
+
* Data that open actions set to {@link DataTransfer.setData} when users drag and drop shapes.
|
|
4
|
+
*/
|
|
5
|
+
export declare class EShapeActionRuntimeOpenDropped {
|
|
6
|
+
/**
|
|
7
|
+
* The ID of {@link EShape}s on which open actions are executed.
|
|
8
|
+
*/
|
|
9
|
+
shape: string;
|
|
10
|
+
/**
|
|
11
|
+
* {@link EShapeActionValueOpenType} or {@link EShapeActionOpenExtension.type} of open actions which set this data
|
|
12
|
+
*/
|
|
13
|
+
type: number;
|
|
14
|
+
/**
|
|
15
|
+
* Returned value of the `target` expression.
|
|
16
|
+
*/
|
|
17
|
+
target: unknown;
|
|
18
|
+
constructor(shape: EShape, type: number, target: unknown);
|
|
19
|
+
}
|
|
@@ -5,10 +5,14 @@ import { EShapeActionExpression } from "./e-shape-action-expression";
|
|
|
5
5
|
import { EShapeActionRuntimeConditional } from "./e-shape-action-runtime-conditional";
|
|
6
6
|
import { EShapeActionValueOpen } from "./e-shape-action-value-open";
|
|
7
7
|
import { EShapeActionValueOpenExtension } from "./e-shape-action-value-open-extension";
|
|
8
|
+
import { InteractionEvent, InteractionManager } from "pixi.js";
|
|
8
9
|
export declare class EShapeActionRuntimeOpen extends EShapeActionRuntimeConditional {
|
|
9
10
|
protected subtype: number;
|
|
10
11
|
protected readonly target: EShapeActionExpression<unknown>;
|
|
11
12
|
protected inNewWindow: boolean;
|
|
12
13
|
constructor(value: EShapeActionValueOpen | EShapeActionValueOpenExtension, subtype: DDiagramBaseControllerOpenType);
|
|
14
|
+
isDraggable(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent): boolean;
|
|
15
|
+
onDragStart(shape: EShape, runtime: EShapeRuntime, e: DragEvent, manager: InteractionManager): boolean;
|
|
16
|
+
protected toDragData(target: unknown): string | null;
|
|
13
17
|
execute(shape: EShape, runtime: EShapeRuntime, time: number): void;
|
|
14
18
|
}
|
|
@@ -46,6 +46,25 @@ export interface EShapeActionRuntime {
|
|
|
46
46
|
* @param manager the interaction manager
|
|
47
47
|
*/
|
|
48
48
|
onDblClick(shape: EShape, runtime: EShapeRuntime, e: MouseEvent | TouchEvent, manager: InteractionManager): void;
|
|
49
|
+
/**
|
|
50
|
+
* Returns true if a shape supports the dragging.
|
|
51
|
+
*
|
|
52
|
+
* @param shape a shape
|
|
53
|
+
* @param runtime a runtime
|
|
54
|
+
* @param e an event object
|
|
55
|
+
* @returns true if a shape is draggable
|
|
56
|
+
*/
|
|
57
|
+
isDraggable(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Called when users start dragging a shape.
|
|
60
|
+
*
|
|
61
|
+
* @param shape a shape
|
|
62
|
+
* @param runtime a runtime
|
|
63
|
+
* @param e an event object
|
|
64
|
+
* @param manager the interaction manager
|
|
65
|
+
* @return true if dragstart event is handled successfully
|
|
66
|
+
*/
|
|
67
|
+
onDragStart(shape: EShape, runtime: EShapeRuntime, e: DragEvent, manager: InteractionManager): boolean;
|
|
49
68
|
/**
|
|
50
69
|
* Called when a pointer or a key are about to be pressed on a shape.
|
|
51
70
|
*
|
|
@@ -101,7 +120,7 @@ export interface EShapeActionRuntime {
|
|
|
101
120
|
* @param runtime a runtime
|
|
102
121
|
* @param e an event object
|
|
103
122
|
*/
|
|
104
|
-
onUpOutside(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent | KeyboardEvent): void;
|
|
123
|
+
onUpOutside(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent | DragEvent | KeyboardEvent): void;
|
|
105
124
|
/**
|
|
106
125
|
* Called when a shape is pressed.
|
|
107
126
|
*
|
|
@@ -109,7 +128,7 @@ export interface EShapeActionRuntime {
|
|
|
109
128
|
* @param runtime a runtime
|
|
110
129
|
* @param e an event object
|
|
111
130
|
*/
|
|
112
|
-
onPressed(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent | KeyboardEvent): void;
|
|
131
|
+
onPressed(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent | DragEvent | KeyboardEvent): void;
|
|
113
132
|
/**
|
|
114
133
|
* Called when a shape is released.
|
|
115
134
|
*
|
|
@@ -117,7 +136,7 @@ export interface EShapeActionRuntime {
|
|
|
117
136
|
* @param runtime a runtime
|
|
118
137
|
* @param e an event object
|
|
119
138
|
*/
|
|
120
|
-
onUnpressed(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent | KeyboardEvent): void;
|
|
139
|
+
onUnpressed(shape: EShape, runtime: EShapeRuntime, e: InteractionEvent | DragEvent | KeyboardEvent): void;
|
|
121
140
|
/**
|
|
122
141
|
* Called when a key is pressed on a shape.
|
|
123
142
|
*
|
|
@@ -6,6 +6,13 @@ import { EShapeActionValueOnInputAction } from "./e-shape-action-value-on-input-
|
|
|
6
6
|
import { EShapeActionValueOpenType } from "./e-shape-action-value-open-type";
|
|
7
7
|
import { EShapeActionValueSubtyped } from "./e-shape-action-value-subtyped";
|
|
8
8
|
import { EShapeActionValueType } from "./e-shape-action-value-type";
|
|
9
|
+
export interface EThemeShapeActionValueOpen {
|
|
10
|
+
getDragDataFormat(): string;
|
|
11
|
+
getDragEffectAllowed(): DataTransfer["effectAllowed"];
|
|
12
|
+
getDragImage(): HTMLImageElement | HTMLCanvasElement | null;
|
|
13
|
+
getDragImageOffsetX(): number;
|
|
14
|
+
getDragImageOffsetY(): number;
|
|
15
|
+
}
|
|
9
16
|
export type EShapeActionValueOpenSerializedLegacy1 = [
|
|
10
17
|
typeof EShapeActionValueType.OPEN,
|
|
11
18
|
number,
|
|
@@ -55,6 +55,7 @@ export * from "./e-shape-action-runtime-open-dialog-real";
|
|
|
55
55
|
export * from "./e-shape-action-runtime-open-dialog-text";
|
|
56
56
|
export * from "./e-shape-action-runtime-open-dialog-time";
|
|
57
57
|
export * from "./e-shape-action-runtime-open-dialog";
|
|
58
|
+
export * from "./e-shape-action-runtime-open-dropped";
|
|
58
59
|
export * from "./e-shape-action-runtime-open";
|
|
59
60
|
export * from "./e-shape-action-runtime-show-hide-layer";
|
|
60
61
|
export * from "./e-shape-action-runtime-show-hide-shape";
|
|
@@ -30,11 +30,13 @@ export declare class EShapeRuntimeImpl implements EShapeRuntime {
|
|
|
30
30
|
onResize(shape: EShape): void;
|
|
31
31
|
onClick(shape: EShape, e: InteractionEvent | KeyboardEvent): void;
|
|
32
32
|
onDblClick(shape: EShape, e: MouseEvent | TouchEvent, interactionManager: InteractionManager): boolean;
|
|
33
|
+
isDraggable(shape: EShape, e: InteractionEvent): boolean;
|
|
34
|
+
onDragStart(shape: EShape, e: DragEvent, interactionManager: InteractionManager): boolean;
|
|
33
35
|
onOver(shape: EShape, e: InteractionEvent): void;
|
|
34
36
|
onOut(shape: EShape, e: InteractionEvent): void;
|
|
35
37
|
onDown(shape: EShape, e: InteractionEvent | KeyboardEvent): void;
|
|
36
38
|
onUp(shape: EShape, e: InteractionEvent | KeyboardEvent): void;
|
|
37
|
-
onUpOutside(shape: EShape, e: InteractionEvent): void;
|
|
39
|
+
onUpOutside(shape: EShape, e: InteractionEvent | DragEvent): void;
|
|
38
40
|
onMove(shape: EShape, e: InteractionEvent): void;
|
|
39
41
|
onKeyDown(shape: EShape, e: KeyboardEvent): boolean;
|
|
40
42
|
onKeyUp(shape: EShape, e: KeyboardEvent): boolean;
|
|
@@ -28,11 +28,13 @@ export interface EShapeRuntime {
|
|
|
28
28
|
onResize(shape: EShape): void;
|
|
29
29
|
onClick(shape: EShape, e: InteractionEvent | KeyboardEvent): void;
|
|
30
30
|
onDblClick(shape: EShape, e: MouseEvent | TouchEvent, interactionManager: InteractionManager): boolean;
|
|
31
|
+
isDraggable(shape: EShape, e: InteractionEvent): boolean;
|
|
32
|
+
onDragStart(shape: EShape, e: DragEvent, interactionManager: InteractionManager): boolean;
|
|
31
33
|
onOver(shape: EShape, e: InteractionEvent): void;
|
|
32
34
|
onOut(shape: EShape, e: InteractionEvent): void;
|
|
33
35
|
onDown(shape: EShape, e: InteractionEvent | KeyboardEvent): void;
|
|
34
36
|
onUp(shape: EShape, e: InteractionEvent | KeyboardEvent): void;
|
|
35
|
-
onUpOutside(shape: EShape, e: InteractionEvent): void;
|
|
37
|
+
onUpOutside(shape: EShape, e: InteractionEvent | DragEvent): void;
|
|
36
38
|
onMove(shape: EShape, e: InteractionEvent): void;
|
|
37
39
|
onKeyDown(shape: EShape, e: KeyboardEvent): boolean;
|
|
38
40
|
onKeyUp(shape: EShape, e: KeyboardEvent): boolean;
|
|
@@ -13,6 +13,11 @@ export declare class EShapeStateSetImplObservable extends DBaseStateSetImplObser
|
|
|
13
13
|
get inDblClicked(): boolean;
|
|
14
14
|
get onDblClicked(): boolean;
|
|
15
15
|
get underDblClicked(): boolean;
|
|
16
|
+
get isDragged(): boolean;
|
|
17
|
+
set isDragged(isDragged: boolean);
|
|
18
|
+
get inDragged(): boolean;
|
|
19
|
+
get onDragged(): boolean;
|
|
20
|
+
get underDragged(): boolean;
|
|
16
21
|
get isDown(): boolean;
|
|
17
22
|
set isDown(isDown: boolean);
|
|
18
23
|
get inDown(): boolean;
|
|
@@ -8,6 +8,10 @@ export interface EShapeStateSet extends DBaseStateSet {
|
|
|
8
8
|
readonly inDblClicked: boolean;
|
|
9
9
|
readonly onDblClicked: boolean;
|
|
10
10
|
readonly underDblClicked: boolean;
|
|
11
|
+
isDragged: boolean;
|
|
12
|
+
readonly inDragged: boolean;
|
|
13
|
+
readonly onDragged: boolean;
|
|
14
|
+
readonly underDragged: boolean;
|
|
11
15
|
isDown: boolean;
|
|
12
16
|
readonly inDown: boolean;
|
|
13
17
|
readonly onDown: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const newShapeDragImage: (color: string) => HTMLCanvasElement;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EThemeShapeActionValueOpen } from "../../shape/action/e-shape-action-value-open";
|
|
2
|
+
export declare class EThemeDarkShapeActionValueOpen implements EThemeShapeActionValueOpen {
|
|
3
|
+
protected _dragImage?: HTMLImageElement | HTMLCanvasElement | null;
|
|
4
|
+
getDragDataFormat(): string;
|
|
5
|
+
getDragEffectAllowed(): DataTransfer["effectAllowed"];
|
|
6
|
+
getDragImage(): HTMLImageElement | HTMLCanvasElement | null;
|
|
7
|
+
getDragImageOffsetX(): number;
|
|
8
|
+
getDragImageOffsetY(): number;
|
|
9
|
+
}
|
|
@@ -230,6 +230,7 @@ export * from "./d-theme-dark-tree-items";
|
|
|
230
230
|
export * from "./d-theme-dark-tree";
|
|
231
231
|
export * from "./d-theme-dark-view";
|
|
232
232
|
export * from "./d-theme-dark";
|
|
233
|
+
export * from "./e-theme-dark-shape-action-value-open";
|
|
233
234
|
export * from "./e-theme-dark-shape-action-value";
|
|
234
235
|
export * from "./e-theme-dark-shape-points-formatter";
|
|
235
236
|
export * from "./e-theme-dark-shape";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { EThemeShapeActionValueOpen } from "../../shape/action/e-shape-action-value-open";
|
|
2
|
+
export declare class EThemeWhiteShapeActionValueOpen implements EThemeShapeActionValueOpen {
|
|
3
|
+
protected _dragImage?: HTMLImageElement | HTMLCanvasElement | null;
|
|
4
|
+
getDragDataFormat(): string;
|
|
5
|
+
getDragEffectAllowed(): DataTransfer["effectAllowed"];
|
|
6
|
+
getDragImage(): HTMLImageElement | HTMLCanvasElement | null;
|
|
7
|
+
getDragImageOffsetX(): number;
|
|
8
|
+
getDragImageOffsetY(): number;
|
|
9
|
+
}
|
|
@@ -230,6 +230,7 @@ export * from "./d-theme-white-tree-items";
|
|
|
230
230
|
export * from "./d-theme-white-tree";
|
|
231
231
|
export * from "./d-theme-white-view";
|
|
232
232
|
export * from "./d-theme-white";
|
|
233
|
+
export * from "./e-theme-white-shape-action-value-open";
|
|
233
234
|
export * from "./e-theme-white-shape-action-value";
|
|
234
235
|
export * from "./e-theme-white-shape-points-formatter";
|
|
235
236
|
export * from "./e-theme-white-shape";
|
|
@@ -5,7 +5,9 @@ export declare const UtilFileAs: {
|
|
|
5
5
|
readonly TEXT: 0;
|
|
6
6
|
readonly DATA_URL: 1;
|
|
7
7
|
readonly BINARY_STRING: 2;
|
|
8
|
+
/** @deprecated in favor of {@link ARRAY_BUFFER} */
|
|
8
9
|
readonly ARRAY_BUTTER: 3;
|
|
10
|
+
readonly ARRAY_BUFFER: 3;
|
|
9
11
|
readonly FILE: 4;
|
|
10
12
|
};
|
|
11
13
|
export type UtilFileAs = (typeof UtilFileAs)[keyof typeof UtilFileAs];
|
|
@@ -54,6 +56,6 @@ export declare class UtilFileOpener {
|
|
|
54
56
|
protected getOrCreateInput(): HTMLInputElement | null;
|
|
55
57
|
protected onInputChange(input: HTMLInputElement): void;
|
|
56
58
|
protected onOpen(result: string | ArrayBuffer | File, file: File): void;
|
|
57
|
-
protected
|
|
59
|
+
protected onAbort(e: ProgressEvent): void;
|
|
58
60
|
protected onCancel(): void;
|
|
59
61
|
}
|
|
@@ -12,6 +12,9 @@ import { UtilWheelEvent } from "./util/util-wheel-event";
|
|
|
12
12
|
var isDblClickable = function (target) {
|
|
13
13
|
return target != null && target.onDblClick != null;
|
|
14
14
|
};
|
|
15
|
+
var isDragStartable = function (target) {
|
|
16
|
+
return target != null && target.onDragStart != null;
|
|
17
|
+
};
|
|
15
18
|
var isWheelable = function (target) {
|
|
16
19
|
return target != null && target.onWheel != null;
|
|
17
20
|
};
|
|
@@ -38,10 +41,11 @@ var DApplicationLayer = /** @class */ (function (_super) {
|
|
|
38
41
|
_this.initStage();
|
|
39
42
|
_this.initView();
|
|
40
43
|
_this.initRootElement();
|
|
41
|
-
_this.
|
|
42
|
-
_this.
|
|
43
|
-
_this.
|
|
44
|
-
_this.
|
|
44
|
+
_this.initFocus();
|
|
45
|
+
_this.initResize();
|
|
46
|
+
_this.initWheel();
|
|
47
|
+
_this.initDblClick();
|
|
48
|
+
_this.initDragStart();
|
|
45
49
|
return _this;
|
|
46
50
|
}
|
|
47
51
|
DApplicationLayer.prototype.newElementContainer = function () {
|
|
@@ -111,7 +115,7 @@ var DApplicationLayer = /** @class */ (function (_super) {
|
|
|
111
115
|
rootElementStyle.padding = "0";
|
|
112
116
|
rootElementStyle.overflow = "hidden";
|
|
113
117
|
};
|
|
114
|
-
DApplicationLayer.prototype.
|
|
118
|
+
DApplicationLayer.prototype.initFocus = function () {
|
|
115
119
|
var view = this.view;
|
|
116
120
|
var stage = this.stage;
|
|
117
121
|
var focusController = this.getFocusController();
|
|
@@ -124,7 +128,7 @@ var DApplicationLayer = /** @class */ (function (_super) {
|
|
|
124
128
|
}
|
|
125
129
|
});
|
|
126
130
|
};
|
|
127
|
-
DApplicationLayer.prototype.
|
|
131
|
+
DApplicationLayer.prototype.initResize = function () {
|
|
128
132
|
var _this = this;
|
|
129
133
|
var options = this._options;
|
|
130
134
|
var isWidthFixed = options.isWidthFixed();
|
|
@@ -169,7 +173,7 @@ var DApplicationLayer = /** @class */ (function (_super) {
|
|
|
169
173
|
this.render();
|
|
170
174
|
}
|
|
171
175
|
};
|
|
172
|
-
DApplicationLayer.prototype.
|
|
176
|
+
DApplicationLayer.prototype.initWheel = function () {
|
|
173
177
|
var global = new Point();
|
|
174
178
|
var util = UtilWheelEvent.getInstance();
|
|
175
179
|
var interactionManager = this.renderer.plugins.interaction;
|
|
@@ -191,7 +195,7 @@ var DApplicationLayer = /** @class */ (function (_super) {
|
|
|
191
195
|
}
|
|
192
196
|
});
|
|
193
197
|
};
|
|
194
|
-
DApplicationLayer.prototype.
|
|
198
|
+
DApplicationLayer.prototype.initDblClick = function () {
|
|
195
199
|
var focusController = this.getFocusController();
|
|
196
200
|
var interactionManager = this.renderer.plugins.interaction;
|
|
197
201
|
UtilPointerEvent.onDblClick(this.view, function (e) {
|
|
@@ -209,6 +213,24 @@ var DApplicationLayer = /** @class */ (function (_super) {
|
|
|
209
213
|
}
|
|
210
214
|
});
|
|
211
215
|
};
|
|
216
|
+
DApplicationLayer.prototype.initDragStart = function () {
|
|
217
|
+
var focusController = this.getFocusController();
|
|
218
|
+
var interactionManager = this.renderer.plugins.interaction;
|
|
219
|
+
this.view.addEventListener("dragstart", function (e) {
|
|
220
|
+
var focused = focusController.get();
|
|
221
|
+
if (focused != null) {
|
|
222
|
+
var current = focused;
|
|
223
|
+
while (current != null) {
|
|
224
|
+
if (isDragStartable(current)) {
|
|
225
|
+
if (current.onDragStart(e, interactionManager)) {
|
|
226
|
+
break;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
current = current.parent;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
};
|
|
212
234
|
DApplicationLayer.prototype.lock = function () {
|
|
213
235
|
this._isLocked = true;
|
|
214
236
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-application-layer.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-application-layer.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,WAAW,EAAwC,KAAK,EAAE,MAAM,SAAS,CAAC;AAInF,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAwB,MAAM,yBAAyB,CAAC;AAM/E,IAAM,cAAc,GAAG,UAAC,MAAW;IAClC,OAAO,MAAM,IAAI,IAAI,IAAI,MAAM,CAAC,UAAU,IAAI,IAAI,CAAC;AACpD,CAAC,CAAC;AAMF,IAAM,WAAW,GAAG,UAAC,MAAW;IAC/B,OAAO,MAAM,IAAI,IAAI,IAAI,MAAM,CAAC,OAAO,IAAI,IAAI,CAAC;AACjD,CAAC,CAAC;AAEF;IAAuC,qCAAW;IAejD,2BAAY,WAA6B,EAAE,OAAiC;QAC3E,YAAA,MAAK,YAAC,OAAO,CAAC,y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1B,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;oBAC5B,KAAK,CAAC,MAAM,EAAE,CAAC;oBACf,OAAO;wBACN,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE,IAAI,KAAK,CAAC,QAAQ,EAAE,IAAI,KAAK,CAAC,gBAAgB,EAAE,CAAC;gBAC7E,CAAC;YACF,CAAC;YAED,2EAA2E;YAC3E,IAAI,CAAC,OAAO,EAAE,CAAC;gBACd,MAAM;YACP,CAAC;QACF,CAAC;IACF,CAAC;IAED,8CAAkB,GAAlB;QACC,OAAO,IAAI,CAAC,WAAW,CAAC,kBAAkB,EAAE,CAAC;IAC9C,CAAC;IAED,0CAAc,GAAd;QACC,OAAO,IAAI,CAAC,YAAY,CAAC;IAC1B,CAAC;IAED,+CAAmB,GAAnB;QACC,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAC/B,CAAC;IAED,iDAAqB,GAArB;QACC,IAAI,IAAI,CAAC,mBAAmB,IAAI,IAAI,EAAE,CAAC;YACtC,IAAI,CAAC,mBAAmB,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACzD,CAAC;QACD,OAAO,IAAI,CAAC,mBAAmB,CAAC;IACjC,CAAC;IACF,wBAAC;AAAD,CAAC,AAzUD,CAAuC,WAAW,GAyUjD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Application, InteractionEvent, InteractionManager, Point } from \"pixi.js\";\nimport { DApplicationLayerLike } from \"./d-application-layer-like\";\nimport { DApplicationLayerOptions } from \"./d-application-layer-options\";\nimport { DApplicationLike } from \"./d-application-like\";\nimport { DBase } from \"./d-base\";\nimport { DControllerFocus, DFocusable, DFocusableContainer } from \"./d-controller-focus\";\nimport { DControllers } from \"./d-controllers\";\nimport { DPadding } from \"./d-padding\";\nimport { DynamicFontAtlases } from \"./util/dynamic-font-atlases\";\nimport { UtilPointerEvent } from \"./util/util-pointer-event\";\nimport { UtilWheelEvent, UtilWheelEventDeltas } from \"./util/util-wheel-event\";\n\ninterface DblClickable {\n\tonDblClick(e: MouseEvent | TouchEvent, interactionManager: InteractionManager): boolean;\n}\n\nconst isDblClickable = (target: any): target is DblClickable => {\n\treturn target != null && target.onDblClick != null;\n};\n\ninterface Wheelable {\n\tonWheel(e: WheelEvent, deltas: UtilWheelEventDeltas, global: Point): boolean;\n}\n\nconst isWheelable = (target: any): target is Wheelable => {\n\treturn target != null && target.onWheel != null;\n};\n\nexport class DApplicationLayer extends Application implements DApplicationLayerLike {\n\tprotected _options: DApplicationLayerOptions;\n\tprotected _renderId: number | null = null;\n\tprotected _renderBound: () => void;\n\tprotected _isLocked: boolean;\n\tprotected _isOverlay: boolean;\n\tprotected _reflowLimit: number;\n\tprotected _rootElement: HTMLElement;\n\tprotected _elementContainer: HTMLElement;\n\tprotected _padding: DPadding;\n\tprotected _dynamicFontAtlases: DynamicFontAtlases | null = null;\n\tprotected _isVisible: boolean;\n\n\treadonly application: DApplicationLike;\n\n\tconstructor(application: DApplicationLike, options: DApplicationLayerOptions) {\n\t\tsuper(options.getPixiApplicationOptions());\n\n\t\tthis._options = options;\n\t\tthis._isLocked = false;\n\t\tthis._isVisible = true;\n\t\tthis._isOverlay = options.isOverlay();\n\t\tthis._padding = options.getPadding();\n\t\tthis._rootElement = options.getRootElement();\n\t\tthis._reflowLimit = 5;\n\t\tthis._elementContainer = this.newElementContainer();\n\n\t\tthis.application = application;\n\n\t\tthis._renderBound = (): void => {\n\t\t\tif (this._renderId != null) {\n\t\t\t\tthis.render();\n\t\t\t}\n\t\t};\n\n\t\tthis.initStage();\n\t\tthis.initView();\n\t\tthis.initRootElement();\n\t\tthis.initFocusHandling();\n\t\tthis.initResizeHandling();\n\t\tthis.initWheelHandling();\n\t\tthis.initDoubleClickHandling();\n\t}\n\n\tprotected newElementContainer(): HTMLElement {\n\t\tconst result = document.createElement(\"div\");\n\t\tresult.setAttribute(\n\t\t\t\"style\",\n\t\t\t\"position: absolute; top: 0; left: 0; width: 0; height: 0;\" +\n\t\t\t\t\"margin: 0; padding: 0; outline: none;\"\n\t\t);\n\t\treturn result;\n\t}\n\n\tprotected initStage(): void {\n\t\tconst stage = this.stage;\n\t\t(stage as any).layer = this;\n\t\t(stage as any).application = this.application;\n\t\tstage.interactive = true;\n\t}\n\n\tprotected initView(): void {\n\t\tconst view = this.view;\n\t\tconst style = view.style;\n\t\tstyle.position = \"absolute\";\n\t\tstyle.top = \"0\";\n\t\tstyle.left = \"0\";\n\t\tstyle.width = \"100%\";\n\t\tstyle.height = \"100%\";\n\t\tstyle.display = \"block\";\n\t\tstyle.outline = \"none\";\n\t\t(style as any).webkitTapHighlightColor = \"rgba(255,255,255,0)\";\n\t\tstyle.webkitUserSelect = \"none\";\n\t\tstyle.setProperty(\"-khtml-user-select\", \"none\");\n\t\tstyle.setProperty(\"-moz-user-select\", \"none\");\n\t\tstyle.setProperty(\"-ms-user-select\", \"none\");\n\t\tstyle.userSelect = \"none\";\n\t}\n\n\tprotected initRootElement(): void {\n\t\tconst view = this.view;\n\t\tconst isOverlay = this._isOverlay;\n\t\tconst rootElement = this._rootElement;\n\t\tconst elementContainer = this._elementContainer;\n\n\t\t// Insert elements\n\t\tconst insertionPosition = isOverlay ? 2 : 0;\n\t\tconst children = rootElement.children;\n\t\tif (insertionPosition < children.length) {\n\t\t\tconst child = children[insertionPosition];\n\t\t\trootElement.insertBefore(view, child);\n\t\t\trootElement.insertBefore(elementContainer, child);\n\t\t} else {\n\t\t\trootElement.appendChild(view);\n\t\t\trootElement.appendChild(elementContainer);\n\t\t}\n\n\t\tif (isOverlay) {\n\t\t\tconst stage = this.stage;\n\t\t\tconst oldOnChildrenChange = (stage as any).onChildrenChange;\n\t\t\t(stage as any).onChildrenChange = (): void => {\n\t\t\t\tthis.onStageDirty();\n\t\t\t\toldOnChildrenChange.call(stage);\n\t\t\t};\n\t\t}\n\n\t\t// Init styles\n\t\tconst rootElementStyle = rootElement.style;\n\t\tif (rootElement !== document.body) {\n\t\t\tconst rootElementStylePosition = window.getComputedStyle(rootElement).position;\n\t\t\tif (rootElementStylePosition === \"static\") {\n\t\t\t\trootElementStyle.position = \"relative\";\n\t\t\t}\n\t\t}\n\t\trootElementStyle.margin = \"0\";\n\t\trootElementStyle.padding = \"0\";\n\t\trootElementStyle.overflow = \"hidden\";\n\t}\n\n\tprotected initFocusHandling(): void {\n\t\tconst view = this.view;\n\t\tconst stage = this.stage;\n\t\tconst focusController = this.getFocusController();\n\n\t\tview.setAttribute(\"tabindex\", \"0\");\n\n\t\tDControllers.getKeyboardController().init(view, stage, focusController);\n\n\t\tconst interactionManager = this.renderer.plugins.interaction;\n\t\tinteractionManager.on(UtilPointerEvent.down, (e: InteractionEvent): void => {\n\t\t\tif (e.target == null || e.target === stage) {\n\t\t\t\tfocusController.clear();\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected initResizeHandling(): void {\n\t\tconst options = this._options;\n\t\tconst isWidthFixed = options.isWidthFixed();\n\t\tconst isHeightFixed = options.isHeightFixed();\n\t\tif (!isWidthFixed || !isHeightFixed) {\n\t\t\tconst onResizeBound = (): void => {\n\t\t\t\tthis.onResize();\n\t\t\t};\n\t\t\tif (window.ResizeObserver != null) {\n\t\t\t\tnew ResizeObserver(onResizeBound).observe(this._rootElement);\n\t\t\t} else {\n\t\t\t\twindow.addEventListener(\"resize\", onResizeBound);\n\t\t\t\twindow.addEventListener(\"orientationchange\", onResizeBound);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected onResize(): void {\n\t\tconst options = this._options;\n\t\tconst bboxes = this._rootElement.getClientRects();\n\t\tif (bboxes.length <= 0) {\n\t\t\t// The root element size is (0, 0) and not visible.\n\t\t\t// In this case, skip the resizing.\n\t\t\treturn;\n\t\t}\n\t\tconst bbox = bboxes[0];\n\t\tconst newWidth = options.isWidthFixed() ? options.getWidth() : bbox.width;\n\t\tconst newHeight = options.isHeightFixed() ? options.getHeight() : bbox.height;\n\t\tthis.renderer.resize(newWidth, newHeight);\n\n\t\tconst wasLocked = this._isLocked;\n\t\tthis._isLocked = true;\n\n\t\tconst padding = this._padding;\n\t\tconst children = this.stage.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tconst child = children[i];\n\t\t\tif (child instanceof DBase) {\n\t\t\t\tchild.onParentResize(newWidth, newHeight, padding);\n\t\t\t}\n\t\t}\n\n\t\tthis._isLocked = wasLocked;\n\t\tif (!this._isLocked && this._renderId == null) {\n\t\t\tthis.render();\n\t\t}\n\t}\n\n\tprotected initWheelHandling(): void {\n\t\tconst global = new Point();\n\t\tconst util = UtilWheelEvent.getInstance();\n\t\tconst interactionManager = this.renderer.plugins.interaction;\n\t\tutil.on(this.view, (e: WheelEvent | Event): void => {\n\t\t\tconst wheelEvent = e as WheelEvent;\n\t\t\tUtilPointerEvent.toGlobal(wheelEvent, interactionManager, global);\n\t\t\tlet current = interactionManager.hitTest(global);\n\t\t\tconst deltas = util.normalize(e);\n\t\t\tif (deltas != null) {\n\t\t\t\twhile (current != null) {\n\t\t\t\t\tif (isWheelable(current)) {\n\t\t\t\t\t\tif (current.onWheel(wheelEvent, deltas, global)) {\n\t\t\t\t\t\t\twheelEvent.preventDefault();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcurrent = current.parent;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected initDoubleClickHandling(): void {\n\t\tconst focusController = this.getFocusController();\n\t\tconst interactionManager = this.renderer.plugins.interaction;\n\t\tUtilPointerEvent.onDblClick(this.view, (e: MouseEvent | TouchEvent): void => {\n\t\t\tconst focused = focusController.get();\n\t\t\tif (focused != null) {\n\t\t\t\tlet current: DFocusable | DFocusableContainer | null = focused;\n\t\t\t\twhile (current != null) {\n\t\t\t\t\tif (isDblClickable(current)) {\n\t\t\t\t\t\tif (current.onDblClick(e, interactionManager)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcurrent = current.parent;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tlock(): void {\n\t\tthis._isLocked = true;\n\t}\n\n\tunlock(): void {\n\t\tthis._isLocked = false;\n\t}\n\n\tupdate(): void {\n\t\tif (!this._isLocked && this._renderId == null) {\n\t\t\tthis._renderId = requestAnimationFrame(this._renderBound);\n\t\t}\n\t}\n\n\tprotected onStageDirty(): void {\n\t\t// Update the visibility if this is a overlay layer.\n\t\tif (this._isOverlay) {\n\t\t\tif (0 < this.stage.children.length) {\n\t\t\t\t// There are more than one children,\n\t\t\t\t// therefore must be visible.\n\t\t\t\tif (!this._isVisible) {\n\t\t\t\t\tthis._isVisible = true;\n\t\t\t\t\tthis.view.style.display = \"block\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// There is no child,\n\t\t\t\t// therefore must not be visible.\n\t\t\t\tif (this._isVisible) {\n\t\t\t\t\tthis._isVisible = false;\n\t\t\t\t\tthis.view.style.display = \"none\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\trender(): void {\n\t\tthis.reflow();\n\n\t\t// Please note why the following line is here.\n\t\t//\n\t\t// Before this line, the update method does not enque a rendering task\n\t\t// because `this._renderId` is not null. As a result, this prevents\n\t\t// an unintentional rendering loop caused by the refit or the reflow.\n\t\t//\n\t\t// After this line, the update method enques a rendering task.\n\t\t// Namely, in the DisplayObject#render(Renderer) method, allowed to enque\n\t\t// a rendering task. For instance, please refer to the DDiagramShape#update().\n\t\tthis._renderId = null;\n\n\t\t// Render\n\t\tsuper.render();\n\t}\n\n\tget width(): number {\n\t\treturn this.screen.width;\n\t}\n\n\tget height(): number {\n\t\treturn this.screen.height;\n\t}\n\n\tget padding(): DPadding {\n\t\treturn this._padding;\n\t}\n\n\treflow(): void {\n\t\tconst children = this.stage.children;\n\t\tfor (let ilimit = 0, limit = this._reflowLimit; ilimit < limit; ++ilimit) {\n\t\t\tlet isDirty = false;\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 instanceof DBase) {\n\t\t\t\t\tchild.reflow();\n\t\t\t\t\tisDirty =\n\t\t\t\t\t\tisDirty || child.isDirty() || child.hasDirty() || child.isHierarchyDirty();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If DBases are changed during the `reflow` process, need to reflow again.\n\t\t\tif (!isDirty) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tgetFocusController(): DControllerFocus {\n\t\treturn this.application.getFocusController();\n\t}\n\n\tgetRootElement(): HTMLElement {\n\t\treturn this._rootElement;\n\t}\n\n\tgetElementContainer(): HTMLElement {\n\t\treturn this._elementContainer;\n\t}\n\n\tgetDynamicFontAtlases(): DynamicFontAtlases {\n\t\tif (this._dynamicFontAtlases == null) {\n\t\t\tthis._dynamicFontAtlases = new DynamicFontAtlases(this);\n\t\t}\n\t\treturn this._dynamicFontAtlases;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"d-application-layer.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-application-layer.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,WAAW,EAAwC,KAAK,EAAE,MAAM,SAAS,CAAC;AAInF,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAwB,MAAM,yBAAyB,CAAC;AAM/E,IAAM,cAAc,GAAG,UAAC,MAAW;IAClC,OAAO,MAAM,IAAI,IAAI,IAAI,MAAM,CAAC,UAAU,IAAI,IAAI,CAAC;AACpD,CAAC,CAAC;AAMF,IAAM,eAAe,GAAG,UAAC,MAAW;IAC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;YAC3E,IAAI,CAAC,OAAO,EAAE,CAAC;gBACd,MAAM;YACP,CAAC;QACF,CAAC;IACF,CAAC;IAED,8CAAkB,GAAlB;QACC,OAAO,IAAI,CAAC,WAAW,CAAC,kBAAkB,EAAE,CAAC;IAC9C,CAAC;IAED,0CAAc,GAAd;QACC,OAAO,IAAI,CAAC,YAAY,CAAC;IAC1B,CAAC;IAED,+CAAmB,GAAnB;QACC,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAC/B,CAAC;IAED,iDAAqB,GAArB;QACC,IAAI,IAAI,CAAC,mBAAmB,IAAI,IAAI,EAAE,CAAC;YACtC,IAAI,CAAC,mBAAmB,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACzD,CAAC;QACD,OAAO,IAAI,CAAC,mBAAmB,CAAC;IACjC,CAAC;IACF,wBAAC;AAAD,CAAC,AA7VD,CAAuC,WAAW,GA6VjD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Application, InteractionEvent, InteractionManager, Point } from \"pixi.js\";\nimport { DApplicationLayerLike } from \"./d-application-layer-like\";\nimport { DApplicationLayerOptions } from \"./d-application-layer-options\";\nimport { DApplicationLike } from \"./d-application-like\";\nimport { DBase } from \"./d-base\";\nimport { DControllerFocus, DFocusable, DFocusableContainer } from \"./d-controller-focus\";\nimport { DControllers } from \"./d-controllers\";\nimport { DPadding } from \"./d-padding\";\nimport { DynamicFontAtlases } from \"./util/dynamic-font-atlases\";\nimport { UtilPointerEvent } from \"./util/util-pointer-event\";\nimport { UtilWheelEvent, UtilWheelEventDeltas } from \"./util/util-wheel-event\";\n\ninterface DblClickable {\n\tonDblClick(e: MouseEvent | TouchEvent, interactionManager: InteractionManager): boolean;\n}\n\nconst isDblClickable = (target: any): target is DblClickable => {\n\treturn target != null && target.onDblClick != null;\n};\n\ninterface DragStartable {\n\tonDragStart(e: DragEvent, interactionManager: InteractionManager): boolean;\n}\n\nconst isDragStartable = (target: any): target is DragStartable => {\n\treturn target != null && target.onDragStart != null;\n};\n\ninterface Wheelable {\n\tonWheel(e: WheelEvent, deltas: UtilWheelEventDeltas, global: Point): boolean;\n}\n\nconst isWheelable = (target: any): target is Wheelable => {\n\treturn target != null && target.onWheel != null;\n};\n\nexport class DApplicationLayer extends Application implements DApplicationLayerLike {\n\tprotected _options: DApplicationLayerOptions;\n\tprotected _renderId: number | null = null;\n\tprotected _renderBound: () => void;\n\tprotected _isLocked: boolean;\n\tprotected _isOverlay: boolean;\n\tprotected _reflowLimit: number;\n\tprotected _rootElement: HTMLElement;\n\tprotected _elementContainer: HTMLElement;\n\tprotected _padding: DPadding;\n\tprotected _dynamicFontAtlases: DynamicFontAtlases | null = null;\n\tprotected _isVisible: boolean;\n\n\treadonly application: DApplicationLike;\n\n\tconstructor(application: DApplicationLike, options: DApplicationLayerOptions) {\n\t\tsuper(options.getPixiApplicationOptions());\n\n\t\tthis._options = options;\n\t\tthis._isLocked = false;\n\t\tthis._isVisible = true;\n\t\tthis._isOverlay = options.isOverlay();\n\t\tthis._padding = options.getPadding();\n\t\tthis._rootElement = options.getRootElement();\n\t\tthis._reflowLimit = 5;\n\t\tthis._elementContainer = this.newElementContainer();\n\n\t\tthis.application = application;\n\n\t\tthis._renderBound = (): void => {\n\t\t\tif (this._renderId != null) {\n\t\t\t\tthis.render();\n\t\t\t}\n\t\t};\n\n\t\tthis.initStage();\n\t\tthis.initView();\n\t\tthis.initRootElement();\n\t\tthis.initFocus();\n\t\tthis.initResize();\n\t\tthis.initWheel();\n\t\tthis.initDblClick();\n\t\tthis.initDragStart();\n\t}\n\n\tprotected newElementContainer(): HTMLElement {\n\t\tconst result = document.createElement(\"div\");\n\t\tresult.setAttribute(\n\t\t\t\"style\",\n\t\t\t\"position: absolute; top: 0; left: 0; width: 0; height: 0;\" +\n\t\t\t\t\"margin: 0; padding: 0; outline: none;\"\n\t\t);\n\t\treturn result;\n\t}\n\n\tprotected initStage(): void {\n\t\tconst stage = this.stage;\n\t\t(stage as any).layer = this;\n\t\t(stage as any).application = this.application;\n\t\tstage.interactive = true;\n\t}\n\n\tprotected initView(): void {\n\t\tconst view = this.view;\n\t\tconst style = view.style;\n\t\tstyle.position = \"absolute\";\n\t\tstyle.top = \"0\";\n\t\tstyle.left = \"0\";\n\t\tstyle.width = \"100%\";\n\t\tstyle.height = \"100%\";\n\t\tstyle.display = \"block\";\n\t\tstyle.outline = \"none\";\n\t\t(style as any).webkitTapHighlightColor = \"rgba(255,255,255,0)\";\n\t\tstyle.webkitUserSelect = \"none\";\n\t\tstyle.setProperty(\"-khtml-user-select\", \"none\");\n\t\tstyle.setProperty(\"-moz-user-select\", \"none\");\n\t\tstyle.setProperty(\"-ms-user-select\", \"none\");\n\t\tstyle.userSelect = \"none\";\n\t}\n\n\tprotected initRootElement(): void {\n\t\tconst view = this.view;\n\t\tconst isOverlay = this._isOverlay;\n\t\tconst rootElement = this._rootElement;\n\t\tconst elementContainer = this._elementContainer;\n\n\t\t// Insert elements\n\t\tconst insertionPosition = isOverlay ? 2 : 0;\n\t\tconst children = rootElement.children;\n\t\tif (insertionPosition < children.length) {\n\t\t\tconst child = children[insertionPosition];\n\t\t\trootElement.insertBefore(view, child);\n\t\t\trootElement.insertBefore(elementContainer, child);\n\t\t} else {\n\t\t\trootElement.appendChild(view);\n\t\t\trootElement.appendChild(elementContainer);\n\t\t}\n\n\t\tif (isOverlay) {\n\t\t\tconst stage = this.stage;\n\t\t\tconst oldOnChildrenChange = (stage as any).onChildrenChange;\n\t\t\t(stage as any).onChildrenChange = (): void => {\n\t\t\t\tthis.onStageDirty();\n\t\t\t\toldOnChildrenChange.call(stage);\n\t\t\t};\n\t\t}\n\n\t\t// Init styles\n\t\tconst rootElementStyle = rootElement.style;\n\t\tif (rootElement !== document.body) {\n\t\t\tconst rootElementStylePosition = window.getComputedStyle(rootElement).position;\n\t\t\tif (rootElementStylePosition === \"static\") {\n\t\t\t\trootElementStyle.position = \"relative\";\n\t\t\t}\n\t\t}\n\t\trootElementStyle.margin = \"0\";\n\t\trootElementStyle.padding = \"0\";\n\t\trootElementStyle.overflow = \"hidden\";\n\t}\n\n\tprotected initFocus(): void {\n\t\tconst view = this.view;\n\t\tconst stage = this.stage;\n\t\tconst focusController = this.getFocusController();\n\n\t\tview.setAttribute(\"tabindex\", \"0\");\n\n\t\tDControllers.getKeyboardController().init(view, stage, focusController);\n\n\t\tconst interactionManager = this.renderer.plugins.interaction;\n\t\tinteractionManager.on(UtilPointerEvent.down, (e: InteractionEvent): void => {\n\t\t\tif (e.target == null || e.target === stage) {\n\t\t\t\tfocusController.clear();\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected initResize(): void {\n\t\tconst options = this._options;\n\t\tconst isWidthFixed = options.isWidthFixed();\n\t\tconst isHeightFixed = options.isHeightFixed();\n\t\tif (!isWidthFixed || !isHeightFixed) {\n\t\t\tconst onResizeBound = (): void => {\n\t\t\t\tthis.onResize();\n\t\t\t};\n\t\t\tif (window.ResizeObserver != null) {\n\t\t\t\tnew ResizeObserver(onResizeBound).observe(this._rootElement);\n\t\t\t} else {\n\t\t\t\twindow.addEventListener(\"resize\", onResizeBound);\n\t\t\t\twindow.addEventListener(\"orientationchange\", onResizeBound);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected onResize(): void {\n\t\tconst options = this._options;\n\t\tconst bboxes = this._rootElement.getClientRects();\n\t\tif (bboxes.length <= 0) {\n\t\t\t// The root element size is (0, 0) and not visible.\n\t\t\t// In this case, skip the resizing.\n\t\t\treturn;\n\t\t}\n\t\tconst bbox = bboxes[0];\n\t\tconst newWidth = options.isWidthFixed() ? options.getWidth() : bbox.width;\n\t\tconst newHeight = options.isHeightFixed() ? options.getHeight() : bbox.height;\n\t\tthis.renderer.resize(newWidth, newHeight);\n\n\t\tconst wasLocked = this._isLocked;\n\t\tthis._isLocked = true;\n\n\t\tconst padding = this._padding;\n\t\tconst children = this.stage.children;\n\t\tfor (let i = 0, imax = children.length; i < imax; ++i) {\n\t\t\tconst child = children[i];\n\t\t\tif (child instanceof DBase) {\n\t\t\t\tchild.onParentResize(newWidth, newHeight, padding);\n\t\t\t}\n\t\t}\n\n\t\tthis._isLocked = wasLocked;\n\t\tif (!this._isLocked && this._renderId == null) {\n\t\t\tthis.render();\n\t\t}\n\t}\n\n\tprotected initWheel(): void {\n\t\tconst global = new Point();\n\t\tconst util = UtilWheelEvent.getInstance();\n\t\tconst interactionManager = this.renderer.plugins.interaction;\n\t\tutil.on(this.view, (e: WheelEvent | Event): void => {\n\t\t\tconst wheelEvent = e as WheelEvent;\n\t\t\tUtilPointerEvent.toGlobal(wheelEvent, interactionManager, global);\n\t\t\tlet current = interactionManager.hitTest(global);\n\t\t\tconst deltas = util.normalize(e);\n\t\t\tif (deltas != null) {\n\t\t\t\twhile (current != null) {\n\t\t\t\t\tif (isWheelable(current)) {\n\t\t\t\t\t\tif (current.onWheel(wheelEvent, deltas, global)) {\n\t\t\t\t\t\t\twheelEvent.preventDefault();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcurrent = current.parent;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected initDblClick(): void {\n\t\tconst focusController = this.getFocusController();\n\t\tconst interactionManager = this.renderer.plugins.interaction;\n\t\tUtilPointerEvent.onDblClick(this.view, (e: MouseEvent | TouchEvent): void => {\n\t\t\tconst focused = focusController.get();\n\t\t\tif (focused != null) {\n\t\t\t\tlet current: DFocusable | DFocusableContainer | null = focused;\n\t\t\t\twhile (current != null) {\n\t\t\t\t\tif (isDblClickable(current)) {\n\t\t\t\t\t\tif (current.onDblClick(e, interactionManager)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcurrent = current.parent;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tprotected initDragStart(): void {\n\t\tconst focusController = this.getFocusController();\n\t\tconst interactionManager = this.renderer.plugins.interaction;\n\t\tthis.view.addEventListener(\"dragstart\", (e: DragEvent) => {\n\t\t\tconst focused = focusController.get();\n\t\t\tif (focused != null) {\n\t\t\t\tlet current: DFocusable | DFocusableContainer | null = focused;\n\t\t\t\twhile (current != null) {\n\t\t\t\t\tif (isDragStartable(current)) {\n\t\t\t\t\t\tif (current.onDragStart(e, interactionManager)) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcurrent = current.parent;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\tlock(): void {\n\t\tthis._isLocked = true;\n\t}\n\n\tunlock(): void {\n\t\tthis._isLocked = false;\n\t}\n\n\tupdate(): void {\n\t\tif (!this._isLocked && this._renderId == null) {\n\t\t\tthis._renderId = requestAnimationFrame(this._renderBound);\n\t\t}\n\t}\n\n\tprotected onStageDirty(): void {\n\t\t// Update the visibility if this is a overlay layer.\n\t\tif (this._isOverlay) {\n\t\t\tif (0 < this.stage.children.length) {\n\t\t\t\t// There are more than one children,\n\t\t\t\t// therefore must be visible.\n\t\t\t\tif (!this._isVisible) {\n\t\t\t\t\tthis._isVisible = true;\n\t\t\t\t\tthis.view.style.display = \"block\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// There is no child,\n\t\t\t\t// therefore must not be visible.\n\t\t\t\tif (this._isVisible) {\n\t\t\t\t\tthis._isVisible = false;\n\t\t\t\t\tthis.view.style.display = \"none\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\trender(): void {\n\t\tthis.reflow();\n\n\t\t// Please note why the following line is here.\n\t\t//\n\t\t// Before this line, the update method does not enque a rendering task\n\t\t// because `this._renderId` is not null. As a result, this prevents\n\t\t// an unintentional rendering loop caused by the refit or the reflow.\n\t\t//\n\t\t// After this line, the update method enques a rendering task.\n\t\t// Namely, in the DisplayObject#render(Renderer) method, allowed to enque\n\t\t// a rendering task. For instance, please refer to the DDiagramShape#update().\n\t\tthis._renderId = null;\n\n\t\t// Render\n\t\tsuper.render();\n\t}\n\n\tget width(): number {\n\t\treturn this.screen.width;\n\t}\n\n\tget height(): number {\n\t\treturn this.screen.height;\n\t}\n\n\tget padding(): DPadding {\n\t\treturn this._padding;\n\t}\n\n\treflow(): void {\n\t\tconst children = this.stage.children;\n\t\tfor (let ilimit = 0, limit = this._reflowLimit; ilimit < limit; ++ilimit) {\n\t\t\tlet isDirty = false;\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 instanceof DBase) {\n\t\t\t\t\tchild.reflow();\n\t\t\t\t\tisDirty =\n\t\t\t\t\t\tisDirty || child.isDirty() || child.hasDirty() || child.isHierarchyDirty();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If DBases are changed during the `reflow` process, need to reflow again.\n\t\t\tif (!isDirty) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tgetFocusController(): DControllerFocus {\n\t\treturn this.application.getFocusController();\n\t}\n\n\tgetRootElement(): HTMLElement {\n\t\treturn this._rootElement;\n\t}\n\n\tgetElementContainer(): HTMLElement {\n\t\treturn this._elementContainer;\n\t}\n\n\tgetDynamicFontAtlases(): DynamicFontAtlases {\n\t\tif (this._dynamicFontAtlases == null) {\n\t\t\tthis._dynamicFontAtlases = new DynamicFontAtlases(this);\n\t\t}\n\t\treturn this._dynamicFontAtlases;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-chart-plot-area-twofold-sub-base.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-twofold-sub-base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAG5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B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CAAC,CAAC;IAClE,CAAC;IAMD,oDAAa,GAAb,UAAc,QAA4B;QACzC,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;IAC9B,CAAC;IAED,0DAAmB,GAAnB;QACC,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;IAC9B,CAAC;IAED,0DAAmB,GAAnB;QACC,OAAO,IAAI,CAAC,cAAc,EAAE,CAAC;IAC9B,CAAC;IAED,oDAAa,GAAb;QACC,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC;IACrC,CAAC;IAED,8CAAO,GAAP,UAAQ,QAAgB,EAAE,IAAoB,EAAE,MAAc,EAAE,UAAoB;QACnF,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;IACnE,CAAC;IAID,8CAAO,GAAP;QACC,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;QAC1B,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QACvB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;IACtB,CAAC;IACF,mCAAC;AAAD,CAAC,AAtID,IAsIC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DBase } from \"./d-base\";\nimport { DChartPlotArea } from \"./d-chart-plot-area\";\nimport { DChartPlotAreaContainer } from \"./d-chart-plot-area-container\";\nimport { DBaseOverflowMaskSimple } from \"./d-base-overflow-mask-simple\";\nimport { DChartSeriesContainerImpl } from \"./d-chart-series-container-impl\";\nimport { DChartCoordinateContainer } from \"./d-chart-coordinate-container\";\nimport { DChartAxisContainer } from \"./d-chart-axis-container\";\nimport { DChartAxisContainerImpl } from \"./d-chart-axis-container-impl\";\nimport { DChartCoordinateContainerImpl } from \"./d-chart-coordinate-container-impl\";\nimport {\n\tDChartPlotAreaTwofoldSub,\n\tDChartPlotAreaTwofoldSubOptions\n} from \"./d-chart-plot-area-twofold-sub\";\nimport { DisplayObject, IPoint, Point, Rectangle } from \"pixi.js\";\nimport { DChartRegion } from \"./d-chart-region\";\nimport { DChartAxisPosition } from \"./d-chart-axis-position\";\nimport { EShapeContainer } from \"./shape/e-shape-container\";\nimport { DView } from \"./d-view\";\nimport { DBaseStateSet } from \"./d-base-state-set\";\n\nexport interface DChartPlotAreaTwofoldSubParent<CHART extends DBase = DBase>\n\textends DChartPlotArea<CHART> {}\n\nexport abstract class DChartPlotAreaTwofoldSubBase<CHART extends DBase = DBase>\n\timplements DChartPlotAreaTwofoldSub<CHART>\n{\n\tprotected _isContainerBoundsDirty: boolean;\n\tprotected _containerBounds: Rectangle;\n\tprotected _workPoint: Point;\n\n\tprotected _plotArea: DChartPlotAreaTwofoldSubParent<CHART>;\n\tprotected _container: DChartPlotAreaContainer;\n\tprotected _series: DChartSeriesContainerImpl<CHART>;\n\tprotected _coordinate: DChartCoordinateContainer<CHART>;\n\tprotected _axis: DChartAxisContainerImpl<CHART>;\n\tprotected _overflowMask?: DBaseOverflowMaskSimple;\n\tprotected _margin: number;\n\n\tconstructor(\n\t\tplotArea: DChartPlotAreaTwofoldSubParent<CHART>,\n\t\tonContainerChange: () => void,\n\t\tmask: boolean,\n\t\tmargin: number,\n\t\taxisShapeContainer: EShapeContainer,\n\t\toptions?: DChartPlotAreaTwofoldSubOptions<CHART>\n\t) {\n\t\tthis._isContainerBoundsDirty = true;\n\t\tthis._containerBounds = new Rectangle();\n\t\tthis._workPoint = new Point();\n\n\t\tthis._margin = margin;\n\n\t\tthis._plotArea = plotArea;\n\n\t\t// Container\n\t\tconst container = new DChartPlotAreaContainer(onContainerChange);\n\t\tthis._container = container;\n\n\t\t// Coordinate\n\t\tthis._coordinate = new DChartCoordinateContainerImpl(this, options?.coordinate);\n\n\t\t// Overflow mask\n\t\tif (mask) {\n\t\t\tcontainer.mask = this.getOverflowMask();\n\t\t}\n\n\t\t// Series\n\t\tthis._series = new DChartSeriesContainerImpl(this, options?.series);\n\n\t\t// Axis\n\t\tthis._axis = new DChartAxisContainerImpl(this, axisShapeContainer, options?.axis);\n\t}\n\n\tprotected abstract getOverflowMask(): DBaseOverflowMaskSimple;\n\n\tget plotArea(): DChartPlotArea<CHART> {\n\t\treturn this._plotArea;\n\t}\n\n\tget chart(): CHART {\n\t\treturn this._plotArea.chart;\n\t}\n\n\tget container(): DChartPlotAreaContainer {\n\t\treturn this._container;\n\t}\n\n\tget series(): DChartSeriesContainerImpl<CHART> {\n\t\treturn this._series;\n\t}\n\n\tget coordinate(): DChartCoordinateContainer<CHART> {\n\t\treturn this._coordinate;\n\t}\n\n\tget axis(): DChartAxisContainer<CHART> {\n\t\treturn this._axis;\n\t}\n\n\tget state(): DBaseStateSet {\n\t\treturn this._plotArea.state;\n\t}\n\n\tget view(): DView {\n\t\treturn this._plotArea.view;\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/ban-types\n\ton(name: string, callback: Function, context?: any): this {\n\t\tthis._plotArea.on(name, callback, context);\n\t\treturn this;\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/ban-types\n\toff(name: string, callback?: Function, context?: any): this {\n\t\tthis._plotArea.off(name, callback, context);\n\t\treturn this;\n\t}\n\n\tgetPixelDomain(result: DChartRegion): DChartRegion {\n\t\tconst plotArea = this._plotArea;\n\t\tconst padding = plotArea.padding;\n\t\tconst width = plotArea.width;\n\t\treturn result.set(padding.getLeft(), width - padding.getRight());\n\t}\n\n\tabstract getPixelRange(result: DChartRegion): DChartRegion;\n\n\tabstract getPixelBounds(): Rectangle;\n\n\tgetAxisBounds(position: DChartAxisPosition): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetSelectionBoundsX(): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetSelectionBoundsY(): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\ttoBoundsDirty(): void {\n\t\tthis._isContainerBoundsDirty = true;\n\t}\n\n\ttoLocal(position: IPoint, from?: DisplayObject, result?: Point, skipUpdate?: boolean): Point {\n\t\treturn this._plotArea.toLocal(position, from, result, skipUpdate);\n\t}\n\n\tabstract getContainerBounds():
|
|
1
|
+
{"version":3,"file":"d-chart-plot-area-twofold-sub-base.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-chart-plot-area-twofold-sub-base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAExE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAG5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AAKpF,OAAO,EAAyB,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAUlE;IAeC,sCACC,QAA+C,EAC/C,iBAA6B,EAC7B,IAAa,EACb,MAAc,EACd,kBAAmC,EACnC,OAAgD;QAEhD,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC;QACpC,IAAI,CAAC,gBAAgB,GAAG,IAAI,SAAS,EAAE,CAAC;QACxC,IAAI,CAAC,UAAU,GAAG,IAAI,KAAK,EAAE,CAAC;QAE9B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QAEtB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAE1B,YAAY;QACZ,IAAM,SAAS,GAAG,IAAI,uBAAuB,CAAC,iBAAiB,CAAC,CAAC;QACjE,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;QAE5B,aAAa;QACb,IAAI,CAAC,WAAW,GAAG,IAAI,6BAA6B,CAAC,IAAI,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,CAAC,CAAC;QAEhF,gBAAgB;QAChB,IAAI,IAAI,EAAE,CAAC;YACV,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QACzC,CAAC;QAED,SAA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artPlotArea } from \"./d-chart-plot-area\";\nimport { DChartPlotAreaContainer } from \"./d-chart-plot-area-container\";\nimport { DBaseOverflowMaskSimple } from \"./d-base-overflow-mask-simple\";\nimport { DChartSeriesContainerImpl } from \"./d-chart-series-container-impl\";\nimport { DChartCoordinateContainer } from \"./d-chart-coordinate-container\";\nimport { DChartAxisContainer } from \"./d-chart-axis-container\";\nimport { DChartAxisContainerImpl } from \"./d-chart-axis-container-impl\";\nimport { DChartCoordinateContainerImpl } from \"./d-chart-coordinate-container-impl\";\nimport {\n\tDChartPlotAreaTwofoldSub,\n\tDChartPlotAreaTwofoldSubOptions\n} from \"./d-chart-plot-area-twofold-sub\";\nimport { DisplayObject, IPoint, Point, Rectangle } from \"pixi.js\";\nimport { DChartRegion } from \"./d-chart-region\";\nimport { DChartAxisPosition } from \"./d-chart-axis-position\";\nimport { EShapeContainer } from \"./shape/e-shape-container\";\nimport { DView } from \"./d-view\";\nimport { DBaseStateSet } from \"./d-base-state-set\";\n\nexport interface DChartPlotAreaTwofoldSubParent<CHART extends DBase = DBase>\n\textends DChartPlotArea<CHART> {}\n\nexport abstract class DChartPlotAreaTwofoldSubBase<CHART extends DBase = DBase>\n\timplements DChartPlotAreaTwofoldSub<CHART>\n{\n\tprotected _isContainerBoundsDirty: boolean;\n\tprotected _containerBounds: Rectangle;\n\tprotected _workPoint: Point;\n\n\tprotected _plotArea: DChartPlotAreaTwofoldSubParent<CHART>;\n\tprotected _container: DChartPlotAreaContainer;\n\tprotected _series: DChartSeriesContainerImpl<CHART>;\n\tprotected _coordinate: DChartCoordinateContainer<CHART>;\n\tprotected _axis: DChartAxisContainerImpl<CHART>;\n\tprotected _overflowMask?: DBaseOverflowMaskSimple;\n\tprotected _margin: number;\n\n\tconstructor(\n\t\tplotArea: DChartPlotAreaTwofoldSubParent<CHART>,\n\t\tonContainerChange: () => void,\n\t\tmask: boolean,\n\t\tmargin: number,\n\t\taxisShapeContainer: EShapeContainer,\n\t\toptions?: DChartPlotAreaTwofoldSubOptions<CHART>\n\t) {\n\t\tthis._isContainerBoundsDirty = true;\n\t\tthis._containerBounds = new Rectangle();\n\t\tthis._workPoint = new Point();\n\n\t\tthis._margin = margin;\n\n\t\tthis._plotArea = plotArea;\n\n\t\t// Container\n\t\tconst container = new DChartPlotAreaContainer(onContainerChange);\n\t\tthis._container = container;\n\n\t\t// Coordinate\n\t\tthis._coordinate = new DChartCoordinateContainerImpl(this, options?.coordinate);\n\n\t\t// Overflow mask\n\t\tif (mask) {\n\t\t\tcontainer.mask = this.getOverflowMask();\n\t\t}\n\n\t\t// Series\n\t\tthis._series = new DChartSeriesContainerImpl(this, options?.series);\n\n\t\t// Axis\n\t\tthis._axis = new DChartAxisContainerImpl(this, axisShapeContainer, options?.axis);\n\t}\n\n\tprotected abstract getOverflowMask(): DBaseOverflowMaskSimple;\n\n\tget plotArea(): DChartPlotArea<CHART> {\n\t\treturn this._plotArea;\n\t}\n\n\tget chart(): CHART {\n\t\treturn this._plotArea.chart;\n\t}\n\n\tget container(): DChartPlotAreaContainer {\n\t\treturn this._container;\n\t}\n\n\tget series(): DChartSeriesContainerImpl<CHART> {\n\t\treturn this._series;\n\t}\n\n\tget coordinate(): DChartCoordinateContainer<CHART> {\n\t\treturn this._coordinate;\n\t}\n\n\tget axis(): DChartAxisContainer<CHART> {\n\t\treturn this._axis;\n\t}\n\n\tget state(): DBaseStateSet {\n\t\treturn this._plotArea.state;\n\t}\n\n\tget view(): DView {\n\t\treturn this._plotArea.view;\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/ban-types\n\ton(name: string, callback: Function, context?: any): this {\n\t\tthis._plotArea.on(name, callback, context);\n\t\treturn this;\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/ban-types\n\toff(name: string, callback?: Function, context?: any): this {\n\t\tthis._plotArea.off(name, callback, context);\n\t\treturn this;\n\t}\n\n\tgetPixelDomain(result: DChartRegion): DChartRegion {\n\t\tconst plotArea = this._plotArea;\n\t\tconst padding = plotArea.padding;\n\t\tconst width = plotArea.width;\n\t\treturn result.set(padding.getLeft(), width - padding.getRight());\n\t}\n\n\tabstract getPixelRange(result: DChartRegion): DChartRegion;\n\n\tabstract getPixelBounds(): Rectangle;\n\n\tgetAxisBounds(position: DChartAxisPosition): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetSelectionBoundsX(): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\tgetSelectionBoundsY(): Rectangle {\n\t\treturn this.getPixelBounds();\n\t}\n\n\ttoBoundsDirty(): void {\n\t\tthis._isContainerBoundsDirty = true;\n\t}\n\n\ttoLocal(position: IPoint, from?: DisplayObject, result?: Point, skipUpdate?: boolean): Point {\n\t\treturn this._plotArea.toLocal(position, from, result, skipUpdate);\n\t}\n\n\tabstract getContainerBounds(): Rectangle;\n\n\tdestroy(): void {\n\t\tthis._container.destroy();\n\t\tthis._series.destroy();\n\t\tthis._axis.destroy();\n\t}\n}\n"]}
|