We have a palette with several objects in our Angular application. These objects have several keys. Once after we drag and drop objects on to the screen, we set values for them. Once we set values for them and then we drag and drop new instance of the same object it has the values pre-filled with the values set for the last object. What can we do to have a new instance of the same object without the values pre-filled.
Yes, we are using the gojs palette. We are currently using e.subject.Ea.value.Zd to fetch the node being dragged and dropped onto the screen from the palette. Is there any other way we can achieve this without using the minified property names?
Also, the way we have designed our application we have added extra properties that we need into the palette, each instance will have it’s own unique data for those properties.
So, when we drag and drop a node on to the screen, we fill up a few forms that in turn update the components array of that node in our diagram model. Components array here are for our internal usage and also for display purposes to the user.
Our node looks something like this
As you can see, when we set the values from the forms on to the properties of the node the user can view them here in the last row of the node.
So, the main issue here is that when we have 2 or more nodes of the same palette item the data updated in one node somehow affects the other nodes as well. We need a solution where each instance of the palette item on the screen can be configured uniquely.