Issue with toJSON() in JointJS 4.0 Not Reflecting All attrs #2859
-
IntroductionI am using the I have implemented the official Pool, Swimlane, and Phase demo, and when I convert the graph to JSON, the output of the cells array is as follows:
However, the graph itself correctly displays all the attrs properties when logged in the console:
How can I ensure that all attributes are included in the JSON representation? Any insights or solutions would be greatly appreciated! Steps to reproduceNo response Restrictions & ConstraintsNo response Does your question relate to JointJS or JointJS+. Select both if applicable.JointJS+ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You need version const json = graph.toJSON({ cellAttributes: { ignoreDefaults: false }}); See docs. |
Beta Was this translation helpful? Give feedback.
Please see #1355 (comment).