aboutsummaryrefslogtreecommitdiff
path: root/src/types.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/types.ts')
-rw-r--r--src/types.ts40
1 files changed, 12 insertions, 28 deletions
diff --git a/src/types.ts b/src/types.ts
index 92deef5..0c38be8 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -6,50 +6,34 @@ export class TolNode {
this.children = children;
}
}
-export class TreeNode {
- tolNode: TolNode;
- children: TreeNode[];
- x: number;
- y: number;
- w: number;
- h: number;
- headerSz: number;
- sepSweptArea: SepSweptArea | null;
- tileCount: number;
- constructor(tolNode: TolNode, children: TreeNode[], x=0, y=0, w=0, h=0,
- {headerSz=0, sepSweptArea=null, tileCount=1} = {}){
- this.tolNode = tolNode;
- this.children = children;
- this.x = x;
- this.y = y;
- this.w = w;
- this.h = h;
- this.headerSz = headerSz;
- this.sepSweptArea = sepSweptArea;
- this.tileCount = tileCount;
- }
-}
export class LayoutNode {
- name: string;
+ //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(name: string, children: LayoutNode[], x=0, y=0, w=0, h=0,
- {headerSz=0, contentW=0, contentH=0, empSpc=0, sepSweptArea=null as SepSweptArea|null} = {}){
- this.name = name;
+ //
+ 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.children = children;
+ this.tileCount = tileCount;
this.contentW = contentW;
this.contentH = contentH;
this.empSpc = empSpc;