Editor stack reload

This commit is contained in:
Mo Bitar
2018-01-27 09:53:59 -06:00
parent 61843b1472
commit 5c6edfbc74
3 changed files with 6 additions and 12 deletions

View File

@@ -420,7 +420,6 @@ angular.module('app')
*/
componentManager.registerHandler({identifier: "editor", areas: ["note-tags", "editor-stack", "editor-editor"], activationHandler: function(component){
if(component.area === "note-tags") {
// Autocomplete Tags
this.tagsComponent = component.active ? component : null;
@@ -431,6 +430,8 @@ angular.module('app')
} else {
this.selectedEditor = null;
}
} else if(component.area == "editor-stack") {
this.reloadComponentContext();
}
}.bind(this), contextRequestHandler: function(component){
return this.note;
@@ -487,7 +488,7 @@ angular.module('app')
this.componentStack = componentManager.componentsForArea("editor-stack");
for(var component of this.componentStack) {
if(component.active) {
component.hidden = component.isExplicitlyDisabledForItem(this.note);
component.hidden = !this.note || component.isExplicitlyDisabledForItem(this.note);
}
}

View File

@@ -119,15 +119,7 @@ $heading-height: 75px;
.component-stack-item {
width: 100%;
position: relative;
&:not(:last-child) {
border-bottom: 1px solid $bg-color;
}
&:first-child {
border-top: 1px solid $bg-color;
}
border-top: 1px solid $bg-color;
iframe {
width: 100%;
}

View File

@@ -53,4 +53,5 @@
%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.
#editor-pane-component-stack
%component-view.component-view.component-stack-item.border-color{"ng-repeat" => "component in ctrl.componentStack", "ng-if" => "component.active", "ng-show" => "!component.hidden", "manual-dealloc" => "true", "component" => "component"}
%component-view.component-view.component-stack-item.border-color{"ng-repeat" => "component in ctrl.componentStack",
"ng-if" => "component.active", "ng-show" => "!component.hidden", "manual-dealloc" => "true", "component" => "component"}