Fix editor component stack reload issue

This commit is contained in:
Mo Bitar
2018-01-25 17:23:41 -06:00
parent 8aa79cecf9
commit 074b86aa35
4 changed files with 19 additions and 26 deletions

View File

@@ -5,7 +5,8 @@ class EditorMenu {
this.templateUrl = "directives/editor-menu.html";
this.scope = {
callback: "&",
selectedEditor: "="
selectedEditor: "=",
currentItem: "="
};
}
@@ -49,6 +50,7 @@ class EditorMenu {
currentDefault.setAppDataItem("defaultEditor", false);
currentDefault.setDirty(true);
}
component.setAppDataItem("defaultEditor", true);
component.setDirty(true);
syncManager.sync("makeEditorDefault");
@@ -64,6 +66,10 @@ class EditorMenu {
$scope.defaultEditor = null;
}
$scope.stackComponentEnabled = function(component) {
return component.active && !component.isExplicitlyDisabledForItem($scope.currentItem);
}
}
}