Move persistence clases to persistence package.

This commit is contained in:
Paulo Gustavo Veiga
2012-02-25 23:32:15 -03:00
parent e401d73cb6
commit 9e44804314
29 changed files with 820 additions and 249 deletions

View File

@@ -100,7 +100,7 @@
// Store SVG o native map...
if (suffix == "freemind") {
var mindmap = designer.getMindmap();
var serializer = mindplot.XMLMindmapSerializerFactory.getSerializerFromMindmap(mindmap);
var serializer = mindplot.persistence.XMLSerializerFactory.getSerializerFromMindmap(mindmap);
var domMap = serializer.toXML(mindmap);
form.mapXml.value = core.Utils.innerXML(domMap);
} else {

View File

@@ -29,12 +29,12 @@
// Load map from XML file persisted on disk...
var persistence = mindplot.PersistenceManager.getInstance();
var mindmap;
try {
// try {
mindmap = persistence.load(mapId);
} catch(e) {
// } catch(e) {
// If the map could not be loaded, create a new empty map...
mindmap = mindplot.model.Mindmap.buildEmpty(mapId);
}
// mindmap = mindplot.model.Mindmap.buildEmpty(mapId);
// }
designer.loadMap(mindmap);
});

View File

@@ -42,5 +42,6 @@
<topic position="410,-97" order="2" text="Anyplace, Anytime" id="9"/>
<topic position="386,-73" order="3" text="Free!!!" id="10"/>
</topic>
<topic type="media" size="50,50" image="http://m3.licdn.com/mpr/mpr/shrink_100_100/p/3/000/070/205/1461ef2.jpg" prop="" order="9" position="-336,-100"/>
</topic>
</map>