Similar to How to add Node data and Link data dynamically in GoJS?, but I want to handle the user adding a link by adding one of my custom objects. In other words, at setup time, I have the following:
customArray: MyModel[] = getMyLinkArray();
this.diagram.model.addLinkDataCollection(customArray)
Now when the user goes to add a link, I want to add a link that is derived from a MyModel object I will supply. It should get the gojs properties added in the same way as is done in addLinkDataCollection.
Presumably this means I should intercept a call somewhere, supply my model object, and tell gojs to use that. But I'm not sure what to intercept, how, or even if it is possible.
Can I do that?