From 03bc94ff813705c7098a1626866b0ea872075bd4 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Oct 2019 20:26:25 -0400 Subject: [PATCH] Sum adjustment values started --- table.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/table.ts b/table.ts index 6a27d89..3821be8 100644 --- a/table.ts +++ b/table.ts @@ -1,6 +1,7 @@ export class Sum { ColumnIndex: number; + Table: Table; Original: number; Adjustment: number; @@ -8,10 +9,13 @@ export class Sum FromChildren: number; FromOutside: number; - constructor(inIndex: number) + constructor(inIndex: number, inTable: Table) { this.ColumnIndex = inIndex; + this.Table = inTable; this.Original = 0; + this.Adjustment = 1; + this.FromParents = 1; } } @@ -29,7 +33,7 @@ export class Table this.Rows = inRows; this.Parent = null; this.Children = []; - this.Columns = inColumns.map( (inIndex: number) => new Sum(inIndex) ); + this.Columns = inColumns.map( (inIndex: number) => new Sum(inIndex, this) ); } Pivot(inColumnPivot: number)