|
Hi, \nI have some issue when serializing graph with edges routed manually by the user, the "points array" or abs are not saved in the xml file. \nI use a class for edge called Line that extend mxCell \n\n} \nI registered the codec like this: \n\nwhen i save the graph, it gives me this xml code: \n\nbut I would something like in the original graph editor example with the geometry data and where points array appears: \n\nI tied to add "geometry" in \n\nbut no changes. \nAny suggestions? \nThanks for help and for your time. |
|
The properties of the object created with an empty constructor are considered default values and are not written out. Try changing the default geometry of the instances or set codec.setEncodeDefaults(false). |
|
It seems that the problem come from the call inside the empty constructor to the constructor with "constant" value so it is not needed to write out this CONSTANT. It does make sense. \nWith the following empty constructor, it fixed the problem but I have an issue with old xml that not contains geometry for edges, so it does not appear when displaying the graph \n\n} \nI think a solution is to cross through the model after loading the xml and to add geometry object to such edges that do not have. \nA better idea? |
|
Probably the easiest solution. Alternatively you could implement mxCellCodec.afterDecode. |