have you ever thought about extending the signature for the nodeTemplate property in Diagram in this way?
nodeTemplate: Part | (nodedata: ObjectData) => Part
That would help me a lot.
Our data model for nodes is very complex and varied, and is optimized for specific requirements. For example, we completely avoid arrays. With the capabilities GoJS offers so far, it is not possible for me to create a template that fits the data model. Depending on the specific node data we have to build the Node and also the data binding (i.e. set Panel.data for some subpanel to a specific object in the nodedata).
Currently we only use a very simple default template for our nodes and complement the nodes with additional elements and data binding after their automatic creation.
This seems to work so far, but it is difficult to handle all situations where a node is automatically generated
Thanks a lot