diff --git a/packages/editor/test/playground/map-render/html/viewmode.html b/packages/editor/test/playground/map-render/html/viewmode.html
index 6122f96e..d2351e79 100644
--- a/packages/editor/test/playground/map-render/html/viewmode.html
+++ b/packages/editor/test/playground/map-render/html/viewmode.html
@@ -24,6 +24,7 @@
+
diff --git a/packages/editor/test/playground/map-render/samples/bug7.wxml b/packages/editor/test/playground/map-render/samples/sample8.wxml
similarity index 100%
rename from packages/editor/test/playground/map-render/samples/bug7.wxml
rename to packages/editor/test/playground/map-render/samples/sample8.wxml
diff --git a/packages/mindplot/src/components/persistence/XMLSerializerPela.ts b/packages/mindplot/src/components/persistence/XMLSerializerPela.ts
index cabe08c4..9f163618 100644
--- a/packages/mindplot/src/components/persistence/XMLSerializerPela.ts
+++ b/packages/mindplot/src/components/persistence/XMLSerializerPela.ts
@@ -226,14 +226,6 @@ class XMLSerializerPela implements XMLMindmapSerializer {
return result;
}
- /**
- * @param dom
- * @param mapId
- * @throws will throw an error if dom is null or undefined
- * @throws will throw an error if mapId is null or undefined
- * @throws will throw an error if the document element is not consistent with a wisemap's root
- * element
- */
loadFromDom(dom: Document, mapId: string) {
$assert(dom, 'dom can not be null');
$assert(mapId, 'mapId can not be null');
@@ -415,6 +407,16 @@ class XMLSerializerPela implements XMLMindmapSerializer {
}
});
+ // Workaround: for some reason, some saved maps have holes in the order.
+ topic
+ .getChildren()
+ .forEach((child, index) => {
+ if (child.getOrder() !== index) {
+ child.setOrder(index);
+ console.log('Toppic with order sequence hole. Introducing fix.');
+ }
+ });
+
return topic;
}