fixing printing problem

This commit is contained in:
Pablo Luna 2011-05-05 16:54:17 +01:00
parent 8c6ef376b7
commit 06c736ab04

View File

@ -248,7 +248,8 @@ mindplot.XMLMindmapSerializer_Pela.prototype.loadFromDom = function(dom)
break; break;
case "relationship": case "relationship":
var relationship = this._deserializeRelationship(child,mindmap); var relationship = this._deserializeRelationship(child,mindmap);
mindmap.addRelationship(relationship); if(relationship!=null)
mindmap.addRelationship(relationship);
break; break;
} }
} }
@ -393,6 +394,10 @@ mindplot.XMLMindmapSerializer_Pela.prototype._deserializeRelationship = function
var destCtrlPoint = domElement.getAttribute("destCtrlPoint"); var destCtrlPoint = domElement.getAttribute("destCtrlPoint");
var endArrow = domElement.getAttribute("endArrow"); var endArrow = domElement.getAttribute("endArrow");
var startArrow = domElement.getAttribute("startArrow"); var startArrow = domElement.getAttribute("startArrow");
//If for some reason a relationship lines has source and dest nodes the same, don't import it.
if(srcId==destId){
return null;
}
var model = mindmap.createRelationship(srcId, destId); var model = mindmap.createRelationship(srcId, destId);
model.setLineType(lineType); model.setLineType(lineType);
if(core.Utils.isDefined(srcCtrlPoint) && srcCtrlPoint!=""){ if(core.Utils.isDefined(srcCtrlPoint) && srcCtrlPoint!=""){