PanelExpanderButton state

I have a question about the PanelExpanderButton.
How can I save the folded or expanded state of the PanelExpanderButton in DB?
Are state values ​​stored in JSON?

In general if you have code (including tools and commands) that modify GraphObjects and you want to save their modified state to your model, use a TwoWay Binding.

Since the “PanelExpanderButton”, whose definition you can see in, toggles the GraphObject.visible property of the object that is shown or hidden, you just need to add a

  new go.Binding("visible").makeTwoWay()


  new go.Binding("visible", "expanded").makeTwoWay()

on the object being shown or hidden.