Skip to content

Commit

Permalink
6.5.2 release
Browse files Browse the repository at this point in the history
Former-commit-id: 94b77da
  • Loading branch information
alderg committed Apr 13, 2017
1 parent b15ba2a commit dbc3a62
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 33 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.5.1
6.5.2
16 changes: 9 additions & 7 deletions src/com/mxgraph/io/vsdx/Shape.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -377,22 +379,22 @@ public boolean hasGeomList()
/**
* 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";



Expand Down Expand Up @@ -465,10 +467,10 @@ else if (node.getNodeName().equals("#text"))
.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);
// }
Expand Down
40 changes: 22 additions & 18 deletions src/com/mxgraph/io/vsdx/VsdxShape.java
Original file line number Diff line number Diff line change
Expand Up @@ -314,24 +314,28 @@ public String getTextLabel()
{
// 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
Expand Down Expand Up @@ -2149,7 +2153,7 @@ public mxPoint getLblEdgeOffset(mxPoint beginXY, mxPoint endXY, List<mxPoint> po
{
//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());
Expand Down
2 changes: 1 addition & 1 deletion war/cache.manifest
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions war/js/app.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit dbc3a62

Please sign in to comment.