javascript event handlers

  • Hello!

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

    Code
    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*

    Edited once, last by webseta (January 12, 2018 at 1:35 AM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!