Hotspot - get(pic)===null

  • Hi to everybody!
    I'm testing the examples\virtual-tours\demotour-weingut example of krpano:

    https://krpano.com/tours/weingut/

    When i open the hotspot of green picture, it call the action "showpic()".
    In this action the first control is:

    Code
    if(hotspot[get(pic)] === null, ...

    The function get(pic) return "bildgruen", it is the value of the attribute "pic"..why this and not another pic value?

    I don't understand what does the comparing ===null and the value of "hotspot[get(pic)]"

    thanks to all

  • "I don't understand what does the comparing ===null and the value of "hotspot[get(pic)]""

    When the "showpic()" is called, new hotspot with the name of pic is created.
    if the hotspot was created already, just call the flyin().
    if not, the creation process is called.

    So, you need to check the hotspot is there or not.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!