mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 22:27:55 +01:00
- Fix notes issues. Now, notes are part of a CDATA seccion
This commit is contained in:
parent
a33daf4563
commit
c598c1837e
@ -565,7 +565,7 @@ mindplot.Topic = new Class({
|
|||||||
|
|
||||||
_setText : function(text, updateModel) {
|
_setText : function(text, updateModel) {
|
||||||
var textShape = this.getTextShape();
|
var textShape = this.getTextShape();
|
||||||
textShape.setText(text);
|
textShape.setText(text == null ? this._defaultText() : text);
|
||||||
|
|
||||||
if ($defined(updateModel) && updateModel) {
|
if ($defined(updateModel) && updateModel) {
|
||||||
var model = this.getModel();
|
var model = this.getModel();
|
||||||
@ -574,6 +574,11 @@ mindplot.Topic = new Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
setText : function(text) {
|
setText : function(text) {
|
||||||
|
// Avoid empty nodes ...
|
||||||
|
if (text.trim().length == 0) {
|
||||||
|
text = null;
|
||||||
|
}
|
||||||
|
|
||||||
this._setText(text, true);
|
this._setText(text, true);
|
||||||
this._adjustShapes();
|
this._adjustShapes();
|
||||||
},
|
},
|
||||||
@ -591,15 +596,17 @@ mindplot.Topic = new Class({
|
|||||||
this._setBackgroundColor(color, true);
|
this._setBackgroundColor(color, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
_setBackgroundColor : function(color) {
|
_setBackgroundColor : function(color, updateModel) {
|
||||||
var innerShape = this.getInnerShape();
|
var innerShape = this.getInnerShape();
|
||||||
innerShape.setFill(color);
|
innerShape.setFill(color);
|
||||||
|
|
||||||
var connector = this.getShrinkConnector();
|
var connector = this.getShrinkConnector();
|
||||||
connector.setFill(color);
|
connector.setFill(color);
|
||||||
|
|
||||||
|
if ($defined(updateModel) && updateModel) {
|
||||||
var model = this.getModel();
|
var model = this.getModel();
|
||||||
model.setBackgroundColor(color);
|
model.setBackgroundColor(color);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
getBackgroundColor : function() {
|
getBackgroundColor : function() {
|
||||||
|
@ -54,11 +54,11 @@
|
|||||||
|
|
||||||
} else if (collab == 'standalone' && mindReady) {
|
} else if (collab == 'standalone' && mindReady) {
|
||||||
// Configure default persistence manager ...
|
// Configure default persistence manager ...
|
||||||
mindplot.PersitenceManager.init(new mindplot.FilePersitenceManager());
|
mindplot.PersitenceManager.init(new mindplot.LocalStorageManager());
|
||||||
|
|
||||||
// Load map from XML ...
|
// Load map from XML ...
|
||||||
var persitence = mindplot.PersitenceManager.getInstance();
|
var persitence = mindplot.PersitenceManager.getInstance();
|
||||||
var mindmap = persitence.load("map1");
|
var mindmap = persitence.load("map2");
|
||||||
designer.loadMap(mindmap);
|
designer.loadMap(mindmap);
|
||||||
|
|
||||||
// If not problem has arisen, close the dialog ...
|
// If not problem has arisen, close the dialog ...
|
||||||
|
Loading…
Reference in New Issue
Block a user