Sie sind nicht angemeldet.

1

Mittwoch, 11. Januar 2012, 12:07

Get event.x and event.y on onclick event over a hotspot

Hi,

Is there a way to get the event or the coordinates of the click event on a hotspot (like the HTML map area tags for an image) ?
something like :

Quellcode

1
<hotspot onclick="js(my_function(event.mousex,event.mousey))"


Thanks

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »lpe_56« (11. Januar 2012, 14:50)


2

Donnerstag, 12. Januar 2012, 16:58

Hi,

there are the "mouse.x" and "mouse.y" variables:
http://krpano.com/docu/actions/#mouse.x

e.g.

Quellcode

1
onclick="js(my_function(get(mouse.x),get(mouse.y)))"
should work, but these variables are not relative to the hotspot, they are relative to the top-left edge of the pano area,

best regards,
Klaus