Flash panel resizers when enabled
This commit is contained in:
@@ -475,7 +475,8 @@ angular.module('app')
|
||||
|
||||
/* Resizability */
|
||||
|
||||
this.resizeControl = {};
|
||||
this.leftResizeControl = {};
|
||||
this.rightResizeControl = {};
|
||||
|
||||
this.onPanelResizeFinish = function(width, left, isMaxWidth) {
|
||||
if(isMaxWidth) {
|
||||
@@ -511,12 +512,12 @@ angular.module('app')
|
||||
if(this.marginResizersEnabled) {
|
||||
let width = authManager.getUserPrefValue("editorWidth", null);
|
||||
if(width !== null) {
|
||||
this.resizeControl.setWidth(width);
|
||||
this.leftResizeControl.setWidth(width);
|
||||
}
|
||||
|
||||
let left = authManager.getUserPrefValue("editorLeft", null);
|
||||
if(left !== null) {
|
||||
this.resizeControl.setLeft(left);
|
||||
this.leftResizeControl.setLeft(left);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -553,6 +554,11 @@ angular.module('app')
|
||||
this.reloadFont();
|
||||
})
|
||||
}, 0)
|
||||
} else if(key == "marginResizersEnabled" && this[key] == true) {
|
||||
$timeout(() => {
|
||||
this.leftResizeControl.flash();
|
||||
this.rightResizeControl.flash();
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,10 @@ class PanelResizer {
|
||||
scope.control.setLeft = function(value) {
|
||||
scope.setLeft(value);
|
||||
}
|
||||
|
||||
scope.control.flash = function() {
|
||||
scope.flash();
|
||||
}
|
||||
}
|
||||
|
||||
controller($scope, $element, modelManager, actionsManager, $timeout, $compile) {
|
||||
@@ -171,6 +175,13 @@ class PanelResizer {
|
||||
}
|
||||
}
|
||||
|
||||
$scope.flash = function() {
|
||||
resizerColumn.classList.add("animate-opacity");
|
||||
$timeout(() => {
|
||||
resizerColumn.classList.remove("animate-opacity");
|
||||
}, 3000)
|
||||
}
|
||||
|
||||
resizerColumn.addEventListener("mousedown", function(event){
|
||||
$scope.addInvisibleOverlay();
|
||||
|
||||
|
||||
@@ -120,6 +120,20 @@ $footer-height: 32px;
|
||||
border-top: none;
|
||||
border-bottom: none;
|
||||
|
||||
@keyframes fade {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.left {
|
||||
left: 0;
|
||||
right: none;
|
||||
@@ -138,6 +152,12 @@ $footer-height: 32px;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&.animate-opacity {
|
||||
animation-duration: 1.6s;
|
||||
animation-name: fade;
|
||||
animation-delay: 0.25s;
|
||||
}
|
||||
|
||||
&.hoverable {
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
.editor-content#editor-content{"ng-if" => "ctrl.noteReady && !ctrl.note.errorDecrypting"}
|
||||
|
||||
%panel-resizer.left{"ng-if" => "ctrl.marginResizersEnabled", "panel-id" => "'editor-content'", "on-resize-finish" => "ctrl.onPanelResizeFinish","control" => "ctrl.resizeControl", "min-width" => 300, "property" => "'left'", "hoverable" => "true"}
|
||||
%panel-resizer.left{"ng-if" => "ctrl.marginResizersEnabled", "panel-id" => "'editor-content'", "on-resize-finish" => "ctrl.onPanelResizeFinish","control" => "ctrl.leftResizeControl", "min-width" => 300, "property" => "'left'", "hoverable" => "true"}
|
||||
|
||||
%component-view.component-view{"ng-if" => "ctrl.selectedEditor", "component" => "ctrl.selectedEditor"}
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
"ng-focus" => "ctrl.onContentFocus()", "dir" => "auto", "ng-attr-spellcheck" => "{{ctrl.spellcheck}}", "ng-model-options"=>"{ debounce: 200 }"}
|
||||
{{ctrl.onSystemEditorLoad()}}
|
||||
|
||||
%panel-resizer{"ng-if" => "ctrl.marginResizersEnabled", "panel-id" => "'editor-content'", "on-resize-finish" => "ctrl.onPanelResizeFinish","control" => "ctrl.resizeControl", "min-width" => 300, "hoverable" => "true", "property" => "'right'"}
|
||||
%panel-resizer{"ng-if" => "ctrl.marginResizersEnabled", "panel-id" => "'editor-content'", "on-resize-finish" => "ctrl.onPanelResizeFinish", "control" => "ctrl.rightResizeControl", "min-width" => 300, "hoverable" => "true", "property" => "'right'"}
|
||||
|
||||
.section{"ng-if" => "ctrl.note.errorDecrypting"}
|
||||
%p.medium-padding{"style" => "padding-top: 0 !important;"} There was an error decrypting this item. Ensure you are running the latest version of this app, then sign out and sign back in to try again.
|
||||
|
||||
Reference in New Issue
Block a user