Page 1 of 1

Node ID and Node Changed

Posted: Mon Feb 10, 2020 3:07 pm
by Mattmatt21
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?

Re: Node ID and Node Changed

Posted: Tue Feb 11, 2020 9:18 am
by christoph
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