Skip to content

Commit

Permalink
7.9.8 release
Browse files Browse the repository at this point in the history
Former-commit-id: d5284ab
  • Loading branch information
alderg committed Jan 16, 2018
1 parent 4464375 commit 3162d07
Show file tree
Hide file tree
Showing 87 changed files with 1,275 additions and 858 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
16-JAN-2018: 7.9.8

- Adds dark theme (beta)
- Uses mxGraph 3.8.1 beta 11

12-JAN-2018: 7.9.7

- Disables http/https redirects
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.9.7
7.9.8
13 changes: 13 additions & 0 deletions etc/build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,19 @@
</concat>
<echo file="${basedir}/Graph-Stylesheet.js" append="true">').documentElement;</echo>

<delete file="${basedir}/.tmp1.js"/>
<copy file="${war.dir}/styles/dark-default.xml" tofile="${basedir}/.tmp1.xml" overwrite="true"/>
<replaceregexp file="${basedir}/.tmp1.xml" match="${line.separator}" flags="g" replace=""/>
<replaceregexp file="${basedir}/.tmp1.xml" match="\t" flags="g" replace=""/>
<replaceregexp file="${basedir}/.tmp1.xml" match="'" flags="g" replace="\\\\'" byline="true"/>

<echo file="${basedir}/Graph-Stylesheet.js" append="true">Graph.prototype.defaultThemes['darkTheme'] = mxUtils.parseXml('</echo>
<concat destfile="${basedir}/Graph-Stylesheet.js" fixlastline="no" append="true">
<filelist dir="${basedir}" files=".tmp1.xml"/>
</concat>
<echo file="${basedir}/Graph-Stylesheet.js" append="true">').documentElement;</echo>


<delete file="${basedir}/.tmp2.js"/>
<copy file="${war.dir}/resources/dia.txt" tofile="${basedir}/.tmp2.xml" overwrite="true"/>
<replaceregexp file="${basedir}/.tmp2.xml" match="${line.separator}" flags="g" replace="\\\\n"/>
Expand Down
5 changes: 3 additions & 2 deletions etc/mxgraph/mxClient.js

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

11 changes: 7 additions & 4 deletions src/com/mxgraph/io/gliffy/importer/GliffyDiagramConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,14 @@ public int compare(GliffyObject o1, GliffyObject o2)
Float o2o;
try
{
if (o1.order == null || o2.order == null)
{
//we treat the "null" order as higher than "non-null"
if (o1.order == null && o2.order == null)
return 0;
}

else if(o1.order == null && o2.order != null)
return 1;
else if(o1.order != null && o2.order == null)
return -1;

o1o = Float.parseFloat(o1.order);
o2o = Float.parseFloat(o2.order);

Expand Down
35 changes: 34 additions & 1 deletion src/com/mxgraph/io/gliffy/model/GliffyObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Stream;

import com.mxgraph.io.gliffy.importer.PostDeserializer.PostDeserializable;
import com.mxgraph.model.mxCell;
Expand Down Expand Up @@ -389,8 +390,11 @@ public String toString()
@Override
public void postDeserialize()
{
if (isGroup())
if (isGroup())
{
normalizeChildrenCoordinates();
adjustZOrder();
}
}

/**
Expand Down Expand Up @@ -444,6 +448,35 @@ public int compare(GliffyObject o1, GliffyObject o2)
child.y += -yMin;
}
}

/**
* Fix for https://desk.draw.io/helpdesk/tickets/5205
* Since Gliffy can have groups whose children interleave in terms of z order and we can't, we assign the group a z order
* to that of it's highest ordered rectangle child
*/
private void adjustZOrder()
{
Integer maxOrder = null;

for(GliffyObject c : children)
{
if(c.uid != null && c.uid.equals("com.gliffy.shape.basic.basic_v1.default.rectangle") && c.x == 0 && c.y== 0 && c.width == width && c.height == height)
{
try {
Integer childOrder = Integer.parseInt(c.order);

if(maxOrder == null || childOrder > maxOrder)
{
maxOrder = childOrder;
}

} catch (NumberFormatException e) {}
}
}

if(maxOrder != null)
this.order = maxOrder.toString();
}

private mxGeometry getAdjustShifts(double[] arr, double x, double y, double w, double h)
{
Expand Down
4 changes: 3 additions & 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!
# 01/12/2018 11:30 PM
# 01/16/2018 01:58 PM

app.html
index.html?offline=1
Expand All @@ -13,6 +13,7 @@ js/shapes.min.js
js/stencils.min.js
styles/grapheditor.css
styles/atlas.css
styles/dark.css
favicon.ico
mxgraph/css/common.css
mxgraph/images/maximize.gif
Expand All @@ -27,6 +28,7 @@ mxgraph/images/point.gif
mxgraph/images/transparent.gif
resources/dia.txt
styles/default.xml
styles/dark-default.xml
styles/default-old.xml
img/clipart/Gear_128x128.png
images/delete.png
Expand Down
Binary file modified war/images/sprites.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3162d07

Please sign in to comment.