Skip to content

Commit

Permalink
6.5.0 release
Browse files Browse the repository at this point in the history
Former-commit-id: 41ed65d
  • Loading branch information
alderg committed Apr 13, 2017
1 parent bf2c8a4 commit ff9a93b
Show file tree
Hide file tree
Showing 199 changed files with 1,971 additions and 2,228 deletions.
19 changes: 19 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
13-APR-2017: 6.5.0

- Fixes extension for exported files with dots
- Fixes lost changes after create or open file in same window
- Fixes ignored default page size for Google Drive files
- Adds Alt+Shift+C for clear waypoints
- Adds toFront/Back context menu for multiple cells
- Adds arc size for copy/paste style
- Fixes rounded swimlane boundary cases
- Uses Cloudflare CDN for loading MathJax
- Adds clear waypoints for vertices with connections
- Adds error handling for saving macro in Confluence Cloud
- Fixes cloned start/end arrow when splitting edge
- Adds support for global shadow in PDF export
- Fixes special characters in branch names for GitHub client
- Fixes missing arc handle for unknown shapes
- Fixes hightlight size for arrows
- Uses mxGraph 3.7.2

06-APR-2017: 6.4.6

- Works around page counter loop condition in FF
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.4.6
6.5.0
27 changes: 13 additions & 14 deletions etc/mxgraph/mxClient.js

Large diffs are not rendered by default.

