@wcardinal/wcardinal-ui 0.155.0 → 0.158.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-like.d.ts +0 -1
- package/dist/types/wcardinal/ui/d-application-layer.d.ts +0 -2
- package/dist/types/wcardinal/ui/d-base.d.ts +11 -12
- package/dist/types/wcardinal/ui/d-diagram-snapshot.d.ts +0 -2
- package/dist/types/wcardinal/ui/d-image-base.d.ts +2 -0
- package/dist/types/wcardinal/ui/d-image-piece-layouter-part-bottom.d.ts +4 -0
- package/dist/types/wcardinal/ui/d-image-piece-layouter-part-center.d.ts +6 -0
- package/dist/types/wcardinal/ui/d-image-piece-layouter-part-container.d.ts +25 -0
- package/dist/types/wcardinal/ui/d-image-piece-layouter-part-left.d.ts +4 -0
- package/dist/types/wcardinal/ui/d-image-piece-layouter-part-middle.d.ts +6 -0
- package/dist/types/wcardinal/ui/d-image-piece-layouter-part-right.d.ts +4 -0
- package/dist/types/wcardinal/ui/d-image-piece-layouter-part-top.d.ts +4 -0
- package/dist/types/wcardinal/ui/d-image-piece-layouter-part.d.ts +8 -0
- package/dist/types/wcardinal/ui/d-image-piece-layouter.d.ts +17 -0
- package/dist/types/wcardinal/ui/d-menu-sided.d.ts +1 -1
- package/dist/types/wcardinal/ui/d-text-base.d.ts +5 -5
- package/dist/types/wcardinal/ui/shape/variant/deserialize-connector-line.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/variant/deserialize-line.d.ts +1 -1
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-input.d.ts +1 -1
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-input.d.ts +1 -1
- package/dist/wcardinal/ui/d-application-layer-like.js.map +1 -1
- package/dist/wcardinal/ui/d-application-layer.js +3 -21
- package/dist/wcardinal/ui/d-application-layer.js.map +1 -1
- package/dist/wcardinal/ui/d-base.js +126 -100
- package/dist/wcardinal/ui/d-base.js.map +1 -1
- package/dist/wcardinal/ui/d-diagram-snapshot.js +2 -18
- package/dist/wcardinal/ui/d-diagram-snapshot.js.map +1 -1
- package/dist/wcardinal/ui/d-html-element.js +0 -3
- package/dist/wcardinal/ui/d-html-element.js.map +1 -1
- package/dist/wcardinal/ui/d-image-base.js +9 -264
- package/dist/wcardinal/ui/d-image-base.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-layouter-part-bottom.js +31 -0
- package/dist/wcardinal/ui/d-image-piece-layouter-part-bottom.js.map +1 -0
- package/dist/wcardinal/ui/d-image-piece-layouter-part-center.js +24 -0
- package/dist/wcardinal/ui/d-image-piece-layouter-part-center.js.map +1 -0
- package/dist/wcardinal/ui/d-image-piece-layouter-part-container.js +158 -0
- package/dist/wcardinal/ui/d-image-piece-layouter-part-container.js.map +1 -0
- package/dist/wcardinal/ui/d-image-piece-layouter-part-left.js +30 -0
- package/dist/wcardinal/ui/d-image-piece-layouter-part-left.js.map +1 -0
- package/dist/wcardinal/ui/d-image-piece-layouter-part-middle.js +24 -0
- package/dist/wcardinal/ui/d-image-piece-layouter-part-middle.js.map +1 -0
- package/dist/wcardinal/ui/d-image-piece-layouter-part-right.js +31 -0
- package/dist/wcardinal/ui/d-image-piece-layouter-part-right.js.map +1 -0
- package/dist/wcardinal/ui/d-image-piece-layouter-part-top.js +32 -0
- package/dist/wcardinal/ui/d-image-piece-layouter-part-top.js.map +1 -0
- package/dist/wcardinal/ui/d-image-piece-layouter-part.js +18 -0
- package/dist/wcardinal/ui/d-image-piece-layouter-part.js.map +1 -0
- package/dist/wcardinal/ui/d-image-piece-layouter.js +65 -0
- package/dist/wcardinal/ui/d-image-piece-layouter.js.map +1 -0
- package/dist/wcardinal/ui/d-menu-item-text.js +18 -2
- package/dist/wcardinal/ui/d-menu-item-text.js.map +1 -1
- package/dist/wcardinal/ui/d-menu-sided.js +2 -2
- package/dist/wcardinal/ui/d-menu-sided.js.map +1 -1
- package/dist/wcardinal/ui/d-picker-color-gradient.js +6 -6
- package/dist/wcardinal/ui/d-picker-color-gradient.js.map +1 -1
- package/dist/wcardinal/ui/d-text-base.js +34 -24
- package/dist/wcardinal/ui/d-text-base.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-embedded.js +30 -0
- package/dist/wcardinal/ui/shape/variant/deserialize-embedded.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-line.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-input.js +2 -2
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-input.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-input.js +2 -2
- package/dist/wcardinal/ui/theme/white/d-theme-white-input.js.map +1 -1
- package/dist/wcardinal/ui/util/dynamic-font-atlas-font.js +3 -1
- package/dist/wcardinal/ui/util/dynamic-font-atlas-font.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +3 -3
- 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 +3 -3
- 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 +785 -611
- package/dist/wcardinal-ui.js +781 -607
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -11,7 +11,6 @@ export declare class DApplicationLayer extends Application implements DApplicati
|
|
|
11
11
|
protected _renderBound: () => void;
|
|
12
12
|
protected _isLocked: boolean;
|
|
13
13
|
protected _isOverlay: boolean;
|
|
14
|
-
protected _refitLimit: number;
|
|
15
14
|
protected _reflowLimit: number;
|
|
16
15
|
protected _rootElement: HTMLElement;
|
|
17
16
|
protected _elementContainer: HTMLElement;
|
|
@@ -37,7 +36,6 @@ export declare class DApplicationLayer extends Application implements DApplicati
|
|
|
37
36
|
get width(): number;
|
|
38
37
|
get height(): number;
|
|
39
38
|
get padding(): DPadding;
|
|
40
|
-
refit(): void;
|
|
41
39
|
reflow(): void;
|
|
42
40
|
getFocusController(): DControllerFocus;
|
|
43
41
|
getRootElement(): HTMLElement;
|
|
@@ -557,7 +557,7 @@ export declare class DBase<THEME extends DThemeBase = DThemeBase, OPTIONS extend
|
|
|
557
557
|
protected _auto: DBaseAutoSet;
|
|
558
558
|
private _isDirty;
|
|
559
559
|
private _hasDirty;
|
|
560
|
-
|
|
560
|
+
private _isHierarchyDirty;
|
|
561
561
|
private _shadow;
|
|
562
562
|
private _onShadowUpdateBound;
|
|
563
563
|
private _weight;
|
|
@@ -584,26 +584,26 @@ export declare class DBase<THEME extends DThemeBase = DThemeBase, OPTIONS extend
|
|
|
584
584
|
protected init(options?: OPTIONS): void;
|
|
585
585
|
get weight(): number;
|
|
586
586
|
protected onMove(newX: number, newY: number, oldX: number, oldY: number): void;
|
|
587
|
-
resize(width
|
|
587
|
+
resize(width?: number, height?: number): boolean;
|
|
588
588
|
getClearType(): DLayoutClearType;
|
|
589
589
|
onResize(newWidth: number, newHeight: number, oldWidth: number, oldHeight: number): void;
|
|
590
590
|
protected onScale(newX: number, newY: number, oldX: number, oldY: number): void;
|
|
591
591
|
protected onSkew(newX: number, newY: number, oldX: number, oldY: number): void;
|
|
592
592
|
get type(): string;
|
|
593
593
|
get x(): number;
|
|
594
|
-
set x(x:
|
|
594
|
+
set x(x: DCoordinatePosition);
|
|
595
595
|
getX(): DCoordinatePosition;
|
|
596
596
|
setX(x: DCoordinatePosition): void;
|
|
597
597
|
get y(): number;
|
|
598
|
-
set y(y:
|
|
598
|
+
set y(y: DCoordinatePosition);
|
|
599
599
|
getY(): DCoordinatePosition;
|
|
600
600
|
setY(y: DCoordinatePosition): void;
|
|
601
601
|
get width(): number;
|
|
602
|
-
set width(width:
|
|
602
|
+
set width(width: DCoordinateSize);
|
|
603
603
|
getWidth(): DCoordinateSize;
|
|
604
604
|
setWidth(width: DCoordinateSize): void;
|
|
605
605
|
get height(): number;
|
|
606
|
-
set height(height:
|
|
606
|
+
set height(height: DCoordinateSize);
|
|
607
607
|
getHeight(): DCoordinateSize;
|
|
608
608
|
setHeight(height: DCoordinateSize): void;
|
|
609
609
|
get position(): DBasePoint;
|
|
@@ -625,10 +625,10 @@ export declare class DBase<THEME extends DThemeBase = DThemeBase, OPTIONS extend
|
|
|
625
625
|
toDirty(): boolean;
|
|
626
626
|
toHasDirty(): boolean;
|
|
627
627
|
toParentHasDirty(): void;
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
protected
|
|
628
|
+
toHierarchyDirty(): boolean;
|
|
629
|
+
toParentHierarchyDirty(): void;
|
|
630
|
+
isHierarchyDirty(): boolean;
|
|
631
|
+
protected onHierarchyDirty(): void;
|
|
632
632
|
isDirty(): boolean;
|
|
633
633
|
hasDirty(): boolean;
|
|
634
634
|
protected setFocused(isFocused: boolean): this;
|
|
@@ -642,12 +642,11 @@ export declare class DBase<THEME extends DThemeBase = DThemeBase, OPTIONS extend
|
|
|
642
642
|
get state(): DBaseStateSet;
|
|
643
643
|
get theme(): THEME;
|
|
644
644
|
set theme(theme: THEME);
|
|
645
|
-
|
|
645
|
+
reflow(): void;
|
|
646
646
|
protected onRefit(): void;
|
|
647
647
|
protected isRefitable(target: any): target is DRefitable;
|
|
648
648
|
protected hasRefitableHeight(target: any): target is DRefitable;
|
|
649
649
|
protected hasRefitableWidth(target: any): target is DBase<any, any>;
|
|
650
|
-
reflow(): void;
|
|
651
650
|
protected onReflow(): void;
|
|
652
651
|
get shadow(): DShadow | null;
|
|
653
652
|
set shadow(shadow: DShadow | null);
|
|
@@ -38,7 +38,6 @@ export interface DDiagramSnapshotOnOptions<CANVAS, EMITTER> extends Partial<DDia
|
|
|
38
38
|
export interface DDiagramSnapshotCleanupOptions {
|
|
39
39
|
snap?: boolean;
|
|
40
40
|
background?: boolean;
|
|
41
|
-
refit?: boolean;
|
|
42
41
|
reflow?: boolean;
|
|
43
42
|
}
|
|
44
43
|
export interface DDiagramSnapshotCreateAsUrlOptions {
|
|
@@ -97,7 +96,6 @@ export declare class DDiagramSnapshot<CANVAS extends DDiagramSnapshotCanvas = DD
|
|
|
97
96
|
protected toScale(size: number | null | undefined, canvas: CANVAS): number;
|
|
98
97
|
protected toCleanupSnap(options?: DDiagramSnapshotCreateOptions<CANVAS, unknown>): boolean;
|
|
99
98
|
protected toCleanupBackground(options?: DDiagramSnapshotCreateOptions<CANVAS, unknown>): boolean;
|
|
100
|
-
protected toCleanupRefit(options?: DDiagramSnapshotCreateOptions<CANVAS, unknown>): boolean;
|
|
101
99
|
protected toCleanupReflow(options?: DDiagramSnapshotCreateOptions<CANVAS, unknown>): boolean;
|
|
102
100
|
create<DATA>(options: DDiagramSnapshotCreateOptions<CANVAS, DATA>): DATA | undefined;
|
|
103
101
|
}
|
|
@@ -5,6 +5,7 @@ import { DAlignWith } from "./d-align-with";
|
|
|
5
5
|
import { DRefitable } from "./d-base";
|
|
6
6
|
import { DBaseStateSet } from "./d-base-state-set";
|
|
7
7
|
import { DImagePiece, DImagePieceOptions, DThemeImagePiece } from "./d-image-piece";
|
|
8
|
+
import { DImagePieceLayouter } from "./d-image-piece-layouter";
|
|
8
9
|
import { DOnOptions } from "./d-on-options";
|
|
9
10
|
import { DStateAwareOrValueMightBe } from "./d-state-aware";
|
|
10
11
|
import { DTextBase, DTextBaseEvents, DTextBaseOptions, DThemeTextBase } from "./d-text-base";
|
|
@@ -51,6 +52,7 @@ export interface DThemeImageBase<VALUE = unknown> extends DThemeTextBase<VALUE>,
|
|
|
51
52
|
* See {@link DImageBaseEvents} for event details.
|
|
52
53
|
*/
|
|
53
54
|
export declare class DImageBase<VALUE = unknown, THEME extends DThemeImageBase<VALUE> = DThemeImageBase<VALUE>, OPTIONS extends DImageBaseOptions<VALUE, THEME> = DImageBaseOptions<VALUE, THEME>> extends DTextBase<VALUE, THEME, OPTIONS> {
|
|
55
|
+
protected static LAYOUTER?: DImagePieceLayouter;
|
|
54
56
|
protected _images: DImagePiece[];
|
|
55
57
|
protected init(options?: OPTIONS): void;
|
|
56
58
|
protected newImages(theme: THEME, options?: OPTIONS): DImagePiece[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DImagePiece } from "./d-image-piece";
|
|
2
|
+
import { DImagePieceLayouterPart } from "./d-image-piece-layouter-part";
|
|
3
|
+
export declare class DImagePieceLayouterPartCenter extends DImagePieceLayouterPart {
|
|
4
|
+
add(image: DImagePiece, size: number, margin: number): void;
|
|
5
|
+
execute(pleft: number, pright: number, width: number): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DDynamicText } from "./d-dynamic-text";
|
|
2
|
+
import { DImagePiece } from "./d-image-piece";
|
|
3
|
+
import { DImagePieceLayouterPartBottom } from "./d-image-piece-layouter-part-bottom";
|
|
4
|
+
import { DImagePieceLayouterPartCenter } from "./d-image-piece-layouter-part-center";
|
|
5
|
+
import { DImagePieceLayouterPartLeft } from "./d-image-piece-layouter-part-left";
|
|
6
|
+
import { DImagePieceLayouterPartMiddle } from "./d-image-piece-layouter-part-middle";
|
|
7
|
+
import { DImagePieceLayouterPartRight } from "./d-image-piece-layouter-part-right";
|
|
8
|
+
import { DImagePieceLayouterPartTop } from "./d-image-piece-layouter-part-top";
|
|
9
|
+
import { DTextBaseAlign } from "./d-text-base";
|
|
10
|
+
export declare class DImagePieceLayouterPartContainer {
|
|
11
|
+
left: DImagePieceLayouterPartLeft;
|
|
12
|
+
center: DImagePieceLayouterPartCenter;
|
|
13
|
+
right: DImagePieceLayouterPartRight;
|
|
14
|
+
top: DImagePieceLayouterPartTop;
|
|
15
|
+
middle: DImagePieceLayouterPartMiddle;
|
|
16
|
+
bottom: DImagePieceLayouterPartBottom;
|
|
17
|
+
text?: DDynamicText;
|
|
18
|
+
constructor();
|
|
19
|
+
clear(): void;
|
|
20
|
+
add(image: DImagePiece): void;
|
|
21
|
+
set(text: DDynamicText): void;
|
|
22
|
+
get width(): number;
|
|
23
|
+
get height(): number;
|
|
24
|
+
execute(pleft: number, ptop: number, pright: number, pbottom: number, textAlign: DTextBaseAlign, width: number, height: number): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DImagePiece } from "./d-image-piece";
|
|
2
|
+
import { DImagePieceLayouterPart } from "./d-image-piece-layouter-part";
|
|
3
|
+
export declare class DImagePieceLayouterPartMiddle extends DImagePieceLayouterPart {
|
|
4
|
+
add(image: DImagePiece, size: number, margin: number): void;
|
|
5
|
+
execute(ptop: number, pbottom: number, height: number): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DDynamicText } from "./d-dynamic-text";
|
|
2
|
+
import { DImagePiece } from "./d-image-piece";
|
|
3
|
+
import { DImagePieceLayouterPartContainer } from "./d-image-piece-layouter-part-container";
|
|
4
|
+
import { DPadding } from "./d-padding";
|
|
5
|
+
import { DTextBaseAlign } from "./d-text-base";
|
|
6
|
+
export declare class DImagePieceLayouter {
|
|
7
|
+
text: DImagePieceLayouterPartContainer;
|
|
8
|
+
padding: DImagePieceLayouterPartContainer;
|
|
9
|
+
border: DImagePieceLayouterPartContainer;
|
|
10
|
+
constructor();
|
|
11
|
+
clear(): void;
|
|
12
|
+
add(image: DImagePiece): void;
|
|
13
|
+
set(text: DDynamicText): void;
|
|
14
|
+
execute(padding: DPadding, textAlign: DTextBaseAlign, width: number | null, height: number | null): void;
|
|
15
|
+
get width(): number;
|
|
16
|
+
get height(): number;
|
|
17
|
+
}
|
|
@@ -17,7 +17,7 @@ export declare class DMenuSided<VALUE = unknown, THEME extends DThemeMenuSided =
|
|
|
17
17
|
protected _selection: DMenuSidedSelection<VALUE>;
|
|
18
18
|
constructor(options?: OPTIONS);
|
|
19
19
|
protected newSelection(options?: DMenuSidedSelectionOptions): DMenuSidedSelection<VALUE>;
|
|
20
|
-
protected
|
|
20
|
+
protected onHierarchyDirty(): void;
|
|
21
21
|
protected newItems(items: Array<DMenuItemOptionsUnion<VALUE> | DisplayObject>, sticky: boolean): void;
|
|
22
22
|
protected newContent(options?: CONTENT_OPTIONS): DBase;
|
|
23
23
|
get selection(): DMenuSidedSelection<VALUE>;
|
|
@@ -68,6 +68,10 @@ export interface DThemeTextBase<VALUE = unknown> extends DThemeBase {
|
|
|
68
68
|
getTextStyleWordWrap(): DDynamicTextStyleWordWrap;
|
|
69
69
|
isOverflowMaskEnabled(): boolean;
|
|
70
70
|
}
|
|
71
|
+
export interface DTextBaseAlign {
|
|
72
|
+
vertical: DAlignVertical;
|
|
73
|
+
horizontal: DAlignHorizontal;
|
|
74
|
+
}
|
|
71
75
|
/**
|
|
72
76
|
* A base class for UI classes with a text support.
|
|
73
77
|
* See {@link DTextBaseEvents} for event defaults.
|
|
@@ -79,10 +83,7 @@ export declare class DTextBase<VALUE = unknown, THEME extends DThemeTextBase<VAL
|
|
|
79
83
|
protected _textColor: DStateAwareOrValueMightBe<number>;
|
|
80
84
|
protected _textAlpha: DStateAwareOrValueMightBe<number>;
|
|
81
85
|
protected _textStyle: DDynamicTextStyleOptions;
|
|
82
|
-
protected _textAlign:
|
|
83
|
-
vertical: DAlignVertical;
|
|
84
|
-
horizontal: DAlignHorizontal;
|
|
85
|
-
};
|
|
86
|
+
protected _textAlign: DTextBaseAlign;
|
|
86
87
|
protected _textFormatter: (value: VALUE, caller: any) => string;
|
|
87
88
|
protected _isOverflowMaskEnabled: boolean;
|
|
88
89
|
protected _overflowMask?: DBaseOverflowMaskSimple | null;
|
|
@@ -96,7 +97,6 @@ export declare class DTextBase<VALUE = unknown, THEME extends DThemeTextBase<VAL
|
|
|
96
97
|
protected createText(formatted: string): DDynamicText;
|
|
97
98
|
getOverflowMask(): Graphics | null;
|
|
98
99
|
protected updateTextPosition(text: DDynamicText): void;
|
|
99
|
-
protected toRounded(this: unknown, value: number): number;
|
|
100
100
|
protected getTextColor(theme: THEME, state: DBaseStateSet): number;
|
|
101
101
|
protected getTextAlpha(theme: THEME, state: DBaseStateSet): number;
|
|
102
102
|
protected updateTextColor(text: DDynamicText): void;
|
|
@@ -3,5 +3,5 @@ import { EShape } from "../e-shape";
|
|
|
3
3
|
import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
|
|
4
4
|
import { EShapeUuidMapping } from "../e-shape-uuid-mapping";
|
|
5
5
|
import { EShapeConnectorLine } from "./e-shape-connector-line";
|
|
6
|
-
export declare const deserializeConnectorLine: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeConnectorLine | undefined) => Promise<EShapeConnectorLine> | EShapeConnectorLine
|
|
6
|
+
export declare const deserializeConnectorLine: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeConnectorLine | undefined) => Promise<EShapeConnectorLine> | EShapeConnectorLine;
|
|
7
7
|
export declare const onDeserializedConnectorLine: (item: DDiagramSerializedItem, shape: EShape, mapping: EShapeUuidMapping, manager: EShapeResourceManagerDeserialization) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { DDiagramSerializedItem } from "../../d-diagram-serialized";
|
|
2
2
|
import { EShapeResourceManagerDeserialization } from "../e-shape-resource-manager-deserialization";
|
|
3
3
|
import { EShapeLine } from "./e-shape-line";
|
|
4
|
-
export declare const deserializeLine: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeLine | undefined) => Promise<EShapeLine> | EShapeLine
|
|
4
|
+
export declare const deserializeLine: (item: DDiagramSerializedItem, manager: EShapeResourceManagerDeserialization, shape?: EShapeLine | undefined) => Promise<EShapeLine> | EShapeLine;
|
|
@@ -22,5 +22,5 @@ export declare abstract class DThemeDarkInput<VALUE = unknown, ELEMENT extends H
|
|
|
22
22
|
abstract getBeforeCreator(): UtilHtmlElementCreator<HTMLDivElement>;
|
|
23
23
|
abstract getAfterCreator(): UtilHtmlElementCreator<HTMLDivElement>;
|
|
24
24
|
getSelect(): boolean;
|
|
25
|
-
protected
|
|
25
|
+
protected getElementStyleBorder(state: DBaseStateSet): string;
|
|
26
26
|
}
|
|
@@ -22,5 +22,5 @@ export declare abstract class DThemeWhiteInput<VALUE = unknown, ELEMENT extends
|
|
|
22
22
|
abstract getBeforeCreator(): UtilHtmlElementCreator<HTMLDivElement>;
|
|
23
23
|
abstract getAfterCreator(): UtilHtmlElementCreator<HTMLDivElement>;
|
|
24
24
|
getSelect(): boolean;
|
|
25
|
-
protected
|
|
25
|
+
protected getElementStyleBorder(state: DBaseStateSet): string;
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"d-application-layer-like.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-application-layer-like.ts"],"names":[],"mappings":"","sourcesContent":["import { Application } from \"pixi.js\";\nimport { DApplicationLike } from \"./d-application-like\";\nimport { DControllerFocus } from \"./d-controller-focus\";\nimport { DPadding } from \"./d-padding\";\nimport { DynamicFontAtlases } from \"./util/dynamic-font-atlases\";\n\nexport interface DApplicationLayerLike extends Application {\n\treadonly application: DApplicationLike;\n\treadonly width: number;\n\treadonly height: number;\n\treadonly padding: DPadding;\n\n\tunlock(): void;\n\tlock(): void;\n\n\tupdate(): void;\n\trender(): void;\n\
|
|
1
|
+
{"version":3,"file":"d-application-layer-like.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-application-layer-like.ts"],"names":[],"mappings":"","sourcesContent":["import { Application } from \"pixi.js\";\nimport { DApplicationLike } from \"./d-application-like\";\nimport { DControllerFocus } from \"./d-controller-focus\";\nimport { DPadding } from \"./d-padding\";\nimport { DynamicFontAtlases } from \"./util/dynamic-font-atlases\";\n\nexport interface DApplicationLayerLike extends Application {\n\treadonly application: DApplicationLike;\n\treadonly width: number;\n\treadonly height: number;\n\treadonly padding: DPadding;\n\n\tunlock(): void;\n\tlock(): void;\n\n\tupdate(): void;\n\trender(): void;\n\treflow(): void;\n\n\tgetFocusController(): DControllerFocus;\n\tgetDynamicFontAtlases(): DynamicFontAtlases;\n\tgetRootElement(): HTMLElement;\n\tgetElementContainer(): HTMLElement;\n}\n"]}
|
|
@@ -27,7 +27,6 @@ var DApplicationLayer = /** @class */ (function (_super) {
|
|
|
27
27
|
_this._isOverlay = options.isOverlay();
|
|
28
28
|
_this._padding = options.getPadding();
|
|
29
29
|
_this._rootElement = options.getRootElement();
|
|
30
|
-
_this._refitLimit = 5;
|
|
31
30
|
_this._reflowLimit = 5;
|
|
32
31
|
_this._elementContainer = _this.newElementContainer();
|
|
33
32
|
_this.application = application;
|
|
@@ -221,7 +220,6 @@ var DApplicationLayer = /** @class */ (function (_super) {
|
|
|
221
220
|
}
|
|
222
221
|
};
|
|
223
222
|
DApplicationLayer.prototype.render = function () {
|
|
224
|
-
this.refit();
|
|
225
223
|
this.reflow();
|
|
226
224
|
// Please note why the following line is here.
|
|
227
225
|
//
|
|
@@ -257,32 +255,16 @@ var DApplicationLayer = /** @class */ (function (_super) {
|
|
|
257
255
|
enumerable: false,
|
|
258
256
|
configurable: true
|
|
259
257
|
});
|
|
260
|
-
DApplicationLayer.prototype.refit = function () {
|
|
261
|
-
var children = this.stage.children;
|
|
262
|
-
for (var ilimit = 0, limit = this._refitLimit; ilimit < limit; ++ilimit) {
|
|
263
|
-
var isChildrenDirty = false;
|
|
264
|
-
for (var i = 0, imax = children.length; i < imax; ++i) {
|
|
265
|
-
var child = children[i];
|
|
266
|
-
if (child instanceof DBase) {
|
|
267
|
-
child.refit();
|
|
268
|
-
isChildrenDirty = isChildrenDirty || child.isChildrenDirty();
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
// If DBases are changed during the `refit` process, need to refit again.
|
|
272
|
-
if (!isChildrenDirty) {
|
|
273
|
-
break;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
};
|
|
277
258
|
DApplicationLayer.prototype.reflow = function () {
|
|
278
259
|
var children = this.stage.children;
|
|
279
|
-
for (var ilimit = 0, limit = this.
|
|
260
|
+
for (var ilimit = 0, limit = this._reflowLimit; ilimit < limit; ++ilimit) {
|
|
280
261
|
var isDirty = false;
|
|
281
262
|
for (var i = 0, imax = children.length; i < imax; ++i) {
|
|
282
263
|
var child = children[i];
|
|
283
264
|
if (child instanceof DBase) {
|
|
284
265
|
child.reflow();
|
|
285
|
-
isDirty =
|
|
266
|
+
isDirty =
|
|
267
|
+
isDirty || child.isDirty() || child.hasDirty() || child.isHierarchyDirty();
|
|
286
268
|
}
|
|
287
269
|
}
|
|
288
270
|
// If DBases are changed during the `reflow` process, need to reflow again.
|
|
@@ -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,EAAe,KAAK,EAAE,MAAM,SAAS,CAAC;AAI1D,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;AAS/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;IAgBjD,2BAAY,WAA6B,EAAE,OAAiC;QAA5E,YACC,kBAAM,OAAO,CAAC,yBAAyB,EAAE,CAAC,SA2B1C;QA1CS,eAAS,GAAkB,IAAI,CAAC;QAShC,yBAAm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CAAC;IACF,wBAAC;AAAD,CAAC,AAxUD,CAAuC,WAAW,GAwUjD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Application, interaction, 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(\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: interaction.InteractionManager\n\t): 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 _refitLimit: number;\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._refitLimit = 5;\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: interaction.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 onResizeBound = (): void => {\n\t\t\tthis.onResize();\n\t\t};\n\t\twindow.addEventListener(\"resize\", onResizeBound);\n\t\twindow.addEventListener(\"orientationchange\", onResizeBound);\n\t}\n\n\tprotected onResize(): void {\n\t\tconst bbox = this._rootElement.getBoundingClientRect();\n\t\tconst bboxWidth = bbox.width;\n\t\tconst bboxHeight = bbox.height;\n\t\tthis.renderer.resize(bboxWidth, bboxHeight);\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(bboxWidth, bboxHeight, padding);\n\t\t\t}\n\t\t}\n\n\t\tthis.update();\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.refit();\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\trefit(): void {\n\t\tconst children = this.stage.children;\n\t\tfor (let ilimit = 0, limit = this._refitLimit; ilimit < limit; ++ilimit) {\n\t\t\tlet isChildrenDirty = 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.refit();\n\t\t\t\t\tisChildrenDirty = isChildrenDirty || child.isChildrenDirty();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If DBases are changed during the `refit` process, need to refit again.\n\t\t\tif (!isChildrenDirty) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\treflow(): void {\n\t\tconst children = this.stage.children;\n\t\tfor (let ilimit = 0, limit = this._refitLimit; 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 = isDirty || child.isDirty() || child.hasDirty();\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,EAAe,KAAK,EAAE,MAAM,SAAS,CAAC;AAI1D,OAAO,EAAE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C,AAnTD,CAAuC,WAAW,GAmTjD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Application, interaction, 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(\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: interaction.InteractionManager\n\t): 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: interaction.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 onResizeBound = (): void => {\n\t\t\tthis.onResize();\n\t\t};\n\t\twindow.addEventListener(\"resize\", onResizeBound);\n\t\twindow.addEventListener(\"orientationchange\", onResizeBound);\n\t}\n\n\tprotected onResize(): void {\n\t\tconst bbox = this._rootElement.getBoundingClientRect();\n\t\tconst bboxWidth = bbox.width;\n\t\tconst bboxHeight = bbox.height;\n\t\tthis.renderer.resize(bboxWidth, bboxHeight);\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(bboxWidth, bboxHeight, padding);\n\t\t\t}\n\t\t}\n\n\t\tthis.update();\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"]}
|