* [Imagery] Click on image to get a large view #3582 * Created new viewLargeAction. * Changes in view registry to add parent element property inside view object. * Separate class for views and added missing changes for LadTableSet. * Renamed callBack to onItemClicked. Co-authored-by: Andrew Henry <akhenry@gmail.com>
46 lines
1.1 KiB
JavaScript
46 lines
1.1 KiB
JavaScript
import LadTable from './components/LADTable.vue';
|
|
|
|
import Vue from 'vue';
|
|
|
|
export default class LADTableView {
|
|
constructor(openmct, domainObject, objectPath) {
|
|
this.openmct = openmct;
|
|
this.domainObject = domainObject;
|
|
this.objectPath = objectPath;
|
|
this.component = undefined;
|
|
}
|
|
|
|
show(element) {
|
|
this.component = new Vue({
|
|
el: element,
|
|
components: {
|
|
LadTable
|
|
},
|
|
provide: {
|
|
openmct: this.openmct,
|
|
currentView: this
|
|
},
|
|
data: () => {
|
|
return {
|
|
domainObject: this.domainObject,
|
|
objectPath: this.objectPath
|
|
};
|
|
},
|
|
template: '<lad-table ref="ladTable" :domain-object="domainObject" :object-path="objectPath"></lad-table>'
|
|
});
|
|
}
|
|
|
|
getViewContext() {
|
|
if (!this.component) {
|
|
return {};
|
|
}
|
|
|
|
return this.component.$refs.ladTable.getViewContext();
|
|
}
|
|
|
|
destroy(element) {
|
|
this.component.$destroy();
|
|
this.component = undefined;
|
|
}
|
|
}
|