87 changes: 20 additions & 67 deletions src/com/mxgraph/io/mxVsdxCodec.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ else if (filename.toLowerCase().startsWith(mxVsdxCodec.vsdxPlaceholder + "/media

graph.setConstrainChildren(false);
graph.setHtmlLabels(true);

//Prevent change of edge parent as it misses with the routing points
((mxGraphModel)graph.getModel()).setMaintainEdgeParent(false);

graph.getModel().beginUpdate();
importPage(page, graph, graph.getDefaultParent());

Expand Down Expand Up @@ -855,106 +857,49 @@ protected ShapePageId addConnectedEdge(mxGraph graph, mxVsdxConnect connect, Int

//Get beginXY and endXY coordinates.
mxPoint beginXY = edgeShape.getStartXY(parentHeight);
mxPoint origBeginXY = new mxPoint(beginXY);

beginXY = calculateAbsolutePoint(parent, graph, beginXY);

mxPoint fromConstraint = null;
Integer sourceSheet = connect.getSourceToSheet();

VsdxShape fromShape = sourceSheet != null ? vertexShapeMap
.get(new ShapePageId(pageId, sourceSheet)) : null;

mxCell source = sourceSheet != null ? vertexMap
.get(new ShapePageId(pageId, sourceSheet)) : null;

if (fromShape == null || source == null)
if (source == null)
{
// Source is dangling
source = (mxCell) graph.insertVertex(parent, null, null,
beginXY.getX(), beginXY.getY(), 0, 0);
fromConstraint = new mxPoint(0, 0);
}
else
{
mxCell srcTopParent = findTopParent(source, (mxCell) graph.getDefaultParent());

mxPoint dimensionFrom = fromShape.getDimensions();

//Get From shape origin and begin/end of edge in absolutes values.
double height = pageHeight;

if ((srcTopParent != null)
&& (srcTopParent.getGeometry() != null))
{
height = srcTopParent.getGeometry().getHeight();
}

mxPoint originFrom = fromShape.getOriginPoint(height, false);
Integer sourceToPart = connect.getSourceToPart();

if (sourceToPart != mxVsdxConstants.CONNECT_TO_PART_WHOLE_SHAPE)
{
mxPoint absOriginFrom = calculateAbsolutePoint(srcTopParent, graph, originFrom);
fromConstraint = new mxPoint(
(beginXY.getX() - absOriginFrom.getX())
/ dimensionFrom.getX(),
(beginXY.getY() - absOriginFrom.getY())
/ dimensionFrom.getY());
}
}
//Else: Routing points will contain the exit/entry points, so no need to set the to/from constraint

mxPoint endXY = edgeShape.getEndXY(parentHeight);
endXY = calculateAbsolutePoint(parent, graph, endXY);

mxPoint toConstraint = null;
Integer toSheet = connect.getTargetToSheet();

VsdxShape toShape = toSheet != null ? vertexShapeMap
.get(new ShapePageId(pageId, toSheet)) : null;

mxCell target = toSheet != null ? vertexMap.get(new ShapePageId(
pageId, toSheet)) : null;

if (toShape == null || target == null)
if (target == null)
{
// Target is dangling
target = (mxCell) graph.insertVertex(parent, null, null,
endXY.getX(), endXY.getY(), 0, 0);
toConstraint = new mxPoint(0, 0);
}
else
{
target = vertexMap.get(new ShapePageId(pageId, toSheet));
mxCell trgTopParent = findTopParent(target, (mxCell) graph.getDefaultParent());
mxPoint dimentionTo = toShape.getDimensions();

//Get To shape origin.
double height = pageHeight;

if ((trgTopParent != null)
&& (trgTopParent.getGeometry() != null))
{
height = trgTopParent.getGeometry().getHeight();
}

mxPoint originTo = toShape.getOriginPoint(height, false);
Integer targetToPart = connect.getTargetToPart();

if (targetToPart != mxVsdxConstants.CONNECT_TO_PART_WHOLE_SHAPE)
{
mxPoint absOriginTo = calculateAbsolutePoint( trgTopParent, graph, originTo);
toConstraint = new mxPoint(
(endXY.getX() - absOriginTo.getX())
/ dimentionTo.getX(),
(endXY.getY() - absOriginTo.getY())
/ dimentionTo.getY());
}
}
//Else: Routing points will contain the exit/entry points, so no need to set the to/from constraint

//Defines the style of the edge.
Map<String, String> styleMap = edgeShape
.getStyleFromEdgeShape(parentHeight);
//Insert new edge and set constraints.
Object edge;
List<mxPoint> points = edgeShape.getRoutingPoints(parentHeight, origBeginXY, edgeShape.getRotation());
double rotation = edgeShape.getRotation();
if (rotation != 0)
{
Expand All @@ -977,10 +922,13 @@ protected ShapePageId addConnectedEdge(mxGraph graph, mxVsdxConnect connect, Int
{
edge = graph.insertEdge(parent, null, edgeShape.getTextLabel(), source,
target, mxVsdxUtils.getStyleString(styleMap, "="));

mxPoint lblOffset = edgeShape.getLblEdgeOffset(beginXY, endXY, points);
((mxCell)edge).getGeometry().setOffset(lblOffset);
}

mxGeometry edgeGeometry = graph.getModel().getGeometry(edge);
edgeGeometry.setPoints(edgeShape.getRoutingPoints(parentHeight, beginXY, edgeShape.getRotation()));
edgeGeometry.setPoints(points);

if (fromConstraint != null)
{
Expand Down Expand Up @@ -1046,6 +994,7 @@ protected Object addUnconnectedEdge(mxGraph graph, Object parent, VsdxShape edge
}

mxPoint beginXY = edgeShape.getStartXY(parentHeight);
mxPoint origBeginXY = new mxPoint(beginXY);
mxPoint endXY = edgeShape.getEndXY(parentHeight);

//Define style of the edge
Expand All @@ -1055,6 +1004,7 @@ protected Object addUnconnectedEdge(mxGraph graph, Object parent, VsdxShape edge

//Insert new edge and set constraints.
Object edge;
List<mxPoint> points = edgeShape.getRoutingPoints(parentHeight, origBeginXY, edgeShape.getRotation());
double rotation = edgeShape.getRotation();
if (rotation != 0)
{
Expand All @@ -1075,9 +1025,12 @@ protected Object addUnconnectedEdge(mxGraph graph, Object parent, VsdxShape edge
else
{
edge = graph.insertEdge(parent, null, edgeShape.getTextLabel(), null, null, mxVsdxUtils.getStyleString(styleMap, "="));

mxPoint lblOffset = edgeShape.getLblEdgeOffset(beginXY, endXY, points);
((mxCell)edge).getGeometry().setOffset(lblOffset);
}
mxGeometry edgeGeometry = graph.getModel().getGeometry(edge);
edgeGeometry.setPoints(edgeShape.getRoutingPoints(parentHeight, beginXY, edgeShape.getRotation()));
edgeGeometry.setPoints(points);

edgeGeometry.setTerminalPoint(beginXY, true);
edgeGeometry.setTerminalPoint(endXY, false);
Expand Down
Loading

0 comments on commit ff9a93b

Please sign in to comment.