From b82d3a24b2487454397535c6fefda250d4ff6114 Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Mon, 28 Mar 2022 01:15:53 +1100 Subject: Enable auto-mode to trigger expand/collapse-fail animations Done by sending a signal to a failed-operation's LayoutNode's Tile component via a watched property on LayoutNode. Also added code to prevent auto-mode from retrying a failed expand/collapse. Not an ideal solution, but signalling via LayoutNode is more general, and arguably cleaner, than the previous method of triggering fail animations by getting Tile to pass a callback upward as event data. --- src/lib.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/lib.ts') diff --git a/src/lib.ts b/src/lib.ts index 450eb90..a82bbd9 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -30,6 +30,8 @@ export class LayoutNode { sepSweptArea: SepSweptArea | null; hidden: boolean; hasFocus: boolean; + collapseFailFlag: boolean; // Used to trigger failure animations + expandFailFlag: boolean; // Used to trigger failure animations // Used for layout heuristics and info display dCount: number; // Number of descendant leaf nodes depth: number; // Number of ancestor nodes @@ -45,6 +47,8 @@ export class LayoutNode { this.sepSweptArea = null; this.hidden = false; this.hasFocus = false; + this.collapseFailFlag = false; + this.expandFailFlag = false; this.dCount = children.length == 0 ? 1 : arraySum(children.map(n => n.dCount)); this.depth = 0; this.empSpc = 0; -- cgit v1.2.3