Browse Source

6.5.2 release

Gaudenz Alder 8 years ago
parent
commit
94b77da91e

+ 4 - 0
ChangeLog

@@ -1,3 +1,7 @@
+13-APR-2017: 6.5.2
+
+- Adds missing supercall in Editor.resetGraph override
+
 13-APR-2017: 6.5.1
 
 - Fixes dependency on mxSettings in viewer.min.js

+ 1 - 1
VERSION

@@ -1 +1 @@
-6.5.1
+6.5.2

+ 9 - 7
src/com/mxgraph/io/vsdx/Shape.java

@@ -75,6 +75,8 @@ public class Shape extends Style
 	
 	protected int themeVariant = 0;
 	
+	private final static String UNICODE_LINE_SEP = new String(new char[]{(char)226, (char)128, (char)168});
+	
 	public mxPathDebug debug = null;
 
 	public Shape(Element shape, mxVsdxModel model)
@@ -377,22 +379,22 @@ public class Shape extends Style
 	/**
 	 * Last cp IX referenced in the Text Element.
 	 */
-	String cp = "";
+	String cp = "0";
 
 	/**
 	 * Last pp IX referenced in the Text Element.
 	 */
-	String pp = "";
+	String pp = "0";
 
 	/**
 	 * Last tp IX referenced in the Text Element.
 	 */
-	String tp = "";
+	String tp = "0";
 
 	/**
 	 * Last fld IX referenced in the Text Element.
 	 */
-	String fld = "";
+	String fld = "0";
 	
 	
 	
@@ -465,10 +467,10 @@ public class Shape extends Style
 								.replaceAll("'", "′")
 								.replaceAll("<", "&lt;")
 								.replaceAll(">", "&gt;");
-	
+
 						text = textToList(text, pp);
-						
-						text = text.replaceAll("\n", "<br/>");
+
+						text = text.replaceAll("\n", "<br/>").replaceAll(UNICODE_LINE_SEP, "<br/>");
 						
 						ret += getTextCharFormated(text);
 //					}

+ 22 - 18
src/com/mxgraph/io/vsdx/VsdxShape.java

@@ -314,24 +314,28 @@ public class VsdxShape extends Shape
 			{
 				// Collect text into same formatting paragraphs. If there's one paragraph, use the new system, otherwise
 				// leave it to the old one.
-				if (this.paragraphs == null)
-				{
-					initLabels(txtChildren);
-				}
-				
-				if (this.paragraphs.size() == 0)
-				{
-					// valid way to have an empty label override a master value "<text />"
-					return "";
-				}
-				else if (this.paragraphs.size() == 1)
-				{
-					return createHybridLabel(this.paragraphs.keySet().iterator().next());
-				}
-				else
-				{
+//				if (this.paragraphs == null)
+//				{
+//					initLabels(txtChildren);
+//				}
+//				
+//				if (this.paragraphs.size() == 0)
+//				{
+//					// valid way to have an empty label override a master value "<text />"
+//					return "";
+//				}
+//				else if (this.paragraphs.size() == 1)
+//				{
+//					return createHybridLabel(this.paragraphs.keySet().iterator().next());
+//				}
+//				else
+//				{
+					//Sometimes one paragraph also contains mix of styles which are not supported by hybrid labels, so, use the old style for all html labels
+					this.styleMap.put(mxConstants.STYLE_VERTICAL_ALIGN, getAlignVertical());
+					this.styleMap.put(mxConstants.STYLE_ALIGN, getHorizontalAlign("0", false));
+
 					return getHtmlTextContent(txtChildren);
-				}
+//				}
 			}
 		}
 		else
@@ -2149,7 +2153,7 @@ public class VsdxShape extends Shape
 	{
 		//currently, edges with multiple segments are not supported
 		//TODO use the code from https://github.com/jgraph/mxgraph/blob/master/javascript/src/js/view/mxGraphView.js#L1953 to calculate mxGraph label offset instead of the default mid point (width/2, height/2)
-		if (points == null || points.isEmpty() || (points.size() == 1 && points.get(0).equals(endXY)))
+		if (points == null || points.isEmpty() || points.size() == 2) //points can hold two points representing begin and end point
 		{
 	        //Calculate the text offset
 	        double txtWV = getScreenNumericalValue(getShapeNode(mxVsdxConstants.TXT_WIDTH), getWidth());

+ 1 - 1
war/cache.manifest

@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 04/13/2017 06:34 PM
+# 04/13/2017 10:19 PM
 
 app.html
 index.html?offline=1

File diff suppressed because it is too large
+ 2 - 2
war/js/app.min.js


File diff suppressed because it is too large
+ 2 - 2
war/js/atlas.min.js


+ 2 - 0
war/js/diagramly/App.js

@@ -5046,6 +5046,8 @@ App.prototype.updateUserElement = function()
 var editorResetGraph = Editor.prototype.resetGraph;	
 Editor.prototype.resetGraph = function()
 {
+	editorResetGraph.apply(this, arguments);
+	
 	// Overrides default with persisted value
 	this.graph.pageFormat = mxSettings.getPageFormat();
 };

File diff suppressed because it is too large
+ 1 - 1
war/js/embed-static.min.js


File diff suppressed because it is too large
+ 1 - 1
war/js/reader.min.js