Limit selection to nodes or links


What would be the easiest way to limit the selection to only nodes or links based on a variable? I was thinking of adding this variable to the modelData and put a databinding on the selectable property or is there an easier way?


It depends on how your app is designed. Some people just put all of their Nodes in one Layer and all their Links in another Layer, so that their app can toggle the Layer.allowSelect property and similar permission properties.

Template-wise that is just a matter of setting the Part.layerName property in the templates.

That would be indeed a more neat option! Thanks!