Panel collapse fixes
This commit is contained in:
@@ -66,8 +66,8 @@ angular.module('app')
|
|||||||
let width = authManager.getUserPrefValue("notesPanelWidth");
|
let width = authManager.getUserPrefValue("notesPanelWidth");
|
||||||
if(width) {
|
if(width) {
|
||||||
this.panelController.setWidth(width);
|
this.panelController.setWidth(width);
|
||||||
if(this.panelController.isCollapsed) {
|
if(this.panelController.isCollapsed()) {
|
||||||
$rootScope.$broadcast("panel-resized", {panel: "notes", collapsed: this.panelController.isCollapsed})
|
$rootScope.$broadcast("panel-resized", {panel: "notes", collapsed: this.panelController.isCollapsed()})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,8 +47,8 @@ angular.module('app')
|
|||||||
let width = authManager.getUserPrefValue("tagsPanelWidth");
|
let width = authManager.getUserPrefValue("tagsPanelWidth");
|
||||||
if(width) {
|
if(width) {
|
||||||
this.panelController.setWidth(width);
|
this.panelController.setWidth(width);
|
||||||
if(this.panelController.isCollapsed) {
|
if(this.panelController.isCollapsed()) {
|
||||||
$rootScope.$broadcast("panel-resized", {panel: "tags", collapsed: this.panelController.isCollapsed})
|
$rootScope.$broadcast("panel-resized", {panel: "tags", collapsed: this.panelController.isCollapsed()})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,16 +56,19 @@ class PanelResizer {
|
|||||||
// Handle Double Click Event
|
// Handle Double Click Event
|
||||||
var widthBeforeLastDblClick = 0;
|
var widthBeforeLastDblClick = 0;
|
||||||
resizerColumn.ondblclick = () => {
|
resizerColumn.ondblclick = () => {
|
||||||
var collapsed = $scope.isCollapsed();
|
|
||||||
$timeout(() => {
|
$timeout(() => {
|
||||||
if(collapsed) {
|
var preClickCollapseState = $scope.isCollapsed();
|
||||||
|
if(preClickCollapseState) {
|
||||||
$scope.setWidth(widthBeforeLastDblClick || $scope.defaultWidth);
|
$scope.setWidth(widthBeforeLastDblClick || $scope.defaultWidth);
|
||||||
} else {
|
} else {
|
||||||
widthBeforeLastDblClick = lastWidth;
|
widthBeforeLastDblClick = lastWidth;
|
||||||
$scope.setWidth(minWidth);
|
$scope.setWidth(minWidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.finishSettingWidth();
|
$scope.finishSettingWidth();
|
||||||
$scope.onResizeFinish()(lastWidth, lastLeft, $scope.isAtMaxWidth(), collapsed);
|
|
||||||
|
var newCollapseState = !preClickCollapseState;
|
||||||
|
$scope.onResizeFinish()(lastWidth, lastLeft, $scope.isAtMaxWidth(), newCollapseState);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user