hotspots reordered, why?

  • I am adding a number of hotspots with this code:

    inc(hotspot_num); addhotspot(get(hotspot_num));

    Then I am saving some hotspots parameters using this loop:

    copy(numhotspot, hotspot.count);

    for(set(i,0), i LT numhotspot, inc(i),

    ...);

    When saved, sometimes the hotspots are ordered differently than originally created. Why?

    I can come up with a workaround, but it forces me to do the bookkeeping. I would hope krpano can do this for us.



  • Hi,

    regarding to this code:

    inc(hotspot_num); addhotspot(get(hotspot_num));

    it seems you are using numbers as hotspot names - but this shouldn't be done!
    see here:
    https://krpano.com/docu/xml/#name-notes

    When a name begins with an number, then the name is interpreted as 'index', and this way you can access/overwrite other elements!

    To avoid such always start a name with an alphabetic character!
    In the next krpano release - using names with an number at the beginning will provide a dedicated error!

    Best regards,
    Klaus

Jetzt mitmachen!

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