cognitedata / reveal

Cognite Reveal 3D viewer

Home Page:https://cognitedata.github.io/reveal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to order html overlays by distance

hkot1991 opened this issue · comments

Is it possible to order html overlay by distance? So that e.g. the element with html overlay closes to the camera is displayed on top of the other html overlays?
Now it seems to be ordered in the order it was added

I haven't tried this, but have you tested using positionUpdateCallback and using CSS z-index to control order?

https://cognitedata.github.io/reveal-docs/docs/API%20Reference#htmloverlayoptions
https://www.w3schools.com/cssref/pr_pos_z-index.asp

@larsmoa sorry for the late reply. I did try that initially however I have other html objects that is required to be above the overlays.
So I tried using the distance as z-index, but this will easily block other parts of the html with its sometimes super high z-index

But I will do some more testing, maybe there is a way to use z-index without the overlays being on top of other html element.
Thanks for the answer ;)