Keep cleaning and refactoring styles and samples.
This commit is contained in:
@@ -21,27 +21,23 @@
|
||||
var mapId = 'welcome';
|
||||
var viewMode = true;
|
||||
|
||||
var mindReady = false;
|
||||
$(document).addEvent('loadcomplete', function(resource) {
|
||||
mindReady = resource == 'mind' ? true : mindReady;
|
||||
var designer = buildDesigner(viewMode);
|
||||
|
||||
if (mindReady) {
|
||||
designer = buildDesigner(viewMode);
|
||||
// Configure default persistence manager ...
|
||||
mindplot.PersistenceManager.init(new mindplot.LocalStorageManager());
|
||||
|
||||
// Configure default persistence manager ...
|
||||
mindplot.PersitenceManager.init(new mindplot.LocalStorageManager());
|
||||
|
||||
// Load map from XML ...
|
||||
var persitence = mindplot.PersitenceManager.getInstance();
|
||||
var mindmap;
|
||||
try {
|
||||
mindmap = persitence.load(mapId);
|
||||
} catch(e) {
|
||||
// If the map could not be loaded, create a new empty map...
|
||||
mindmap = mindplot.model.Mindmap.buildEmpty(mapId);
|
||||
}
|
||||
designer.loadMap(mindmap);
|
||||
// Load map from XML ...
|
||||
var persistence = mindplot.PersistenceManager.getInstance();
|
||||
var mindmap;
|
||||
try {
|
||||
mindmap = persistence.load(mapId);
|
||||
} catch(e) {
|
||||
// If the map could not be loaded, create a new empty map...
|
||||
mindmap = mindplot.model.Mindmap.buildEmpty(mapId);
|
||||
}
|
||||
designer.loadMap(mindmap);
|
||||
|
||||
|
||||
$('zoomIn').addEvent('click', function() {
|
||||
designer.zoomIn();
|
||||
@@ -64,8 +60,7 @@
|
||||
<div id="zoomIn" class="button"></div>
|
||||
<div id="zoomOut" class="button"></div>
|
||||
<div id="mapDetails">
|
||||
<span class="title">Author: </span> Paulo Veiga
|
||||
<span class="title">Description: </span>View Mode
|
||||
View Mode Sample
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user