Skip to content

Commit

Permalink
fix(overlays): correct positioning of html layers
Browse files Browse the repository at this point in the history
  • Loading branch information
Satont committed Sep 18, 2023
1 parent bc9b366 commit af7c5f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions frontend/overlays/src/components/htmlLayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ defineProps<{
}}
</component>
<div
:id="'layer' + layer.id"
style="position: absolute; overflow: hidden; 'text-wrap': 'nowrap'"
:style="{
top: layer.pos_y,
left: layer.pos_x,
width: layer.width,
height: layer.height,
top: `${layer.pos_y}px`,
left: `${layer.pos_x}px`,
width: `${layer.width}px`,
height: `${layer.height}px`,
}"
:id="'layer' + layer.id"
v-html="parsedData"
/>
</template>
6 changes: 3 additions & 3 deletions frontend/overlays/src/pages/overlays.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import { watch } from 'vue';
import { useRoute } from 'vue-router';
import { useOverlays } from '../sockets/overlays';
import htmlLayer from '../components/htmlLayer.vue';
import { useOverlays } from '../sockets/overlays';
const route = useRoute();
Expand Down Expand Up @@ -38,7 +38,7 @@ watch(layers, (l) => {

<style scoped>
.container {
width: '100%';
height: '100%';
width: 100%;
height: 100%;
}
</style>

0 comments on commit af7c5f9

Please sign in to comment.