From 03ebc87aa523cde4c9fefac9928af1d8e9373be1 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Thu, 9 Jun 2022 09:01:30 +0200 Subject: [PATCH] Prepare rendering of basic element tree --- .../PlayerUiPanels/PlayerDetectionPanel.vue | 38 +++++++++++++++++-- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/src/csui/src/PlayerUiPanels/PlayerDetectionPanel.vue b/src/csui/src/PlayerUiPanels/PlayerDetectionPanel.vue index d9ae7fb..a8afbaf 100644 --- a/src/csui/src/PlayerUiPanels/PlayerDetectionPanel.vue +++ b/src/csui/src/PlayerUiPanels/PlayerDetectionPanel.vue @@ -19,7 +19,31 @@
- +
+
+
+
+
+ {{element.tagName}} +
+
+ {{element.id}} +
+
+ {{element.classList}} +
+
+ {{element.width}} x {{element.height}} +
+
+
+ +
+
@@ -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() ); + } } })