vasturiano / react-globe.gl

React component for Globe Data Visualization using ThreeJS/WebGL
https://vasturiano.github.io/react-globe.gl/example/world-population/
MIT License
904 stars 156 forks source link

htmlAltitude not going to 0 #119

Open IlirBajrami opened 1 year ago

IlirBajrami commented 1 year ago

Describe the bug I cant set the HTML element altitude to 0 even though the docs says its 0 by default and also i set the setting to 0 htmlAltitude={0} but again it stays floating and resulting to wrong location pointing. Seee screenshot:

Screenshot 2023-03-04 at 13 26 46

Screenshot 2023-03-04 at 13 38 39

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

vasturiano commented 1 year ago

@IlirBajrami thanks for reaching out.

The only thing that occurs to me is if your markerSvg has empty space on the side, so the HTML element is actually larger than what's visible, therefore introducing an offset. The lat,lng,alt coordinates are applied to the center of the element, so if there's an asymmetrical margin I can imagine this happening.

If that's not an issue, would you mind making a simple example on https://codesandbox.io/ so we can look closer into it?