-
-
-
-
-
diff --git a/mindplot/src/main/javascript/Designer.js b/mindplot/src/main/javascript/Designer.js
index 844d80a4..f528d2fe 100644
--- a/mindplot/src/main/javascript/Designer.js
+++ b/mindplot/src/main/javascript/Designer.js
@@ -422,41 +422,47 @@ mindplot.Designer = new Class({
$assert(mindmapModel, "mindmapModel can not be null");
this._mindmap = mindmapModel;
- // Init layout manager ...
- var size = {width:25,height:25};
- var layoutManager = new mindplot.layout.LayoutManager(mindmapModel.getCentralTopic().getId(), size);
- layoutManager.addEvent('change', function(event) {
- var id = event.getId();
- var topic = this.getModel().findTopicById(id);
- topic.setPosition(event.getPosition());
- topic.setOrder(event.getOrder());
- }.bind(this));
- this._eventBussDispatcher.setLayoutManager(layoutManager);
+ try {
+ // Init layout manager ...
+ var size = {width:25,height:25};
+ var layoutManager = new mindplot.layout.LayoutManager(mindmapModel.getCentralTopic().getId(), size);
+ layoutManager.addEvent('change', function(event) {
+ var id = event.getId();
+ var topic = this.getModel().findTopicById(id);
+ topic.setPosition(event.getPosition());
+ topic.setOrder(event.getOrder());
+ }.bind(this));
+ this._eventBussDispatcher.setLayoutManager(layoutManager);
- // Building node graph ...
- var branches = mindmapModel.getBranches();
- for (var i = 0; i < branches.length; i++) {
- // NodeModel -> NodeGraph ...
- var nodeModel = branches[i];
- var nodeGraph = this._nodeModelToNodeGraph(nodeModel, false);
+ // Building node graph ...
+ var branches = mindmapModel.getBranches();
+ for (var i = 0; i < branches.length; i++) {
+ // NodeModel -> NodeGraph ...
+ var nodeModel = branches[i];
+ var nodeGraph = this._nodeModelToNodeGraph(nodeModel, false);
- // Update shrink render state...
- nodeGraph.setBranchVisibility(true);
+ // Update shrink render state...
+ nodeGraph.setBranchVisibility(true);
+ }
+
+
+ var relationships = mindmapModel.getRelationships();
+ for (var j = 0; j < relationships.length; j++) {
+ this._relationshipModelToRelationship(relationships[j]);
+ }
+
+ // Place the focus on the Central Topic
+ var centralTopic = this.getModel().getCentralTopic();
+ this.goToNode(centralTopic);
+
+ // Finally, sort the map ...
+ mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.DoLayout);
+
+ this.fireEvent('loadSuccess');
+ } catch(e) {
+ this.fireEvent('loadError',e);
}
-
-
- var relationships = mindmapModel.getRelationships();
- for (var j = 0; j < relationships.length; j++) {
- this._relationshipModelToRelationship(relationships[j]);
- }
-
- // Place the focus on the Central Topic
- var centralTopic = this.getModel().getCentralTopic();
- this.goToNode(centralTopic);
-
- // Finally, sort the map ...
- mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.DoLayout);
},
getMindmap : function() {
diff --git a/wise-editor/src/main/webapp/css/editor.less b/wise-editor/src/main/webapp/css/editor.less
index 8539f04c..17ce1982 100644
--- a/wise-editor/src/main/webapp/css/editor.less
+++ b/wise-editor/src/main/webapp/css/editor.less
@@ -1,5 +1,4 @@
@import "compatibility.less";
-@import "../css/widget/lightbox.css";
@import "../css/libraries/moodialog/css/MooDialog.css";
diff --git a/wise-editor/src/main/webapp/css/widget/lightbox.css b/wise-editor/src/main/webapp/css/widget/lightbox.css
deleted file mode 120000
index 68bcf494..00000000
--- a/wise-editor/src/main/webapp/css/widget/lightbox.css
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../mindplot/src/main/javascript/widget/lightbox.css
\ No newline at end of file
diff --git a/wise-editor/src/main/webapp/html/container.html b/wise-editor/src/main/webapp/html/container.html
index 6a967d5a..b18f1fef 100644
--- a/wise-editor/src/main/webapp/html/container.html
+++ b/wise-editor/src/main/webapp/html/container.html
@@ -50,7 +50,9 @@
zoom: Scale to be applied to the map
readOnly: If the map could be modified.
persistenceManager: Persistence managers to be used. By default, local browser storage is used.
- mapId: UUID of the map to be loaded..
+ mapId: UUID of the map to be loaded.
+ container: div element where the mindmap will be embedded..
+
It's important to point out that embedded.html is a static html page that it's mean to be a template page
diff --git a/wise-editor/src/main/webapp/html/container.json b/wise-editor/src/main/webapp/html/container.json
index 5a9d4b05..950d6485 100644
--- a/wise-editor/src/main/webapp/html/container.json
+++ b/wise-editor/src/main/webapp/html/container.json
@@ -11,5 +11,6 @@
"height":400
},
"persistenceManager": "mindplot.LocalStorageManager",
- "mapId": "welcome"
+ "mapId": "welcome",
+ "container":"mindplot"
}
\ No newline at end of file
diff --git a/wise-editor/src/main/webapp/html/editor.html b/wise-editor/src/main/webapp/html/editor.html
index 8d06c462..84c6289b 100644
--- a/wise-editor/src/main/webapp/html/editor.html
+++ b/wise-editor/src/main/webapp/html/editor.html
@@ -24,9 +24,6 @@
var options = loadDesignerOptions();
var designer = buildDesigner(options);
- // Configure default persistence manager ...
- mindplot.PersistenceManager.init(new mindplot.LocalStorageManager());
-
// Load map from XML ...
var persistence = mindplot.PersistenceManager.getInstance();
var mindmap;
@@ -37,11 +34,6 @@
mindmap = mindplot.model.Mindmap.buildEmpty(mapId);
}
designer.loadMap(mindmap);
-
- // If not problem has arisen, close the dialog ...
- if (!window.hasUnexpectedErrors) {
- waitDialog.deactivate();
- }
});
@@ -49,37 +41,6 @@
-
-
-
-
-
-
- Unexpected error loading your map :(
-
-
-
-
-
-
-