html ID for hotspots

Q&A about the latest versions
Post Reply
Curtisio
Posts: 35
Joined: Wed Jan 09, 2013 8:29 pm

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.
christoph
Gnome
Posts: 108
Joined: Mon Aug 20, 2012 3:01 pm

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
Curtisio
Posts: 35
Joined: Wed Jan 09, 2013 8:29 pm

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.
christoph
Gnome
Posts: 108
Joined: Mon Aug 20, 2012 3:01 pm

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
Curtisio
Posts: 35
Joined: Wed Jan 09, 2013 8:29 pm

I'm using pano.getPointHotspotIds() then Jquery.reverse(). Then I loop through the array to assign html IDs. Working well at the moment :D
Post Reply