Type based identification


is it posible to identify objects by their type? For example let’s imagine a polyline consisting of several nodes connected by links. Now we want to have the ability to only select nodes and append that polyline Does GoJS support this kind of type based identification by default?

Well, if you have a Node (or really, any Part), you can look at its Part.data to examine any of the model data object’s properties – whatever you have defined in your app.

You can set Part.selectable to false on each Link to prevent users from selecting links.

I’m not sure what you mean by “append that polyline”. Maybe you only want to allow users to select nodes that are at the end of a chain?