Highlighting node with diffrent templatemap

I want to highlight nodes with separate categories when one of the node is selected and clear highlight when nothing selected.

I’m not sure exactly what behavior you want. I’ll guess that you have defined two node templates. Let’s call them “A” and “B”, and you want to show “A” normally and “B” when the node is selected. To accomplish this, add this Binding to both node templates:

    new go.Binding("category", "isSelected", s => s ? "B" : "A").ofObject(),

I hope there are enough differences between the two templates to warrant having two separate templates rather than just some bindings in one template to change its appearance.

Thanks Walter!