Sie sind nicht angemeldet.

1

Freitag, 12. Januar 2018, 01:25

javascript event handlers

Hello!

Just a quick question, if I create event handlers in JS, something like this:

Quellcode

1
2
3
4
var hotspot = krpano.addhotspot("test");
hotspot.onover = function() {
   console.log("hello");
}


It works fine, but if these hotspots are created in a loop so the hotspot object changes a given number of times, how would you access the actual hotspot the event was fired from inside the handler? Without krpano scripting I mean...


Never mind, figured it out already. Note to self: next time think harder before asking stupid questions. *rolleyes* *squint*

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »webseta« (12. Januar 2018, 01:35)