Hello,
I recently changed up my structure for goJS in Vue to have its myDiagram in a diagram component. In my diagram component, my myDiagram.model is behaving strangely.
I am using :
myDiagram.model = $(go.GraphLinksModel, { linkFromPortIdProperty: 'fromPort', // required information: linkToPortIdProperty: 'toPort', // identifies data property names nodeDataArray: this.modelData.nodeDataArray, linkDataArray: this.modelData.linkDataArray })
To alter the model. If I do console.log(myDiagram.model) and check the console, linkFromPortIdProperty is set to ‘fromPort’ and so forth, which seems good. And to do more checking, since I altered the linkTemplate prior to the model, if I do console.log(myDiagram.linkTemplate) the routing and corners are set to Orthogonal and 3 respectively. However, if I console.log(myDiagram) and look for the model and linkTemplate objects, the linkTemplate is updated but the model is not. This is causing my diagram to no link correctly. Any idea why this is happening?
My full diagram component can be found here: https://pastebin.com/904RPUY5