From f5aee9d78fc61ee4a5ab60424700d3df072d2ba1 Mon Sep 17 00:00:00 2001 From: Pablo Luna Date: Sun, 23 Jan 2011 16:55:14 -0300 Subject: [PATCH] Fixing openning maps bugs --- .../src/main/javascript/FixedDistanceBoard.js | 18 ++++++++++-------- .../src/main/javascript/MindmapDesigner.js | 3 ++- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/mindplot/src/main/javascript/FixedDistanceBoard.js b/mindplot/src/main/javascript/FixedDistanceBoard.js index a99862c7..db7927c1 100644 --- a/mindplot/src/main/javascript/FixedDistanceBoard.js +++ b/mindplot/src/main/javascript/FixedDistanceBoard.js @@ -81,15 +81,17 @@ mindplot.FixedDistanceBoard.prototype.updateReferencePoint = function() { var entry = entries[i]; - var upperLimit = entry.getUpperLimit() + yOffset; - var lowerLimit = entry.getLowerLimit() + yOffset; - entry.setUpperLimit(upperLimit); - entry.setLowerLimit(lowerLimit); + if(core.Utils.isDefined(entry)){ + var upperLimit = entry.getUpperLimit() + yOffset; + var lowerLimit = entry.getLowerLimit() + yOffset; + entry.setUpperLimit(upperLimit); + entry.setLowerLimit(lowerLimit); - // Fix x position ... - var xPos = this.workoutXBorderDistance(); - entry.setXPosition(xPos); - entry.update(); + // Fix x position ... + var xPos = this.workoutXBorderDistance(); + entry.setXPosition(xPos); + entry.update(); + } } this._referencePoint = parentPosition.clone(); diff --git a/mindplot/src/main/javascript/MindmapDesigner.js b/mindplot/src/main/javascript/MindmapDesigner.js index fbece68c..6043952a 100644 --- a/mindplot/src/main/javascript/MindmapDesigner.js +++ b/mindplot/src/main/javascript/MindmapDesigner.js @@ -574,7 +574,8 @@ mindplot.MindmapDesigner.prototype._nodeModelToNodeGraph = function(nodeModel) for (var i = 0; i < children.length; i++) { var child = children[i]; - this._nodeModelToNodeGraph(children[i]); + if(core.Utils.isDefined(child)) + this._nodeModelToNodeGraph(child); } var workspace = this._workspace;