From e39f5ada10723dc1f5c29f32543051f90df03041 Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Mon, 28 Mar 2022 12:10:27 +1100 Subject: Move TolNode code to tol.ts --- src/lib.ts | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'src/lib.ts') diff --git a/src/lib.ts b/src/lib.ts index a82bbd9..765a82e 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -1,5 +1,5 @@ /* - * Contains classes used for representing tree-of-life data, and tile-based layouts of such data. + * Contains classes used for representing tile-based layouts of tree-of-life data. * * Generally, given a TolNode with child TolNodes representing tree-of-life T, * initLayoutTree() produces a tree structure representing a subtree of T, @@ -7,17 +7,8 @@ * The tree structure consists of LayoutNode objects, each of which holds placement info for a linked TolNode. */ -// Represents a tree-of-life node/tree -export class TolNode { - name: string; - children: TolNode[]; - parent: TolNode | null; - constructor(name: string, children: TolNode[] = [], parent = null){ - this.name = name; - this.children = children; - this.parent = parent; - } -} +import {TolNode} from './tol'; + // Represents a node/tree, and holds layout data for a TolNode node/tree export class LayoutNode { tolNode: TolNode; -- cgit v1.2.3