diff --git a/README.md b/README.md
index d1c75865..5bcc5c72 100644
--- a/README.md
+++ b/README.md
@@ -78,7 +78,7 @@ The following code is an example of how to add attach to the div dragImageNode t
designer.addDraggedNode(event, node);
});
-In the example, a new node is created with text "Node Text !!!!" and a note and a link associated to it when the user drop the node. Something to pay attention is the node.setMetadata("{}"), this attributes will be persisted during the serialization. Here you can store all the data you need.
+In the example, a new node is created with text "Node Text !!!!" and a note and a link associated to it when the user drop the node. Something to pay attention is the node.setMetadata("{}"), this delegated will be persisted during the serialization. Here you can store all the data you need.
2) Support for dragging Images: Similar to the point 1,drag support is registered to the div dragImageNode.
diff --git a/java.iml b/java.iml
new file mode 100644
index 00000000..8015fa76
--- /dev/null
+++ b/java.iml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/web2d/src/test/javascript/jsUnit/ElementsTestSuite.html b/web2d/src/test/javascript/jsUnit/ElementsTestSuite.html
index d608cd45..08289341 100755
--- a/web2d/src/test/javascript/jsUnit/ElementsTestSuite.html
+++ b/web2d/src/test/javascript/jsUnit/ElementsTestSuite.html
@@ -89,7 +89,7 @@ function testElementFill()
assertEquals(opacity, fill.opacity);
}
- // Set attributes
+ // Set delegated
elem.setAttribute('fillColor', color);
elem.setAttribute('fillOpacity', opacity);
diff --git a/wise-editor/src/main/webapp/images/logo-135x135.png b/wise-editor/src/main/webapp/images/logo-135x135.png
new file mode 100644
index 00000000..8805e2ba
Binary files /dev/null and b/wise-editor/src/main/webapp/images/logo-135x135.png differ
diff --git a/wise-editor/src/main/webapp/images/logo-head-only.png b/wise-editor/src/main/webapp/images/logo-head-only.png
new file mode 100644
index 00000000..70372f61
Binary files /dev/null and b/wise-editor/src/main/webapp/images/logo-head-only.png differ
diff --git a/wise-webapp/src/main/java/com/wisemapping/importer/JaxbCDATAMarshaller.java b/wise-webapp/src/main/java/com/wisemapping/importer/JaxbCDATAMarshaller.java
index 347a0d5d..cef78a43 100644
--- a/wise-webapp/src/main/java/com/wisemapping/importer/JaxbCDATAMarshaller.java
+++ b/wise-webapp/src/main/java/com/wisemapping/importer/JaxbCDATAMarshaller.java
@@ -18,12 +18,17 @@
package com.wisemapping.importer;
-import java.io.OutputStream;
-
import org.apache.xml.serialize.OutputFormat;
import org.apache.xml.serialize.XMLSerializer;
import org.jetbrains.annotations.NotNull;
-import org.w3c.dom.Document;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+
+import java.io.OutputStream;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
@SuppressWarnings("deprecation")
public class JaxbCDATAMarshaller {
@@ -46,10 +51,106 @@ public class JaxbCDATAMarshaller {
of.setEncoding("UTF-8");
// create the serializer
- XMLSerializer result = new XMLSerializer(of);
+ XMLSerializer result = new XMLSerializer(of) {
+ @Override
+ public void startElement(String s, String s1, String s2, Attributes attributes) throws SAXException {
+ super.startElement(s, s1, s2, new SortedAttributesDecorator(attributes));
+ }
+ };
result.setOutputByteStream(out);
return result;
}
+ private static class SortedAttributesDecorator implements Attributes {
+
+ final Map sortedToUnsorted = new HashMap();
+ final Map unsortedToSorted = new HashMap();
+
+ private Attributes delegated;
+
+ SortedAttributesDecorator(final Attributes delegated) {
+ this.delegated = delegated;
+ int length = this.getLength();
+
+ // Sort by local part ...
+ final Map sortedMap = new TreeMap();
+ for (int i = 0; i < length; i++) {
+ final String localName = delegated.getLocalName(i);
+ sortedMap.put(localName, i);
+ }
+
+ Set keySet = sortedMap.keySet();
+ int sortedIndex = 0;
+ for (String key : keySet) {
+ final Integer unsortedIndex = sortedMap.get(key);
+ sortedToUnsorted.put(sortedIndex, unsortedIndex);
+ unsortedToSorted.put(unsortedIndex, sortedIndex);
+ sortedIndex++;
+ }
+ }
+
+ @Override
+ public int getLength() {
+ return delegated.getLength();
+ }
+
+ @Override
+ public String getURI(int index) {
+ return delegated.getURI(sortedToUnsorted.get(index));
+ }
+
+ @Override
+ public String getLocalName(int index) {
+ return delegated.getLocalName(sortedToUnsorted.get(index));
+ }
+
+ @Override
+ public String getQName(int index) {
+ return delegated.getQName(sortedToUnsorted.get(index));
+ }
+
+ @Override
+ public String getType(int index) {
+ return delegated.getType(sortedToUnsorted.get(index));
+ }
+
+ @Override
+ public String getValue(int index) {
+ return delegated.getValue(sortedToUnsorted.get(index));
+ }
+
+ @Override
+ public int getIndex(String uri, String localName) {
+ int unsorted = delegated.getIndex(uri, localName);
+ return unsortedToSorted.get(unsorted);
+ }
+
+ @Override
+ public int getIndex(String qName) {
+ int unsorted = delegated.getIndex(qName);
+ return unsortedToSorted.get(unsorted);
+ }
+
+ @Override
+ public String getType(String uri, String localName) {
+ return delegated.getType(uri, localName);
+ }
+
+ @Override
+ public String getType(String qName) {
+ return delegated.getType(qName);
+ }
+
+ @Override
+ public String getValue(String uri, String localName) {
+ return delegated.getValue(uri, localName);
+ }
+
+ @Override
+ public String getValue(String qName) {
+ return delegated.getValue(qName);
+ }
+ }
+
}
\ No newline at end of file
diff --git a/wise-webapp/src/test/resources/data/freemind/basic.mmr b/wise-webapp/src/test/resources/data/freemind/basic.mmr
index 43b954de..7421e72c 100644
--- a/wise-webapp/src/test/resources/data/freemind/basic.mmr
+++ b/wise-webapp/src/test/resources/data/freemind/basic.mmr
@@ -1,14 +1,14 @@
\ No newline at end of file
diff --git a/wise-webapp/src/test/resources/data/freemind/basic.wxml b/wise-webapp/src/test/resources/data/freemind/basic.wxml
index 2efdbb2d..be867357 100644
--- a/wise-webapp/src/test/resources/data/freemind/basic.wxml
+++ b/wise-webapp/src/test/resources/data/freemind/basic.wxml
@@ -1,28 +1,28 @@
-