The page where I embed krpano needs to know about tap events on mobile, but krpano seems to eat them? Adding a listener to "document.onmousedown" works fine, but "document.onclick" or "document.ontap" does not. Using "<events onclick="js(myTest())"/>" in the sphere.xml gets me the fact that there's an event, but I need the event's properties like x/y coordinates. I aso tried krpano.get("mouse.x") but the values I get are larger than the resolution of my smartphone display so they cannot be right.
get tap event and its position
-
-
Hi,
the values from mouse.x/mouse.y are correct of course, but they are in the krpano coordinate system.
You can multiple the values with stagescale to get the CSS size.
Additionally or alternately you can also set the mobilescale embedding setting to 1.0 to avoid a scaling on mobile devices:
https://krpano.com/docu/html/#mobilescaleBest regards,
Klaus -
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!