[Toolbar] hide toolbar when in browse mode (#2278)

* Hide toolbar when not editing and the selected object has no toolbar.

* Remove unused code
This commit is contained in:
Pegah Sarram
2019-01-28 15:52:03 -08:00
committed by Deep Tailor
parent baa5d10009
commit 1dc1cc6c24
3 changed files with 25 additions and 13 deletions

View File

@@ -52,9 +52,18 @@ define([
layoutObject: domainObject
},
el: element,
template: '<flexible-layout-component></flexible-layout-component>'
template: '<flexible-layout-component ref="flexibleLayout"></flexible-layout-component>'
});
},
getSelectionContext: function () {
return {
item: domainObject,
addContainer: component.$refs.flexibleLayout.addContainer,
deleteContainer: component.$refs.flexibleLayout.deleteContainer,
deleteFrame: component.$refs.flexibleLayout.deleteFrame,
type: 'flexible-layout'
};
},
destroy: function (element) {
component.$destroy();
component = undefined;