Prepare rendering of basic element tree
This commit is contained in:
parent
d2447d2d8a
commit
03ebc87aa5
@ -19,7 +19,31 @@
|
||||
|
||||
<div class="element-tree">
|
||||
<div class="html-element-boxes">
|
||||
|
||||
<div
|
||||
v-for="(element, index) of elementStack"
|
||||
:key="index"
|
||||
class="element-row"
|
||||
>
|
||||
<div class="status">
|
||||
</div>
|
||||
<div class="element-data">
|
||||
<div class="tag">
|
||||
{{element.tagName}}
|
||||
</div>
|
||||
<div v-if="element.id" class="id">
|
||||
{{element.id}}
|
||||
</div>
|
||||
<div v-if="element.classList" id="class-list">
|
||||
{{element.classList}}
|
||||
</div>
|
||||
<div class="dimensions">
|
||||
{{element.width}} x {{element.height}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="css-fixes">
|
||||
<!-- todo: generate buttons with some of the common css lines I always end up adding -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="element-config">
|
||||
</div>
|
||||
@ -38,7 +62,7 @@ export default({
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
elementStack: []
|
||||
};
|
||||
},
|
||||
mixins: [],
|
||||
@ -48,12 +72,18 @@ export default({
|
||||
'eventBus',
|
||||
'site'
|
||||
],
|
||||
created() {
|
||||
this.eventBus.subscribe('uw-player-tree', {function: (elementStack) => this.handleElementStack(elementStack)});
|
||||
},
|
||||
mounted() {
|
||||
|
||||
this.eventBus.sendToTunnel('get-player-tree'); // TODO: implement this in PlayerData
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
|
||||
handleElementStack(elementStack) {
|
||||
this.elementStack = elementStack;
|
||||
this.$nextTick( () => this.$forceUpdate() );
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user