I am using a form with an input field to change the label of the currently-selected node in the diagram, outside of the diagram itself.
Nodes have their names bound the usual way to the model:
$(go.TextBlock, new go.Binding(“text”, “name”))
In the form the input used to edit the name uses an Angular binding:
Now, to tell the diagram to take the change into account, I need to call setDataProperty within a transaction.
My code derives from your Angular example: when a transaction is committed, $apply is called. But when the name is being changed in the input field and that input is bound, this triggers an apply too, so I get an error that I am trying to call $apply during an $apply phase.
Basically, I don’t know how or when to call setDataProperty in such a situation. Would you be able to provide me with some tips?