Skip to content

Commit

Permalink
Simplify logic for startResizing width calculation (#269)
Browse files Browse the repository at this point in the history
* Apply Red's suggestion and move width logic to getWidth

* remove unnecessary

* a little more

* remove comment
  • Loading branch information
esimkowitz committed Jan 31, 2024
1 parent 81a9e74 commit 5ce7b92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/common/common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,7 @@ class ResizableSidebar extends React.Component<ResizableSidebarProps> {
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);

Expand Down

0 comments on commit 5ce7b92

Please sign in to comment.