From 5ce7b92232ba322278be0354032449e1e182c321 Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Tue, 30 Jan 2024 22:34:00 -0800 Subject: [PATCH] Simplify logic for startResizing width calculation (#269) * Apply Red's suggestion and move width logic to getWidth * remove unnecessary * a little more * remove comment --- src/app/common/common.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/common/common.tsx b/src/app/common/common.tsx index b2f08881..578eb609 100644 --- a/src/app/common/common.tsx +++ b/src/app/common/common.tsx @@ -1301,7 +1301,7 @@ class ResizableSidebar extends React.Component { const mainSidebarModel = GlobalModel.mainSidebarModel; const collapsed = mainSidebarModel.getCollapsed(); - this.resizeStartWidth = collapsed ? MagicLayout.MainSidebarMinWidth : mainSidebarModel.getWidth(); + this.resizeStartWidth = mainSidebarModel.getWidth(); document.addEventListener("mousemove", this.onMouseMove); document.addEventListener("mouseup", this.stopResizing);