Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iFrame created with vgl-renderer #1127

Closed
MichelPWeber opened this issue Jan 28, 2021 · 6 comments
Closed

iFrame created with vgl-renderer #1127

MichelPWeber opened this issue Jan 28, 2021 · 6 comments

Comments

@MichelPWeber
Copy link

When inspecting the elements in the browser, I see there is an iframe present which forces the canvas element to a different undesired vertical position.

The template used is:

<template>
  <div>
    <vgl-renderer scene="scene" camera="cam" class="renderer" antialias @mousemove="onmousemove">
    </vgl-renderer>
  </div>
</template>

Here are the elements in the browser:
<div data-v-6b38e6b1="" class="renderer"><iframe style="visibility: hidden; width: 100%; height: 100%; margin-right: -100%; border: none;"></iframe><canvas width="800" height="500" style="display: block; width: 800px; height: 500px;"></canvas></div>

Desktop (please complete the following information):
Chrome Version 87.0.4280.141 (Official Build) (64-bit)
OS Name Microsoft Windows 10 Home Version 10.0.18363 Build 18363

Not clear if this is a bug or I'm doing something incorrect with my implementation.

@h-ikeda
Copy link
Member

h-ikeda commented Jan 29, 2021

Thank you for trying to use VueGL.

Your code seems correct, but maybe you have to adjust styles not to be shown above. #963 might help you.

I'm thinking refactoring this part by using the ResizeObserver. But even after implemented that, some old browsers those don't support the ResizeObserver need the style adjustment.

@MichelPWeber
Copy link
Author

MichelPWeber commented Jan 29, 2021 via email

@h-ikeda
Copy link
Member

h-ikeda commented Jan 29, 2021

Is there documentation on how to handle mouse events from the vgl-renderer?

No, mouse event handlers are not implemented officially yet.

If you want to handle only things not related to rendered object, Vue's usual event handler may work.

If you have to handle object related events, it needs raycasting. Some user likely have tried this by implementing ray caster directly, so might be your help (#550) .

@lutuh
Copy link

lutuh commented Mar 8, 2021

Is there documentation on how to handle mouse events from the vgl-renderer?

In case you are looking for OrbitControls, you might find this useful: #100 (comment)

@arketec
Copy link

arketec commented Aug 12, 2021

I am having the same issue with the iframe pushing down the canvas content, was this ever resolved?

@h-ikeda
Copy link
Member

h-ikeda commented Aug 25, 2021

VueGL v1.0.0 have been released. It must resolve the layout problem since v1 renders the canvas without a wrapper element.

@h-ikeda h-ikeda closed this as completed Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants