Currently we’re using model’s node array and link array for all the data and bindings but there are some states that are not specific to a single node. For instance, I want to have a mode
which could get design | view
value depending on some toggle buttons on the page.
Is there anyway we can store this state on then diagram and in the bindings use it. Something like these imaginary snippets:
// Usage
.bind(new go.Binding('fill', 'blah', blah => {
return diagram.state.mode === 'design' ? blah : "default";
}))
// Update
diagram.commitState('mode', 'view');