votetake/vue-unity-webgl

Fullscreen button bug

Greathyx opened this issue · 1 comments

When I use hideFooter=true in tag, it does not seem to hide the footer. I still got it and the display of is seems to contain text and the picture at the same time, which is a little bit ugly.
image

I think the issue is that the unity component isn't designed to be ran with the current styling. A kind of hacky solution for this is to select the element with the fullscreen class in the mounted lifecycle hook and set its text content to an empty string,

<!-- the components footer html as is-->
<div class="footer" v-if="hideFooter !== true">
  <a class="fullscreen" @click.prevent="fullscreen">Fullscreen</a>
</div>
mounted() {
  document.querySelector('.fullscreen').textContent = ''
},

I tried updating the Unity components html to match the current build template directly, but it didn't seem to change anything for some reason. I can only assume it's because of the javaScript?. Unfortunately the text will still be there for a split second on first load or if the page is refreshed.

Alternatively you could just not include the /Buiild/style.css file in your project. Then there will only be the text.