From 2e2e978c43934b35f61e7f5bb72bba48c8e3b95b Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Tue, 11 Sep 2012 20:45:58 -0300 Subject: [PATCH] - Fix IE 9 issue that true value is serialized as number instead of boolean string. --- .../persistence/XMLSerializer_Pela.js | 8 +-- .../exporter/FreemindExporter.java | 2 +- .../src/test/resources/data/wisemaps/npe.mmr | 4 ++ .../src/test/resources/data/wisemaps/npe.wxml | 51 +++++++++++++++++++ 4 files changed, 60 insertions(+), 5 deletions(-) create mode 100644 wise-webapp/src/test/resources/data/wisemaps/npe.mmr create mode 100644 wise-webapp/src/test/resources/data/wisemaps/npe.wxml diff --git a/mindplot/src/main/javascript/persistence/XMLSerializer_Pela.js b/mindplot/src/main/javascript/persistence/XMLSerializer_Pela.js index a40b2e65..3308391f 100644 --- a/mindplot/src/main/javascript/persistence/XMLSerializer_Pela.js +++ b/mindplot/src/main/javascript/persistence/XMLSerializer_Pela.js @@ -66,7 +66,7 @@ mindplot.persistence.XMLSerializer_Pela = new Class({ // Set topic attributes... if (topic.getType() == mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) { - parentTopic.setAttribute("central", true); + parentTopic.setAttribute('central', 'true'); } else { var pos = topic.getPosition(); @@ -93,7 +93,7 @@ mindplot.persistence.XMLSerializer_Pela = new Class({ } if (topic.areChildrenShrunken()) { - parentTopic.setAttribute('shrink', true); + parentTopic.setAttribute('shrink', 'true'); } // Font properties ... @@ -430,8 +430,8 @@ mindplot.persistence.XMLSerializer_Pela = new Class({ if ($defined(destCtrlPoint) && destCtrlPoint != "") { model.setDestCtrlPoint(core.Point.fromString(destCtrlPoint)); } - model.setEndArrow(endArrow == "true"); - model.setStartArrow(startArrow == "true"); + model.setEndArrow('false'); + model.setStartArrow('true'); return model; } }); diff --git a/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java b/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java index 1bd0f470..79ea6661 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java +++ b/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java @@ -72,7 +72,7 @@ public class FreemindExporter TopicType centerTopic = null; if (topics.size() > 1) { for (TopicType topic : topics) { - if (topic.isCentral()) { + if (topic.isCentral() != null && topic.isCentral()) { centerTopic = topic; break; } diff --git a/wise-webapp/src/test/resources/data/wisemaps/npe.mmr b/wise-webapp/src/test/resources/data/wisemaps/npe.mmr new file mode 100644 index 00000000..1e3e3b53 --- /dev/null +++ b/wise-webapp/src/test/resources/data/wisemaps/npe.mmr @@ -0,0 +1,4 @@ + + + + diff --git a/wise-webapp/src/test/resources/data/wisemaps/npe.wxml b/wise-webapp/src/test/resources/data/wisemaps/npe.wxml new file mode 100644 index 00000000..359233bb --- /dev/null +++ b/wise-webapp/src/test/resources/data/wisemaps/npe.wxml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +