- Fix notes issues. Now, notes are part of a CDATA seccion

This commit is contained in:
Paulo Veiga 2011-11-28 22:38:22 -03:00
parent a33daf4563
commit c598c1837e
2 changed files with 1258 additions and 1251 deletions

View File

@ -565,7 +565,7 @@ mindplot.Topic = new Class({
_setText : function(text, updateModel) {
var textShape = this.getTextShape();
textShape.setText(text);
textShape.setText(text == null ? this._defaultText() : text);
if ($defined(updateModel) && updateModel) {
var model = this.getModel();
@ -574,6 +574,11 @@ mindplot.Topic = new Class({
},
setText : function(text) {
// Avoid empty nodes ...
if (text.trim().length == 0) {
text = null;
}
this._setText(text, true);
this._adjustShapes();
},
@ -591,15 +596,17 @@ mindplot.Topic = new Class({
this._setBackgroundColor(color, true);
},
_setBackgroundColor : function(color) {
_setBackgroundColor : function(color, updateModel) {
var innerShape = this.getInnerShape();
innerShape.setFill(color);
var connector = this.getShrinkConnector();
connector.setFill(color);
if ($defined(updateModel) && updateModel) {
var model = this.getModel();
model.setBackgroundColor(color);
}
},
getBackgroundColor : function() {

View File

@ -54,11 +54,11 @@
} else if (collab == 'standalone' && mindReady) {
// Configure default persistence manager ...
mindplot.PersitenceManager.init(new mindplot.FilePersitenceManager());
mindplot.PersitenceManager.init(new mindplot.LocalStorageManager());
// Load map from XML ...
var persitence = mindplot.PersitenceManager.getInstance();
var mindmap = persitence.load("map1");
var mindmap = persitence.load("map2");
designer.loadMap(mindmap);
// If not problem has arisen, close the dialog ...