1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
export class TolNode {
name: string;
children: TolNode[];
constructor(name: string, children: TolNode[] = []){
this.name = name;
this.children = children;
}
}
export class LayoutNode {
//set by TileTree and LayoutFn funcs, eventually used by Tile
tolNode: TolNode;
children: LayoutNode[];
x: number;
y: number;
w: number;
h: number;
headerSz: number;
//set by layoutInfoHooks, used by LayoutFn funcs
tileCount: number;
//set_by/internal_to LayoutFn funcs
contentW: number;
contentH: number;
empSpc: number;
//set by LayoutFn funcs, eventually used by Tile
sepSweptArea: SepSweptArea | null;
//
constructor(tolNode: TolNode, children: LayoutNode[], x=0, y=0, w=0, h=0,
{headerSz=0, tileCount=0, contentW=0, contentH=0, empSpc=0, sepSweptArea=null as SepSweptArea|null} = {}){
this.tolNode = tolNode;
this.children = children;
this.x = x;
this.y = y;
this.w = w;
this.h = h;
this.headerSz = headerSz;
this.tileCount = tileCount;
this.contentW = contentW;
this.contentH = contentH;
this.empSpc = empSpc;
this.sepSweptArea = sepSweptArea;
}
}
export class SepSweptArea {
x: number;
y: number;
w: number;
h: number;
sweptLeft: boolean;
tileSpacing: number;
constructor(x: number, y: number, w: number, h: number, sweptLeft: boolean, tileSpacing: number){
this.x = x;
this.y = y;
this.w = w;
this.h = h;
this.sweptLeft = sweptLeft;
this.tileSpacing = tileSpacing;
}
}
|