Page 1 of 1

html ID for hotspots

Posted: Mon Dec 19, 2022 4:59 pm
by Curtisio
Hi,

Is there a way to assign a html ID to a hotspot? I'm trying to implement a bit of JS in my code to make a hotspot appear after an settimeout by hotspots don't appear to be given an ID in the html.

Any help appreciated.

Re: html ID for hotspots

Posted: Tue Dec 20, 2022 8:03 am
by christoph
Hi!
Our player has a function 'getCurrentPointHotspots()', that gives you an array of all the hotspots present in the current node.
Each element in that array has a property 'ggId', that contains the ID of the hotspot template in the skin editor. (So you can then filter for all hotspots that have a certain id....)

Regards,
Christoph

Re: html ID for hotspots

Posted: Tue Dec 20, 2022 8:44 am
by Curtisio
Thanks Christoph but I need the actual element in the html to be assigned an ID so I can dynamically load text into the hotspot's text box. I maybe able to use your method to loop through the hotspots and assign IDs dynamically using JS.

Re: html ID for hotspots

Posted: Tue Dec 20, 2022 1:43 pm
by christoph
Our skin elements in general have no (html) id.
Also hotspots are dynamically cloned for each node, and there could be many for each hotspot template, so what would that id be?

Anyway, the player function that gives you an array of all current point hotspots will give you all hotspots anyway, so you should be able to access and manipulate them from there.

Regards,
Christoph

Re: html ID for hotspots

Posted: Tue Dec 20, 2022 2:27 pm
by Curtisio
I'm using pano.getPointHotspotIds() then Jquery.reverse(). Then I loop through the array to assign html IDs. Working well at the moment :D