diff --git a/packages/editor/test/playground/map-render/js/editor.tsx b/packages/editor/test/playground/map-render/js/editor.tsx index bc09334b..5a318e0c 100644 --- a/packages/editor/test/playground/map-render/js/editor.tsx +++ b/packages/editor/test/playground/map-render/js/editor.tsx @@ -30,7 +30,7 @@ const initialization = (designer: Designer) => { }); }; -const persistence = new LocalStorageManager('samples/{id}.wxml', false); +const persistence = new LocalStorageManager('samples/{id}.wxml', false, false); const mapId = 'welcome'; const options: EditorOptions = { zoom: 0.8, diff --git a/packages/editor/test/playground/map-render/samples/order.wxml b/packages/editor/test/playground/map-render/samples/order.wxml new file mode 100644 index 00000000..b0599b02 --- /dev/null +++ b/packages/editor/test/playground/map-render/samples/order.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/mindplot/src/components/persistence/XMLSerializerTango.ts b/packages/mindplot/src/components/persistence/XMLSerializerTango.ts index fbd98485..a0a47be0 100644 --- a/packages/mindplot/src/components/persistence/XMLSerializerTango.ts +++ b/packages/mindplot/src/components/persistence/XMLSerializerTango.ts @@ -411,6 +411,7 @@ class XMLSerializerTango implements XMLMindmapSerializer { if (topic.getType() !== 'CentralTopic') { topic .getChildren() + .sort((a, b) => a.getOrder() - b.getOrder()) .forEach((child, index) => { if (child.getOrder() !== index) { child.setOrder(index);