Node ID and Node Changed

Q&A about the latest versions
Post Reply
Mattmatt21
Posts: 4
Joined: Fri Jan 31, 2020 5:23 pm

Node ID and Node Changed

Post by Mattmatt21 » Mon Feb 10, 2020 3:07 pm

I have javaScript code that is run on Node Changed and Before Node Changed and it is working something based on NodeID of the current and previous node. Problem is that I am getting different ids for the same node. For example, I have node7 and node 8 when going from node8 to node7 I get good ids but when going from node7 to node8 I get currentNode: node7, nextNode: node9 instead of node8. I am using pano.getCurrentNode(), pano.getNextNode() and pano.getCurrentNode(). What am I doing wrong?

P.S. Is there a way to get Custom Node ID from javaScript?

christoph
Gnome
Posts: 95
Joined: Mon Aug 20, 2012 3:01 pm

Re: Node ID and Node Changed

Post by christoph » Tue Feb 11, 2020 9:18 am

Hi!
I made a test project + skin.
'On node changed' i read the current node id and the next node id (using the player functions getCurrentNode() and getNextNode()) and i do get correct values.
Can you show me what you are doing exactly?

About the custom node id:
- if you just want to use it in a skin, there is a placeholder '$(ucnode)'
- the custom node id is part of the userdata. so you can retrieve it using Javascript: pano.getNodeUserdata()['customnodeid']

Regards,
Christoph

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 7 guests