Sie sind nicht angemeldet.

1

Sonntag, 18. Juni 2017, 16:17

A small bug perhaps?

I just found something that might be a small bug. I'm using 1.19-pr8 though, mind you.

So I'm creating a hotspot inside of a JS plugin like this:

Quellcode

1
var myhotspot = krpano.addhotspot("myhotspot");


Then later on in the code I'm changing it's name, like this:

Quellcode

1
 myhotspot.name = "newname";


And then on a specific user interaction, when I want to remove this hotspot, this doesn't work:

Quellcode

1
krpano.removehotspot("newname");


but this does:

Quellcode

1
krpano.removehotspot("myhotspot");


Even though I double checked and the hotspot's name has indeed been updated, well, at least that's what krpano reports back to me.

2

Montag, 19. Juni 2017, 10:37

Hi,

the name setting is very special one - changing it is possible but only via the krpano APIs.

E.g.

Quellcode

1
krpano.set("hotspot[myhotspot].name", "newname");


When changing the 'name' property directly via JS, the viewer itself is not aware about that change.

Best regards,
Klaus

3

Montag, 19. Juni 2017, 20:34

Thanks for clearing that up! Cheers!