* fix: restore reactivity of config settings - move initialization steps to `created()` hook - remove unnecessary `:key` binds - fix comments * refactor: clean up * refactor: clean up * refactor: lint:fix * test(e2e): add regression test and cleanup suite * refactor: consistency is key! * test(fix): fix unit tests, further cleanup
This commit is contained in:
@@ -47,17 +47,16 @@ export default class FlexibleLayoutViewProvider {
|
||||
let component = null;
|
||||
|
||||
return {
|
||||
show: function (element, isEditing) {
|
||||
show(element, isEditing) {
|
||||
const { vNode, destroy } = mount(
|
||||
{
|
||||
el: element,
|
||||
components: {
|
||||
FlexibleLayoutComponent
|
||||
},
|
||||
provide: {
|
||||
openmct: openmct,
|
||||
openmct,
|
||||
objectPath,
|
||||
layoutObject: domainObject
|
||||
domainObject
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -75,7 +74,7 @@ export default class FlexibleLayoutViewProvider {
|
||||
component = vNode.componentInstance;
|
||||
_destroy = destroy;
|
||||
},
|
||||
getSelectionContext: function () {
|
||||
getSelectionContext() {
|
||||
return {
|
||||
item: domainObject,
|
||||
addContainer: component.$refs.flexibleLayout.addContainer,
|
||||
@@ -84,10 +83,10 @@ export default class FlexibleLayoutViewProvider {
|
||||
type: 'flexible-layout'
|
||||
};
|
||||
},
|
||||
onEditModeChange: function (isEditing) {
|
||||
onEditModeChange(isEditing) {
|
||||
component.isEditing = isEditing;
|
||||
},
|
||||
destroy: function (element) {
|
||||
destroy() {
|
||||
if (_destroy) {
|
||||
_destroy();
|
||||
component = null;
|
||||
|
||||
Reference in New Issue
Block a user