Make component errors audible, perform state changes in timeout

This commit is contained in:
Mo Bitar
2018-07-11 16:45:00 -05:00
parent 6d3232a25b
commit 3385306260
2 changed files with 47 additions and 14 deletions

View File

@@ -516,11 +516,17 @@ angular.module('app')
} else if(component.area == "editor-editor") {
// An editor is already active, ensure the potential replacement is explicitely enabled for this item
// We also check if the selectedEditor is active. If it's inactive, we want to treat it as an external reference wishing to deactivate this editor (i.e componentView)
if(this.selectedEditor && this.selectedEditor.active) {
if(component.isExplicitlyEnabledForItem(this.note)) {
this.selectedEditor = component;
if(this.selectedEditor && this.selectedEditor == component && component.active == false) {
this.selectedEditor = null;
}
else if(this.selectedEditor) {
if(this.selectedEditor.active) {
if(component.isExplicitlyEnabledForItem(this.note)) {
this.selectedEditor = component;
}
}
} else {
}
else {
// If no selected editor, let's see if the incoming one is a candidate
if(component.active && this.note && (component.isExplicitlyEnabledForItem(this.note) || component.isDefaultEditor())) {
this.selectedEditor = component;