Fixes panel resizing issue where resizing window to be smaller would commit panel width to smaller width and not re-expand after window is expanded

This commit is contained in:
Mo Bitar
2019-04-01 12:03:31 -05:00
parent 9449ec5ca2
commit 5ad3904cf5
2 changed files with 20 additions and 18 deletions

View File

@@ -525,17 +525,19 @@ angular.module('app')
this.leftResizeControl = {};
this.rightResizeControl = {};
this.onPanelResizeFinish = function(width, left, isMaxWidth) {
this.onPanelResizeFinish = (width, left, isMaxWidth) => {
if(isMaxWidth) {
authManager.setUserPrefValue("editorWidth", null);
} else {
if(width !== undefined && width !== null) {
authManager.setUserPrefValue("editorWidth", width);
this.leftResizeControl.setWidth(width);
}
}
if(left !== undefined && left !== null) {
authManager.setUserPrefValue("editorLeft", left);
this.rightResizeControl.setLeft(left);
}
authManager.syncUserPreferences();
}
@@ -560,11 +562,13 @@ angular.module('app')
let width = authManager.getUserPrefValue("editorWidth", null);
if(width !== null) {
this.leftResizeControl.setWidth(width);
this.rightResizeControl.setWidth(width);
}
let left = authManager.getUserPrefValue("editorLeft", null);
if(left !== null) {
this.leftResizeControl.setLeft(left);
this.rightResizeControl.setLeft(left);
}
}
}