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);
}
}