mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-22 16:48:23 +01:00
Simplify logic for startResizing width calculation (#269)
* Apply Red's suggestion and move width logic to getWidth * remove unnecessary * a little more * remove comment
This commit is contained in:
parent
81a9e74991
commit
5ce7b92232
@ -1301,7 +1301,7 @@ class ResizableSidebar extends React.Component<ResizableSidebarProps> {
|
|||||||
const mainSidebarModel = GlobalModel.mainSidebarModel;
|
const mainSidebarModel = GlobalModel.mainSidebarModel;
|
||||||
const collapsed = mainSidebarModel.getCollapsed();
|
const collapsed = mainSidebarModel.getCollapsed();
|
||||||
|
|
||||||
this.resizeStartWidth = collapsed ? MagicLayout.MainSidebarMinWidth : mainSidebarModel.getWidth();
|
this.resizeStartWidth = mainSidebarModel.getWidth();
|
||||||
document.addEventListener("mousemove", this.onMouseMove);
|
document.addEventListener("mousemove", this.onMouseMove);
|
||||||
document.addEventListener("mouseup", this.stopResizing);
|
document.addEventListener("mouseup", this.stopResizing);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user