[Inspector] More vue
commit 9b735b4f70bf4d21f64a1e418a5f9d7342567104 Author: Pete Richards <peter.l.richards@nasa.gov> Date: Fri Aug 31 16:31:48 2018 -0700 Slight HTML tweak commit 3e58e140f9ea3640e5551d5f43abf837610c6fb4 Author: Pete Richards <peter.l.richards@nasa.gov> Date: Fri Aug 31 16:26:36 2018 -0700 [Inspector] Wire up elements pool Elements pool wired up to show angular elements pool. commit d9c60f31bd6d32a5d2e2227d5476edd81e2e4360 Author: Pete Richards <peter.l.richards@nasa.gov> Date: Fri Aug 31 13:56:04 2018 -0700 [Inspector] vue inspector Create a vue inspctor which responds to selection events and shows object properties and inspector views.
This commit is contained in:
42
src/ui/components/inspector/Location.vue
Normal file
42
src/ui/components/inspector/Location.vue
Normal file
@@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<div class="grid-properties">
|
||||
<h2 title="The location of this linked object.">Location</h2>
|
||||
<ul class="l-inspector-part">
|
||||
<li class="grid-row">
|
||||
<div class="grid-cell label">This Link</div>
|
||||
<div class="grid-cell value">TODO</div>
|
||||
</li>
|
||||
<li class="grid-row">
|
||||
<div class="grid-cell label">Original</div>
|
||||
<div class="grid-cell value">TODO</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
inject: ['openmct'],
|
||||
data() {
|
||||
return {
|
||||
domainObject: {}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.openmct.selection.on('change', this.updateSelection);
|
||||
this.updateSelection(this.openmct.selection.get());
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.openmct.selection.off('change', this.updateSelection);
|
||||
},
|
||||
methods: {
|
||||
updateSelection(selection) {
|
||||
if (selection.length === 0) {
|
||||
this.domainObject = {};
|
||||
return;
|
||||
}
|
||||
this.domainObject = selection[0].context.item;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user