From 67e6be49b9c86c382f7bad827884246d55897b89 Mon Sep 17 00:00:00 2001 From: Davis Silverman Date: Wed, 27 Nov 2024 10:10:06 -0500 Subject: [PATCH] Do not wait to call workspace update events Signed-off-by: Davis Silverman --- .../src/ts/workspace/workspace.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/perspective-workspace/src/ts/workspace/workspace.ts b/packages/perspective-workspace/src/ts/workspace/workspace.ts index e2d256d01d..5b5d27508b 100644 --- a/packages/perspective-workspace/src/ts/workspace/workspace.ts +++ b/packages/perspective-workspace/src/ts/workspace/workspace.ts @@ -71,7 +71,7 @@ export class PerspectiveWorkspace extends SplitPanel { private _minimizedLayoutSlots?: DockPanel.ILayoutConfig; private _minimizedLayout?: DockPanel.ILayoutConfig; private _maximizedWidget?: PerspectiveViewerWidget; - private _save?: DebouncedFunc<() => false | Promise>; + private _save?: () => false | Promise; private _context_menu?: Menu & { init_overlay?: () => void }; constructor(element: HTMLElement, options = {}) { @@ -1028,12 +1028,9 @@ export class PerspectiveWorkspace extends SplitPanel { async workspaceUpdated() { if (!this._save) { - this._save = debounce( - () => - this.dockpanel.mode !== "single-document" && - this._fireUpdateEvent(), - 500 - ); + this._save = () => + this.dockpanel.mode !== "single-document" && + this._fireUpdateEvent(); } this._save();