Highlighting / Selecting a junction node in the workspace

Hi There,

So following up from importing junction nodes, I've gone into the weeds and want to highlight a junction node. (Long story but I now have a list of duplicate nodes including junctions.)

Something like

RED.view.select("<junction node id>")
-- or
RED.view.reveal("<junction node id>")

This works fine for everything else that has an id except for junction nodes. So I thought, ok I'll do this with jQuery:

$('#<junction node id>').trigger('click')

To my surprise, I noticed that the markup for a junction node looks like this:

<g>
  <g class="red-ui-flow-junction" transform="translate(897.6967769861221,528.75)">
    <rect class="red-ui-flow-junction-background" x="-5" y="-5" width="10" height="10" rx="3" ry="3"></rect>
    <rect class="red-ui-flow-junction-port red-ui-flow-junction-port-input" x="-5" y="-5" width="10" height="10" rx="3" ry="3"></rect>
    <rect class="red-ui-flow-junction-port red-ui-flow-junction-port-output" x="-5" y="-5" width="10" height="10" rx="3" ry="3"></rect>
  </g>
</g>

Wait, what no id!?! Normally the top-level <g> has the id but not for a junction node.

Anyway, question is: is there a reason that junction nodes have no id? Is there a deeper no-go for not attaching the id to the <g>?

I can imagine there hasn't been a use-case for highlighting junction nodes, so it's probably something that has never been needed. Would there be interest in changing that?

Cheers!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.