![]() |
Source code |
1 |
style="transform:translateZ(1000000000000px)" |
Hi,
that's a known Chrome bug that happens in the combination of using zIndex + CSS3D transforms (and krpano uses CSS3D transforms for faster rendering of the layers).
One workaround would be adding such style to the related html element:
![]()
Source code
1 style="transform:translateZ(1000000000000px)"
Btw - krpano will soon stop using any zIndex internally and sort the DOM elements instead. The zindex usage is still a relict from older times where this was necessary because of buggy CSS3D support from some browsers.
Best regards,
Klaus
Sorry, but thought you had already set a zIndex setting.
Just try adding that (with a value higher than ~4000), that should be enough due my tests (at least in the current browser versions).
Here a simple test case - click the polygonal hotspot:
https://krpano.com/examples/javascript3/
![]() |
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
<layer name="my_html_stuff" type="container" align="lefttop" width="100%" height="100%" bgcapture="true" capture="false" handcursor="false" onloaded="add_div();" /> <action name="add_div" type="Javascript" ><![CDATA[ var div = document.createElement("div"); var title = document.createElement('h2'); title.innerHTML = "This is a html div"; div.appendChild(title); var line = document.createElement('hr'); div.appendChild(line); var linebreak = document.createElement('br'); div.appendChild(linebreak); var content = document.createElement('p'); content.innerHTML = "This is a <a href='https://krpano.com'>link</a>..."; div.appendChild(content); caller.sprite.appendChild(div); ]]></action> |
How to sent mouse events to that html div ?
How do you mean that?
Hi,
that's a known Chrome bug that happens in the combination of using zIndex + CSS3D transforms (and krpano uses CSS3D transforms for faster rendering of the layers).
One workaround would be adding such style to the related html element:
![]()
Source code
1 style="transform:translateZ(1000000000000px)"
Btw - krpano will soon stop using any zIndex internally and sort the DOM elements instead. The zindex usage is still a relict from older times where this was necessary because of buggy CSS3D support from some browsers.
Best regards,
Klaus
Thanks Klaus but it doesn't seems to work ?
I added div.style.transform = "translateZ(1000000000000px)";
Exemple online updated
fixed?Hi,
that's a known Chrome bug that happens in the combination of using zIndex + CSS3D transforms (and krpano uses CSS3D transforms for faster rendering of the layers).
One workaround would be adding such style to the related html element:
![]()
Source code
1 style="transform:translateZ(1000000000000px)"
Btw - krpano will soon stop using any zIndex internally and sort the DOM elements instead. The zindex usage is still a relict from older times where this was necessary because of buggy CSS3D support from some browsers.
Best regards,
Klaus
Thanks Klaus but it doesn't seems to work ?
I added div.style.transform = "translateZ(1000000000000px)";
Exemple online updated