Skip to content

Commit

Permalink
7.4.8 release
Browse files Browse the repository at this point in the history
Former-commit-id: b964053
  • Loading branch information
alderg committed Sep 28, 2017
1 parent 3f92917 commit 26502a6
Show file tree
Hide file tree
Showing 25 changed files with 3,408 additions and 2,396 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
28-SEP-2017: 7.4.8

- Adds #P for URL parameters (beta)
- Bypasses caches for proxy servlet
- Uses mxGraph 3.7.6 beta 2
- Checks existing storage file before rename

26-SEP-2017: 7.4.7

- Adds components for Trello Power-Up
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.4.7
7.4.8
9 changes: 5 additions & 4 deletions etc/mxgraph/mxClient.js

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

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Copyright (c) 2006-2016, JGraph Ltd
* Copyright (c) 2006-2016, Gaudenz Alder
* Copyright (c) 2006-2017, JGraph Ltd
* Copyright (c) 2006-2017, Gaudenz Alder
*/
package com.mxgraph.io.gliffy.importer;

Expand Down Expand Up @@ -39,7 +39,6 @@
import com.mxgraph.online.Utils;
import com.mxgraph.util.mxDomUtils;
import com.mxgraph.util.mxPoint;
import com.mxgraph.util.mxUtils;
import com.mxgraph.util.mxXmlUtils;
import com.mxgraph.view.mxGraphHeadless;

Expand Down Expand Up @@ -247,7 +246,7 @@ private void setWaypoints(GliffyObject object, mxCell startTerminal, mxCell endT
double rads = Math.toRadians(object.rotation);
double cos = Math.cos(rads);
double sin = Math.sin(rads);
waypoint = mxUtils.getRotatedPoint(waypoint, cos, sin, pivot);
waypoint = Utils.getRotatedPoint(waypoint, cos, sin, pivot);
}

mxPoints.add(waypoint);
Expand Down
21 changes: 17 additions & 4 deletions src/com/mxgraph/io/gliffy/model/GliffyObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -53,8 +54,6 @@ public class GliffyObject implements PostDeserializable

public Constraints constraints;

public List<LinkMap> linkMap;

public mxCell mxObject;// the mxCell this gliffy object got converted into

public GliffyObject parent = null;
Expand Down Expand Up @@ -228,8 +227,17 @@ public String getText()

public String getLink()
{
if (linkMap != null && !linkMap.isEmpty())
return linkMap.get(0).url;
if(children == null || children.isEmpty())
return null;

Iterator<GliffyObject> it = children.iterator();

while(it.hasNext())
{
GliffyObject child = it.next();
if(child.isLink())
return child.graphic.getLink().href;
}

return null;
}
Expand Down Expand Up @@ -265,6 +273,11 @@ public boolean isLine()
{
return graphic != null && graphic.getType().equals(Graphic.Type.LINE);
}

public boolean isLink()
{
return graphic != null && graphic.getType().equals(Graphic.Type.LINK);
}

private boolean isUml()
{
Expand Down
13 changes: 13 additions & 0 deletions src/com/mxgraph/io/gliffy/model/Graphic.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,20 @@ public static class GliffyPopupNote extends GliffyShape
{
public String text;
}

public static class GliffyLink
{
String href;
boolean renderIcon;
}

public Type type;

public GliffyText Text;

public GliffyLine Line;

public GliffyLink Link;

public GliffyShape Shape;

Expand Down Expand Up @@ -126,6 +134,11 @@ public GliffyLine getLine()
{
return Line;
}

public GliffyLink getLink()
{
return Link;
}

public GliffyShape getShape()
{
Expand Down
4 changes: 4 additions & 0 deletions src/com/mxgraph/online/ProxyServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ protected void doGet(HttpServletRequest request,
URL url = new URL(urlParam);
URLConnection connection = url.openConnection();

response.setHeader("Pragma", "no-cache"); // HTTP 1.0
response.setHeader("Cache-control", "private, no-cache, no-store");
response.setHeader("Expires", "0");

// Status code pass-through
if (connection instanceof HttpURLConnection)
{
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!
# 09/26/2017 04:27 PM
# 09/28/2017 09:30 PM

app.html
index.html?offline=1
Expand Down
18 changes: 18 additions & 0 deletions war/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,24 @@
return result;
})();

// Forces CDN caches by passing URL parameters via URL hash
if (window.location.hash != null && window.location.hash.substring(0, 2) == '#P')
{
try
{
urlParams = JSON.parse(decodeURIComponent(window.location.hash.substring(2)));

if (urlParams.hash != null)
{
window.location.hash = urlParams.hash;
}
}
catch (e)
{
// ignore
}
}

// Redirects page if required
if (urlParams['dev'] != '1')
{
Expand Down
Loading

0 comments on commit 26502a6

Please sign in to comment.