Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaudenz Alder <gaudenz@jgraph.com>2019-10-16 15:53:37 +0300
committerGaudenz Alder <gaudenz@jgraph.com>2019-10-16 15:53:37 +0300
commitfecc68fb81186856ddcd6a45157e67c85a8d83e9 (patch)
treeca0ac085207a53d4cbfaf014098391bf490f3f61
parenta9a00f4944a32d7428d5e197a2d9da4d1610285f (diff)
12.1.2 releasev12.1.2
-rw-r--r--ChangeLog6
-rw-r--r--VERSION2
-rw-r--r--etc/mxgraph/mxClient.js4
-rw-r--r--src/main/java/com/mxgraph/online/AbsAuthServlet.java281
-rw-r--r--src/main/webapp/cache.manifest2
-rw-r--r--src/main/webapp/export3.html8
-rw-r--r--src/main/webapp/js/app.min.js21
-rw-r--r--src/main/webapp/js/diagramly/Dialogs.js6
-rw-r--r--src/main/webapp/js/diagramly/GraphViewer.js86
-rw-r--r--src/main/webapp/js/diagramly/mxRuler.js111
-rw-r--r--src/main/webapp/js/mxgraph/Graph.js8
-rw-r--r--src/main/webapp/js/viewer.min.js26
12 files changed, 292 insertions, 269 deletions
diff --git a/ChangeLog b/ChangeLog
index 6821ac70..8c6ad65c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+16-OCT-2019: 12.1.2
+
+- Fixes scrollbars in Confluence Cloud and Jira Cloud
+- Fixes export of uncompressed XML files to PDF
+- Uses mxGraph 4.0.3 beta 7
+
14-OCT-2019: 12.1.1
- Uses uncompressed XML files in GitLab and GitHub
diff --git a/VERSION b/VERSION
index 91c7810d..a7b56e36 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-12.1.1 \ No newline at end of file
+12.1.2 \ No newline at end of file
diff --git a/etc/mxgraph/mxClient.js b/etc/mxgraph/mxClient.js
index dcbd2c20..069d2903 100644
--- a/etc/mxgraph/mxClient.js
+++ b/etc/mxgraph/mxClient.js
@@ -1214,8 +1214,8 @@ this.shiftPreview1.parentNode.removeChild(this.shiftPreview1);this.shiftPreview1
"absolute";this.shiftPreview1.style.overflow="visible";this.shiftPreview2=document.createElement("div");this.shiftPreview2.style.position="absolute";this.shiftPreview2.style.overflow="visible";for(var f=this.shiftPreview1,d=this.container.firstChild;null!=d;)e=d.nextSibling,d!=c.parentNode?f.appendChild(d):f=this.shiftPreview2,d=e;null!=this.shiftPreview1.firstChild&&this.container.insertBefore(this.shiftPreview1,c.parentNode);null!=this.shiftPreview2.firstChild&&this.container.appendChild(this.shiftPreview2)}this.shiftPreview1.style.left=
a+"px";this.shiftPreview1.style.top=b+"px";this.shiftPreview2.style.left=a+"px";this.shiftPreview2.style.top=b+"px"}else c.style.left=a+"px",c.style.top=b+"px";this.panDx=a;this.panDy=b;this.fireEvent(new mxEventObject(mxEvent.PAN))}};mxGraph.prototype.zoomIn=function(){this.zoom(this.zoomFactor)};mxGraph.prototype.zoomOut=function(){this.zoom(1/this.zoomFactor)};
mxGraph.prototype.zoomActual=function(){1==this.view.scale?this.view.setTranslate(0,0):(this.view.translate.x=0,this.view.translate.y=0,this.view.setScale(1))};mxGraph.prototype.zoomTo=function(a,b){this.zoom(a/this.view.scale,b)};
-mxGraph.prototype.center=function(a,b,c,d){a=null!=a?a:!0;b=null!=b?b:!0;c=null!=c?c:.5;d=null!=d?d:.5;var e=mxUtils.hasScrollbars(this.container),f=this.container.clientWidth,g=this.container.clientHeight,k=this.getGraphBounds(),l=this.view.translate,m=this.view.scale,n=a?f-k.width:0,p=b?g-k.height:0;e?(k.x-=l.x,k.y-=l.y,a=this.container.scrollWidth,b=this.container.scrollHeight,a>f&&(n=0),b>g&&(p=0),this.view.setTranslate(Math.floor(n/2-k.x),Math.floor(p/2-k.y)),this.container.scrollLeft=(a-f)/
-2,this.container.scrollTop=(b-g)/2):this.view.setTranslate(a?Math.floor(l.x-k.x*m+n*c/m):l.x,b?Math.floor(l.y-k.y*m+p*d/m):l.y)};
+mxGraph.prototype.center=function(a,b,c,d){a=null!=a?a:!0;b=null!=b?b:!0;c=null!=c?c:.5;d=null!=d?d:.5;var e=mxUtils.hasScrollbars(this.container),f=2*this.getBorder(),g=this.container.clientWidth-f,f=this.container.clientHeight-f,k=this.getGraphBounds(),l=this.view.translate,m=this.view.scale,n=a?g-k.width:0,p=b?f-k.height:0;e?(k.x-=l.x,k.y-=l.y,a=this.container.scrollWidth,b=this.container.scrollHeight,a>g&&(n=0),b>f&&(p=0),this.view.setTranslate(Math.floor(n/2-k.x),Math.floor(p/2-k.y)),this.container.scrollLeft=
+(a-g)/2,this.container.scrollTop=(b-f)/2):this.view.setTranslate(a?Math.floor(l.x-k.x*m+n*c/m):l.x,b?Math.floor(l.y-k.y*m+p*d/m):l.y)};
mxGraph.prototype.zoom=function(a,b){b=null!=b?b:this.centerZoom;var c=Math.round(this.view.scale*a*100)/100,d=this.view.getState(this.getSelectionCell());a=c/this.view.scale;if(this.keepSelectionVisibleOnZoom&&null!=d)d=new mxRectangle(d.x*a,d.y*a,d.width*a,d.height*a),this.view.scale=c,this.scrollRectToVisible(d)||(this.view.revalidate(),this.view.setScale(c));else if(d=mxUtils.hasScrollbars(this.container),b&&!d){var d=this.container.offsetWidth,e=this.container.offsetHeight;if(1<a)var f=(a-1)/
(2*c),d=d*-f,e=e*-f;else f=(1/a-1)/(2*this.view.scale),d*=f,e*=f;this.view.scaleAndTranslate(c,this.view.translate.x+d,this.view.translate.y+e)}else{var f=this.view.translate.x,g=this.view.translate.y,k=this.container.scrollLeft,l=this.container.scrollTop;this.view.setScale(c);d&&(e=d=0,b&&(d=this.container.offsetWidth*(a-1)/2,e=this.container.offsetHeight*(a-1)/2),this.container.scrollLeft=(this.view.translate.x-f)*this.view.scale+Math.round(k*a+d),this.container.scrollTop=(this.view.translate.y-
g)*this.view.scale+Math.round(l*a+e))}};
diff --git a/src/main/java/com/mxgraph/online/AbsAuthServlet.java b/src/main/java/com/mxgraph/online/AbsAuthServlet.java
index 168f0237..0f10c4de 100644
--- a/src/main/java/com/mxgraph/online/AbsAuthServlet.java
+++ b/src/main/java/com/mxgraph/online/AbsAuthServlet.java
@@ -72,51 +72,37 @@ abstract public class AbsAuthServlet extends HttpServlet
stateVars.put(keyVal[0], keyVal[1]);
}
}
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- int configIndex = 0;
-
- try
- {
+
+ int configIndex = 0;
+
String appIndex = stateVars.get("appIndex");
if (appIndex != null)
{
configIndex = Integer.parseInt(appIndex);
}
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- Config CONFIG = getConfig();
- String secret, client, redirectUri;
- String[] secrets, clients;
-
- if ("127.0.0.1".equals(request.getServerName()))
- {
- secrets = CONFIG.DEV_CLIENT_SECRET.split(SEPARATOR);
- clients = CONFIG.DEV_CLIENT_ID.split(SEPARATOR);
- redirectUri = CONFIG.DEV_REDIRECT_URI;
- }
- else
- {
- secrets = CONFIG.CLIENT_SECRET.split(SEPARATOR);
- clients = CONFIG.CLIENT_ID.split(SEPARATOR);
- redirectUri = CONFIG.REDIRECT_URI;
- }
-
- secret = secrets.length > configIndex ? secrets[configIndex] : secrets[0];
- client = clients.length > configIndex ? clients[configIndex] : clients[0];
+
+ Config CONFIG = getConfig();
+ String secret, client, redirectUri;
+ String[] secrets, clients;
- if (error != null)
- {
- try
+ if ("127.0.0.1".equals(request.getServerName()))
+ {
+ secrets = CONFIG.DEV_CLIENT_SECRET.split(SEPARATOR);
+ clients = CONFIG.DEV_CLIENT_ID.split(SEPARATOR);
+ redirectUri = CONFIG.DEV_REDIRECT_URI;
+ }
+ else
+ {
+ secrets = CONFIG.CLIENT_SECRET.split(SEPARATOR);
+ clients = CONFIG.CLIENT_ID.split(SEPARATOR);
+ redirectUri = CONFIG.REDIRECT_URI;
+ }
+
+ secret = secrets.length > configIndex ? secrets[configIndex] : secrets[0];
+ client = clients.length > configIndex ? clients[configIndex] : clients[0];
+
+ if (error != null)
{
response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
@@ -130,137 +116,132 @@ abstract public class AbsAuthServlet extends HttpServlet
writer.flush();
writer.close();
}
- catch(Exception e)
+ else if (code == null && refreshToken == null)
{
- e.printStackTrace();
- response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+ response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
}
- }
- else if (code == null && refreshToken == null)
- {
- response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
- }
- else
- {
- HttpURLConnection con = null;
-
- try
+ else
{
- String url = CONFIG.AUTH_SERVICE_URL;
- URL obj = new URL(url);
- con = (HttpURLConnection) obj.openConnection();
-
- con.setRequestMethod("POST");
- con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
-
- boolean jsonResponse = false;
- StringBuilder urlParameters = new StringBuilder();
-
- urlParameters.append("client_id=");
- urlParameters.append(client);
- urlParameters.append("&redirect_uri=");
- urlParameters.append(redirectUri);
- urlParameters.append("&client_secret=");
- urlParameters.append(secret);
+ HttpURLConnection con = null;
- if (code != null)
- {
- urlParameters.append("&code=");
- urlParameters.append(code);
- urlParameters.append("&grant_type=authorization_code");
- }
- else
+ try
{
- urlParameters.append("&refresh_token=");
- urlParameters.append(refreshToken);
- urlParameters.append("&grant_type=refresh_token");
- jsonResponse = true;
- }
-
- // Send post request
- con.setDoOutput(true);
- DataOutputStream wr = new DataOutputStream(con.getOutputStream());
- wr.writeBytes(urlParameters.toString());
- wr.flush();
- wr.close();
+ String url = CONFIG.AUTH_SERVICE_URL;
+ URL obj = new URL(url);
+ con = (HttpURLConnection) obj.openConnection();
+
+ con.setRequestMethod("POST");
+ con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
+
+ boolean jsonResponse = false;
+ StringBuilder urlParameters = new StringBuilder();
+
+ urlParameters.append("client_id=");
+ urlParameters.append(client);
+ urlParameters.append("&redirect_uri=");
+ urlParameters.append(redirectUri);
+ urlParameters.append("&client_secret=");
+ urlParameters.append(secret);
+
+ if (code != null)
+ {
+ urlParameters.append("&code=");
+ urlParameters.append(code);
+ urlParameters.append("&grant_type=authorization_code");
+ }
+ else
+ {
+ urlParameters.append("&refresh_token=");
+ urlParameters.append(refreshToken);
+ urlParameters.append("&grant_type=refresh_token");
+ jsonResponse = true;
+ }
+
+ // Send post request
+ con.setDoOutput(true);
+ DataOutputStream wr = new DataOutputStream(con.getOutputStream());
+ wr.writeBytes(urlParameters.toString());
+ wr.flush();
+ wr.close();
+
+ BufferedReader in = new BufferedReader(
+ new InputStreamReader(con.getInputStream()));
+ String inputLine;
+ StringBuffer authRes = new StringBuffer();
+
+ while ((inputLine = in.readLine()) != null)
+ {
+ authRes.append(inputLine);
+ }
+ in.close();
- BufferedReader in = new BufferedReader(
- new InputStreamReader(con.getInputStream()));
- String inputLine;
- StringBuffer authRes = new StringBuffer();
+ response.setStatus(con.getResponseCode());
+
+ OutputStream out = response.getOutputStream();
+
+ PrintWriter writer = new PrintWriter(out);
- while ((inputLine = in.readLine()) != null)
- {
- authRes.append(inputLine);
+ // Writes JavaScript code
+ writer.println(processAuthResponse(authRes.toString(), jsonResponse));
+
+ writer.flush();
+ writer.close();
}
- in.close();
-
- response.setStatus(con.getResponseCode());
-
- OutputStream out = response.getOutputStream();
-
- PrintWriter writer = new PrintWriter(out);
-
- // Writes JavaScript code
- writer.println(processAuthResponse(authRes.toString(), jsonResponse));
-
- writer.flush();
- writer.close();
- }
- catch(IOException e)
- {
- e.printStackTrace();
- StringBuilder details = new StringBuilder("");
-
- if (con != null)
+ catch(IOException e)
{
- try
+ e.printStackTrace();
+ StringBuilder details = new StringBuilder("");
+
+ if (con != null)
{
- BufferedReader in = new BufferedReader(
- new InputStreamReader(con.getErrorStream()));
-
- String inputLine;
-
- while ((inputLine = in.readLine()) != null)
+ try
+ {
+ BufferedReader in = new BufferedReader(
+ new InputStreamReader(con.getErrorStream()));
+
+ String inputLine;
+
+ while ((inputLine = in.readLine()) != null)
+ {
+ System.err.println(inputLine);
+ details.append(inputLine);
+ details.append("\n");
+ }
+ in.close();
+ }
+ catch (Exception e2)
{
- System.err.println(inputLine);
- details.append(inputLine);
- details.append("\n");
+ // Ignore
}
- in.close();
}
- catch (Exception e2)
+
+ if (e.getMessage() != null && e.getMessage().contains("401"))
{
- // Ignore
+ response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
+ }
+ else
+ {
+ response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
- }
-
- if (e.getMessage() != null && e.getMessage().contains("401"))
- {
- response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
- }
- else
- {
- response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
- }
-
- if (DEBUG)
- {
- OutputStream out = response.getOutputStream();
- PrintWriter writer = new PrintWriter(out);
-
- e.printStackTrace(writer);
- writer.println(details.toString());
+ if (DEBUG)
+ {
+ OutputStream out = response.getOutputStream();
+
+ PrintWriter writer = new PrintWriter(out);
- writer.flush();
- writer.close();
+ e.printStackTrace(writer);
+ writer.println(details.toString());
+
+ writer.flush();
+ writer.close();
+ }
}
}
- catch (Exception e)
- {
- response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
- }
+ }
+ catch (Exception e)
+ {
+ response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
}
diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest
index 6c4810e3..5482a752 100644
--- a/src/main/webapp/cache.manifest
+++ b/src/main/webapp/cache.manifest
@@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 10/14/2019 01:46 PM
+# 10/16/2019 02:41 PM
app.html
index.html?offline=1
diff --git a/src/main/webapp/export3.html b/src/main/webapp/export3.html
index c4387d76..a6534e8e 100644
--- a/src/main/webapp/export3.html
+++ b/src/main/webapp/export3.html
@@ -643,7 +643,13 @@
pageId = diagrams[i].getAttribute('id')
}
- xmlDoc = mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent(diagrams[i])));
+ xmlDoc = Editor.parseDiagramNode(diagrams[i]);
+
+ if (xmlDoc != null)
+ {
+ xmlDoc = xmlDoc.ownerDocument;
+ }
+
graph.getModel().clear();
from = i;
renderPage();
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 289499b5..e84017e2 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -1356,8 +1356,8 @@ this.shiftPreview1.parentNode.removeChild(this.shiftPreview1);this.shiftPreview1
"absolute";this.shiftPreview1.style.overflow="visible";this.shiftPreview2=document.createElement("div");this.shiftPreview2.style.position="absolute";this.shiftPreview2.style.overflow="visible";for(var f=this.shiftPreview1,d=this.container.firstChild;null!=d;)e=d.nextSibling,d!=c.parentNode?f.appendChild(d):f=this.shiftPreview2,d=e;null!=this.shiftPreview1.firstChild&&this.container.insertBefore(this.shiftPreview1,c.parentNode);null!=this.shiftPreview2.firstChild&&this.container.appendChild(this.shiftPreview2)}this.shiftPreview1.style.left=
a+"px";this.shiftPreview1.style.top=b+"px";this.shiftPreview2.style.left=a+"px";this.shiftPreview2.style.top=b+"px"}else c.style.left=a+"px",c.style.top=b+"px";this.panDx=a;this.panDy=b;this.fireEvent(new mxEventObject(mxEvent.PAN))}};mxGraph.prototype.zoomIn=function(){this.zoom(this.zoomFactor)};mxGraph.prototype.zoomOut=function(){this.zoom(1/this.zoomFactor)};
mxGraph.prototype.zoomActual=function(){1==this.view.scale?this.view.setTranslate(0,0):(this.view.translate.x=0,this.view.translate.y=0,this.view.setScale(1))};mxGraph.prototype.zoomTo=function(a,b){this.zoom(a/this.view.scale,b)};
-mxGraph.prototype.center=function(a,b,c,d){a=null!=a?a:!0;b=null!=b?b:!0;c=null!=c?c:.5;d=null!=d?d:.5;var e=mxUtils.hasScrollbars(this.container),f=this.container.clientWidth,g=this.container.clientHeight,k=this.getGraphBounds(),l=this.view.translate,m=this.view.scale,n=a?f-k.width:0,p=b?g-k.height:0;e?(k.x-=l.x,k.y-=l.y,a=this.container.scrollWidth,b=this.container.scrollHeight,a>f&&(n=0),b>g&&(p=0),this.view.setTranslate(Math.floor(n/2-k.x),Math.floor(p/2-k.y)),this.container.scrollLeft=(a-f)/
-2,this.container.scrollTop=(b-g)/2):this.view.setTranslate(a?Math.floor(l.x-k.x*m+n*c/m):l.x,b?Math.floor(l.y-k.y*m+p*d/m):l.y)};
+mxGraph.prototype.center=function(a,b,c,d){a=null!=a?a:!0;b=null!=b?b:!0;c=null!=c?c:.5;d=null!=d?d:.5;var e=mxUtils.hasScrollbars(this.container),f=2*this.getBorder(),g=this.container.clientWidth-f,f=this.container.clientHeight-f,k=this.getGraphBounds(),l=this.view.translate,m=this.view.scale,n=a?g-k.width:0,p=b?f-k.height:0;e?(k.x-=l.x,k.y-=l.y,a=this.container.scrollWidth,b=this.container.scrollHeight,a>g&&(n=0),b>f&&(p=0),this.view.setTranslate(Math.floor(n/2-k.x),Math.floor(p/2-k.y)),this.container.scrollLeft=
+(a-g)/2,this.container.scrollTop=(b-f)/2):this.view.setTranslate(a?Math.floor(l.x-k.x*m+n*c/m):l.x,b?Math.floor(l.y-k.y*m+p*d/m):l.y)};
mxGraph.prototype.zoom=function(a,b){b=null!=b?b:this.centerZoom;var c=Math.round(this.view.scale*a*100)/100,d=this.view.getState(this.getSelectionCell());a=c/this.view.scale;if(this.keepSelectionVisibleOnZoom&&null!=d)d=new mxRectangle(d.x*a,d.y*a,d.width*a,d.height*a),this.view.scale=c,this.scrollRectToVisible(d)||(this.view.revalidate(),this.view.setScale(c));else if(d=mxUtils.hasScrollbars(this.container),b&&!d){var d=this.container.offsetWidth,e=this.container.offsetHeight;if(1<a)var f=(a-1)/
(2*c),d=d*-f,e=e*-f;else f=(1/a-1)/(2*this.view.scale),d*=f,e*=f;this.view.scaleAndTranslate(c,this.view.translate.x+d,this.view.translate.y+e)}else{var f=this.view.translate.x,g=this.view.translate.y,k=this.container.scrollLeft,l=this.container.scrollTop;this.view.setScale(c);d&&(e=d=0,b&&(d=this.container.offsetWidth*(a-1)/2,e=this.container.offsetHeight*(a-1)/2),this.container.scrollLeft=(this.view.translate.x-f)*this.view.scale+Math.round(k*a+d),this.container.scrollTop=(this.view.translate.y-
g)*this.view.scale+Math.round(l*a+e))}};
@@ -2507,7 +2507,8 @@ Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPatte
Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.getLayout=function(a){a=this.graph.getCellStyle(a);if(null!=a){if("stackLayout"==a.childLayout){var c=new mxStackLayout(this.graph,!0);c.resizeParentMax="1"==mxUtils.getValue(a,"resizeParentMax","1");c.horizontal="1"==mxUtils.getValue(a,"horizontalStack","1");c.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1");c.resizeLast="1"==mxUtils.getValue(a,"resizeLast","0");c.spacing=a.stackSpacing||
c.spacing;c.border=a.stackBorder||c.border;c.marginLeft=a.marginLeft||0;c.marginRight=a.marginRight||0;c.marginTop=a.marginTop||0;c.marginBottom=a.marginBottom||0;c.fill=!0;return c}if("treeLayout"==a.childLayout)return c=new mxCompactTreeLayout(this.graph),c.horizontal="1"==mxUtils.getValue(a,"horizontalTree","1"),c.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),c.groupPadding=mxUtils.getValue(a,"parentPadding",20),c.levelDistance=mxUtils.getValue(a,"treeLevelDistance",30),c.maintainParentLocation=
!0,c.edgeRouting=!1,c.resetEdges=!1,c;if("flowLayout"==a.childLayout)return c=new mxHierarchicalLayout(this.graph,mxUtils.getValue(a,"flowOrientation",mxConstants.DIRECTION_EAST)),c.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),c.parentBorder=mxUtils.getValue(a,"parentPadding",20),c.maintainParentLocation=!0,c.intraCellSpacing=mxUtils.getValue(a,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),c.interRankCellSpacing=mxUtils.getValue(a,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),
-c.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),c.parallelEdgeSpacing=mxUtils.getValue(a,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),c}return null}};Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
+c.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),c.parallelEdgeSpacing=mxUtils.getValue(a,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),c;if("circleLayout"==a.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==a.childLayout)return new mxFastOrganicLayout(this.graph)}return null}};
+Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),c=this.getGraphBounds();if(0==c.width||0==c.height)return new mxRectangle(0,0,1,1);var d=Math.ceil(c.x/this.view.scale-this.view.translate.x),b=Math.ceil(c.y/this.view.scale-this.view.translate.y),f=Math.floor(d/a.width),e=Math.floor(b/a.height);return new mxRectangle(f,e,Math.ceil((d+Math.floor(c.width/this.view.scale))/a.width)-f,Math.ceil((b+Math.floor(c.height/this.view.scale))/a.height)-e)};
Graph.prototype.sanitizeHtml=function(a,c){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};Graph.prototype.updatePlaceholders=function(){var a=!1,c;for(c in this.model.cells){var d=this.model.cells[c];this.isReplacePlaceholders(d)&&(this.view.invalidate(d,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
Graph.prototype.isZoomWheelEvent=function(a){return mxEvent.isAltDown(a)||mxEvent.isMetaDown(a)&&mxClient.IS_MAC||mxEvent.isControlDown(a)&&!mxClient.IS_MAC};Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)};
@@ -7904,7 +7905,7 @@ u.className="geBtn";a.editor.cancelFirst&&d.appendChild(u);if(!a.isOffline()&&"u
g.className="geBtn";d.appendChild(g);null!=a.drive&&"1"==urlParams.photos&&(g=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(a.drive.token).addView(google.picker.ViewId.PHOTO_UPLOAD);a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0)}))}),
g.className="geBtn",d.appendChild(g))}g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();c(""!=m.value?new mxImage(mxUtils.trim(m.value),n.value,p.value):null)});g.className="geBtn gePrimaryBtn";d.appendChild(g);a.editor.cancelFirst||d.appendChild(u);b.appendChild(d);this.container=b},ParseDialog=function(a,c,b){function d(b,c){var g=b.split("\n");if("plantUmlPng"==c||"plantUmlSvg"==c||"plantUmlTxt"==c){if(a.spinner.spin(document.body,mxResources.get("inserting"))){var k=a.editor.graph,
q="plantUmlTxt"==c?"txt":"plantUmlPng"==c?"png":"svg";a.generatePlantUmlImage(b,q,function(c,g,d){a.spinner.stop();var t=null;k.getModel().beginUpdate();try{t="txt"==q?a.insertAsPreText(c,f.x,f.y):k.insertVertex(null,null,null,f.x,f.y,g,d,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(c)+";"),k.setAttributeForCell(t,"plantUmlData",JSON.stringify({data:b,format:q}))}finally{k.getModel().endUpdate()}null!=t&&(k.setSelectionCell(t),k.scrollCellToVisible(t))},
-function(b){a.handleError(e)})}}else if("table"==c){for(var d=null,l=[],x=0,m=0;m<g.length;m++){var v=mxUtils.trim(g[m]);if("create table"==v.substring(0,12).toLowerCase())v=mxUtils.trim(v.substring(12)),"("==v.charAt(v.length-1)&&(v=v.substring(0,v.lastIndexOf(" "))),d=new mxCell(v,new mxGeometry(x,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),
+function(b){a.handleError(b)})}}else if("table"==c){for(var d=null,l=[],x=0,m=0;m<g.length;m++){var v=mxUtils.trim(g[m]);if("create table"==v.substring(0,12).toLowerCase())v=mxUtils.trim(v.substring(12)),"("==v.charAt(v.length-1)&&(v=v.substring(0,v.lastIndexOf(" "))),d=new mxCell(v,new mxGeometry(x,0,160,26),"swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=#e0e0e0;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;align=center;"),
d.vertex=!0,l.push(d),v=a.editor.graph.getPreferredSizeForCell(F),null!=v&&(d.geometry.width=v.width+10);else if(null!=d&&")"==v.charAt(0))x+=d.geometry.width+40,d=null;else if("("!=v&&null!=d&&(v=v.substring(0,","==v.charAt(v.length-1)?v.length-1:v.length),"primary key"!=v.substring(0,11).toLowerCase())){var B=v.toLowerCase().indexOf("primary key"),v=v.replace(/primary key/i,""),F=new mxCell(v,new mxGeometry(0,0,90,26),"shape=partialRectangle;top=0;left=0;right=0;bottom=0;align=left;verticalAlign=top;spacingTop=-2;fillColor=none;spacingLeft=34;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;dropTarget=0;");
F.vertex=!0;v=sb.cloneCell(F,0<B?"PK":"");v.connectable=!1;v.style="shape=partialRectangle;top=0;left=0;bottom=0;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[];portConstraint=eastwest;part=1;";v.geometry.width=30;v.geometry.height=26;F.insert(v);v=a.editor.graph.getPreferredSizeForCell(F);null!=v&&d.geometry.width<v.width+10&&(d.geometry.width=Math.min(220,v.width+10));d.insert(F);d.geometry.height+=26}}0<l.length&&(k=a.editor.graph,
m=k.view,g=k.getGraphBounds(),k.setSelectionCells(k.importCells(l,Math.ceil(Math.max(0,g.x/m.scale-m.translate.x)+4*k.gridSize),Math.ceil(Math.max(0,(g.y+g.height)/m.scale-m.translate.y)+4*k.gridSize))),k.scrollCellToVisible(k.getSelectionCell()))}else if("list"==c){if(0<g.length){k=a.editor.graph;F=null;l=[];for(m=d=0;m<g.length;m++)";"!=g[m].charAt(0)&&(0==g[m].length?F=null:null==F?(F=new mxCell(g[m],new mxGeometry(d,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;"),
@@ -7913,8 +7914,8 @@ x.vertex=!0,v=k.getPreferredSizeForCell(x),null!=v&&x.geometry.width<v.width&&(x
function(a){var b=p[a];null==b&&(b=new mxCell(a,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),b.vertex=!0,p[a]=b,l.push(b));return b},p={},l=[],m=0;m<g.length;m++)if(";"!=g[m].charAt(0)){var n=g[m].split("->");if(2<=n.length){var B=F(n[0]),u=F(n[n.length-1]),n=new mxCell(2<n.length?n[1]:"",new mxGeometry);n.edge=!0;B.insertEdge(n,!0);u.insertEdge(n,!1);l.push(n)}}if(0<l.length){g=document.createElement("div");g.style.visibility="hidden";document.body.appendChild(g);k=new Graph(g);k.getModel().beginUpdate();
try{l=k.importCells(l);for(m=0;m<l.length;m++)k.getModel().isVertex(l[m])&&(v=k.getPreferredSizeForCell(l[m]),l[m].geometry.width=Math.max(l[m].geometry.width,v.width),l[m].geometry.height=Math.max(l[m].geometry.height,v.height));d=new mxFastOrganicLayout(k);d.disableEdgeStyle=!1;d.forceConstant=120;d.execute(k.getDefaultParent());x=new mxParallelEdgeLayout(k);x.spacing=20;x.execute(k.getDefaultParent())}finally{k.getModel().endUpdate()}k.clearCellOverlays();v=[];a.editor.graph.getModel().beginUpdate();
try{v=a.editor.graph.importCells(k.getModel().getChildren(k.getDefaultParent()),f.x,f.y),a.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",v))}finally{a.editor.graph.getModel().endUpdate()}a.editor.graph.setSelectionCells(v);a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());k.destroy();g.parentNode.removeChild(g)}}}function m(){return"list"==n.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":
-"table"==n.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==n.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":
-"plantUmlSvg"==n.value||"plantUmlTxt"==n.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var f=a.editor.graph.getFreeInsertPoint();c=document.createElement("div");c.style.textAlign="right";var l=document.createElement("textarea");l.style.resize="none";l.style.width="100%";l.style.height=
+"table"==n.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==n.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
+"plantUmlSvg"==n.value||"plantUmlTxt"==n.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var f=a.editor.graph.getFreeInsertPoint();c=document.createElement("div");c.style.textAlign="right";var l=document.createElement("textarea");l.style.resize="none";l.style.width="100%";l.style.height=
"354px";l.style.marginBottom="16px";var n=document.createElement("select");"formatSql"==b&&(n.style.display="none");var p=document.createElement("option");p.setAttribute("value","list");mxUtils.write(p,mxResources.get("list"));"plantUml"!=b&&n.appendChild(p);null!=b&&"fromText"!=b||p.setAttribute("selected","selected");p=document.createElement("option");p.setAttribute("value","table");mxUtils.write(p,mxResources.get("formatSql"));"formatSql"==b&&(n.appendChild(p),p.setAttribute("selected","selected"));
p=document.createElement("option");p.setAttribute("value","diagram");mxUtils.write(p,mxResources.get("diagram"));"plantUml"!=b&&n.appendChild(p);p=document.createElement("option");p.setAttribute("value","plantUmlSvg");mxUtils.write(p,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==b&&p.setAttribute("selected","selected");var u=document.createElement("option");u.setAttribute("value","plantUmlPng");mxUtils.write(u,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+
")");var g=document.createElement("option");g.setAttribute("value","plantUmlTxt");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&"plantUml"==b&&(n.appendChild(p),n.appendChild(u),n.appendChild(g));var k=m();l.value=k;c.appendChild(l);this.init=function(){l.focus()};Graph.fileSupport&&(l.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),l.addEventListener("drop",function(a){a.stopPropagation();
@@ -8299,7 +8300,7 @@ q.appendChild(l);a.isOffline()||(C=mxUtils.button(mxResources.get("help"),functi
a.editor.cancelFirst||q.appendChild(l);d.appendChild(q);this.container=d};var x=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);this.page!=this.ui.currentPage?null!=this.page.viewState&&(this.ignoreColor||(this.page.viewState.background=this.color),this.ignoreImage||(this.page.viewState.backgroundImage=this.image),null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=
this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)):(x.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible))};Editor.prototype.useCanvasForExport=!1;try{var C=
document.createElement("canvas"),G=new Image;G.onload=function(){try{C.getContext("2d").drawImage(G,0,0);var a=C.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=a&&6<a.length}catch(F){}};G.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(B){}})();
-(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="12.1.1";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";
+(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="12.1.2";EditorUi.compactUi="atlas"!=uiTheme;mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";"dark"==uiTheme&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";
EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl="1"==urlParams.dev?"/cache":"https://rt.draw.io/cache";Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.scratchpadHelpLink="https://desk.draw.io/support/solutions/articles/16000042367";EditorUi.logError=function(a,b,c,d,f){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,
c,d,f);else if(EditorUi.enableLogging)try{if(a!=EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var g=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",k=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";f=null!=f?f:Error(a);(new Image).src=k+"/log?severity="+g+"&v="+encodeURIComponent(EditorUi.VERSION)+
"&msg=clientError:"+encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=f&&null!=f.stack?"&stack="+encodeURIComponent(f.stack):"")}}catch(z){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=
@@ -9536,9 +9537,9 @@ a:Math.floor(((f.x+1)/a-d.x)/q.pageFormat.width)*q.pageFormat.width*a);var B,F,E
b?g.height:g.width):b?g.height:g.width;m&&(k.fillStyle=p.outBkgClr,b?(k.fillRect(0,l,l,u-l),k.fillRect(0,c,l,g.height)):(k.fillRect(l,0,u-l,l),k.fillRect(c,0,g.width,l)));k.fillStyle=p.fontClr;for(m=m?u:u%(d*a);m<=c;m+=d*a)if(f=Math.round((m-u)/a/d),!(m<l||f==B)){B=f;var I=null;0==f%E&&(I=n.formatText(y+f*d)+"");b?v(l-F[Math.abs(f)%E],m,l,m,I):v(m,l-F[Math.abs(f)%E],m,l,I)}k.lineWidth=1;v(b?0:l,b?l:0,l,l);k.fillStyle=p.cornerClr;k.fillRect(0,0,l,l)};this.drawRuler=y;this.sizeListener=c=f(function(){var a=
q.container;b?(a=a.offsetHeight+l,g.height!=a&&(g.height=a,u.style.height=a+"px",y())):(a=a.offsetWidth+l,g.width!=a&&(g.width=a,u.style.width=a+"px",y()))},10);this.pageListener=function(){y()};this.scrollListener=d=f(function(){var a=b?q.container.scrollTop:q.container.scrollLeft;n.lastScroll!=a&&(n.lastScroll=a,y())},10);this.unitListener=function(a,b){n.setUnit(b.getProperty("unit"))};q.addListener(mxEvent.SIZE,c);q.container.addEventListener("scroll",d);q.view.addListener("unitChanged",this.unitListener);
a.addListener("pageViewChanged",this.pageListener);a.addListener("pageScaleChanged",this.pageListener);a.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(a){p=a;u.style.background=p.bkgClr;y()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(a,c,d,f){var g;if(b&&4<a.height||!b&&4<a.width){if(null!=n.guidePart)try{k.putImageData(n.guidePart.imgData1,n.guidePart.x1,n.guidePart.y1),k.putImageData(n.guidePart.imgData2,n.guidePart.x2,n.guidePart.y2),k.putImageData(n.guidePart.imgData3,
-n.guidePart.x3,n.guidePart.y3)}catch(L){}g=n.origGuideMove.apply(this,arguments);var m,q,t,u,y,A,z,D,H;k.lineWidth=.5;k.strokeStyle=p.guideClr;k.setLineDash([2]);b?(q=a.y+g.y+l-this.graph.container.scrollTop,m=0,y=q+a.height/2,u=l/2,D=q+a.height,z=0,t=k.getImageData(m,q-1,l,3),v(m,q,l,q),q--,A=k.getImageData(u,y-1,l,3),v(u,y,l,y),y--,H=k.getImageData(z,D-1,l,3),v(z,D,l,D),D--):(q=0,m=a.x+g.x+l-this.graph.container.scrollLeft,y=l/2,u=m+a.width/2,D=0,z=m+a.width,t=k.getImageData(m-1,q,3,l),v(m,q,m,
-l),m--,A=k.getImageData(u-1,y,3,l),v(u,y,u,l),u--,H=k.getImageData(z-1,D,3,l),v(z,D,z,l),z--);if(null==n.guidePart||n.guidePart.x1!=m||n.guidePart.y1!=q)n.guidePart={imgData1:t,x1:m,y1:q,imgData2:A,x2:u,y2:y,imgData3:H,x3:z,y3:D}}else g=n.origGuideMove.apply(this,arguments);return g};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var a=n.origGuideDestroy.apply(this,arguments);if(null!=n.guidePart)try{k.putImageData(n.guidePart.imgData1,n.guidePart.x1,n.guidePart.y1),
-k.putImageData(n.guidePart.imgData2,n.guidePart.x2,n.guidePart.y2),k.putImageData(n.guidePart.imgData3,n.guidePart.x3,n.guidePart.y3),n.guidePart=null}catch(A){}return a}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(a){this.unit=a;this.drawRuler()};
+n.guidePart.x3,n.guidePart.y3)}catch(L){}g=n.origGuideMove.apply(this,arguments);try{var m,q,t,u,y,A,z,D,H;k.lineWidth=.5;k.strokeStyle=p.guideClr;k.setLineDash([2]);b?(q=a.y+g.y+l-this.graph.container.scrollTop,m=0,y=q+a.height/2,u=l/2,D=q+a.height,z=0,t=k.getImageData(m,q-1,l,3),v(m,q,l,q),q--,A=k.getImageData(u,y-1,l,3),v(u,y,l,y),y--,H=k.getImageData(z,D-1,l,3),v(z,D,l,D),D--):(q=0,m=a.x+g.x+l-this.graph.container.scrollLeft,y=l/2,u=m+a.width/2,D=0,z=m+a.width,t=k.getImageData(m-1,q,3,l),v(m,
+q,m,l),m--,A=k.getImageData(u-1,y,3,l),v(u,y,u,l),u--,H=k.getImageData(z-1,D,3,l),v(z,D,z,l),z--);if(null==n.guidePart||n.guidePart.x1!=m||n.guidePart.y1!=q)n.guidePart={imgData1:t,x1:m,y1:q,imgData2:A,x2:u,y2:y,imgData3:H,x3:z,y3:D}}catch(L){}}else g=n.origGuideMove.apply(this,arguments);return g};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var a=n.origGuideDestroy.apply(this,arguments);if(null!=n.guidePart)try{k.putImageData(n.guidePart.imgData1,n.guidePart.x1,
+n.guidePart.y1),k.putImageData(n.guidePart.imgData2,n.guidePart.x2,n.guidePart.y2),k.putImageData(n.guidePart.imgData3,n.guidePart.x3,n.guidePart.y3),n.guidePart=null}catch(A){}return a}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(a){this.unit=a;this.drawRuler()};
mxRuler.prototype.formatText=function(a){switch(this.unit){case mxConstants.POINTS:return Math.round(a);case mxConstants.MILLIMETERS:return(a/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.INCHES:return(a/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
diff --git a/src/main/webapp/js/diagramly/Dialogs.js b/src/main/webapp/js/diagramly/Dialogs.js
index b8d3f844..cadabbd1 100644
--- a/src/main/webapp/js/diagramly/Dialogs.js
+++ b/src/main/webapp/js/diagramly/Dialogs.js
@@ -2085,7 +2085,7 @@ var ParseDialog = function(editorUi, title, defaultType)
graph.setSelectionCell(cell);
graph.scrollCellToVisible(cell);
}
- }, function(err)
+ }, function(e)
{
editorUi.handleError(e);
});
@@ -2462,11 +2462,11 @@ var ParseDialog = function(editorUi, title, defaultType)
}
else if (typeSelect.value == 'plantUmlPng')
{
- return '@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --> Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml';
+ return '@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --> Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml';
}
else if (typeSelect.value == 'plantUmlSvg' || typeSelect.value == 'plantUmlTxt')
{
- return '@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --> Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml';
+ return '@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --> Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml';
}
else
{
diff --git a/src/main/webapp/js/diagramly/GraphViewer.js b/src/main/webapp/js/diagramly/GraphViewer.js
index d1c4abc9..35fcf433 100644
--- a/src/main/webapp/js/diagramly/GraphViewer.js
+++ b/src/main/webapp/js/diagramly/GraphViewer.js
@@ -496,7 +496,8 @@ GraphViewer.prototype.addSizeHandler = function()
if (this.graphConfig['toolbar-nohide'] != true)
{
- if (container.offsetWidth <= tmp.width + 2 * this.graph.border * this.graph.view.scale)
+ // Shows scrollbars if graph is larger than available width
+ if (tmp.width + 2 * this.graph.border > container.offsetWidth - 2)
{
container.style.overflow = 'auto';
}
@@ -516,7 +517,8 @@ GraphViewer.prototype.addSizeHandler = function()
// Workaround for position:relative set in ResizeSensor
var origin = mxUtils.getScrollOrigin(document.body)
- var b = (document.body.style.position === 'relative') ? document.body.getBoundingClientRect() :
+ var b = (document.body.style.position === 'relative') ?
+ document.body.getBoundingClientRect() :
{left: -origin.x, top: -origin.y};
r = {left: r.left - b.left, top: r.top - b.top, bottom: r.bottom - b.top, right: r.right - b.left};
@@ -553,39 +555,42 @@ GraphViewer.prototype.addSizeHandler = function()
{
var cachedOffsetWidth = container.offsetWidth;
- if (cachedOffsetWidth != lastOffsetWidth)
+ if (cachedOffsetWidth != lastOffsetWidth && !this.handlingResize)
{
- if (!this.handlingResize)
- {
- this.handlingResize = true;
-
- this.graph.maxFitScale = (maxScale != null) ? maxScale : (this.graphConfig.zoom ||
- ((this.allowZoomIn) ? null : 1));
- this.graph.fit((maxScale != null) ? 0 : null, null, null, null, false, true);
- var tmp = this.graph.getGraphBounds();
-
- if (this.center)
- {
- this.graph.center();
- }
-
- this.graph.maxFitScale = null;
-
- this.updateContainerHeight(container, Math.max(this.minHeight, tmp.height + 2 * this.graph.border + 1));
+ this.handlingResize = true;
+
+ this.graph.maxFitScale = (maxScale != null) ? maxScale : (this.graphConfig.zoom ||
+ ((this.allowZoomIn) ? null : 1));
+ this.graph.container.style.overflow = 'hidden';
+ this.graph.fit();
- this.graph.initialViewState = {
- translate: this.graph.view.translate.clone(),
- scale: this.graph.view.scale
- };
-
- lastOffsetWidth = cachedOffsetWidth;
-
- // Workaround for fit triggering scrollbars triggering doResize (infinite loop)
- window.setTimeout(mxUtils.bind(this, function()
- {
- this.handlingResize = false;
- }), 0);
+ if (this.center || !(this.graphConfig.resize != false || container.style.height == ''))
+ {
+ this.graph.center();
+ console.log('center0');
+ }
+
+ this.graph.maxFitScale = null;
+
+ if (this.graphConfig.resize != false || container.style.height == '')
+ {
+ this.updateContainerHeight(container, Math.max(this.minHeight,
+ this.graph.getGraphBounds().height +
+ 2 * this.graph.border + 1));
}
+
+ this.graph.initialViewState = {
+ translate: this.graph.view.translate.clone(),
+ scale: this.graph.view.scale
+ };
+
+ lastOffsetWidth = cachedOffsetWidth;
+
+ // Workaround for fit triggering scrollbars triggering doResize (infinite loop)
+ window.setTimeout(mxUtils.bind(this, function()
+ {
+ this.handlingResize = false;
+ }), 0);
}
});
@@ -616,7 +621,10 @@ GraphViewer.prototype.addSizeHandler = function()
this.updateContainerWidth(container, bounds.width + 2 * this.graph.border);
}
- this.updateContainerHeight(container, Math.max(this.minHeight, bounds.height + 2 * this.graph.border + 1));
+ if (this.graphConfig.resize != false || container.style.height == '')
+ {
+ this.updateContainerHeight(container, Math.max(this.minHeight, bounds.height + 2 * this.graph.border + 1));
+ }
if (!this.zoomEnabled && this.autoFit)
{
@@ -672,17 +680,21 @@ GraphViewer.prototype.addSizeHandler = function()
{
var maxScale = null;
- if (maxHeight != null && bounds.height + 2 * this.graph.border > maxHeight)
+ if (maxHeight != null && bounds.height + 2 * this.graph.border > maxHeight - 2)
{
- maxScale = (maxHeight - 2 * this.graph.border) / bounds.height;
+ maxScale = (maxHeight - 2 * this.graph.border - 2) / bounds.height;
}
this.fitGraph(maxScale);
}
+ else if (!this.widthIsEmpty && !(this.graphConfig.resize != false || container.style.height == ''))
+ {
+ this.graph.center((!this.widthIsEmpty || bounds.width < this.minWidth) && this.graphConfig.resize != true);
+ }
else
{
- this.graph.view.setTranslate(Math.floor((this.graph.border - bounds.x) / this.graph.view.scale),
- Math.floor((this.graph.border - bounds.y) / this.graph.view.scale));
+ this.graph.view.setTranslate(Math.floor(this.graph.border - bounds.x / this.graph.view.scale),
+ Math.floor(this.graph.border - bounds.y / this.graph.view.scale));
lastOffsetWidth = container.offsetWidth;
}
diff --git a/src/main/webapp/js/diagramly/mxRuler.js b/src/main/webapp/js/diagramly/mxRuler.js
index c382749b..07f7dce6 100644
--- a/src/main/webapp/js/diagramly/mxRuler.js
+++ b/src/main/webapp/js/diagramly/mxRuler.js
@@ -355,61 +355,68 @@ function mxRuler(editorUi, unit, isVertical, isSecondery)
ret = ruler.origGuideMove.apply(this, arguments);
- var x1, y1, imgData1, x2, y2, imgData2, x3, y3, imgData3;
- ctx.lineWidth = 0.5;
- ctx.strokeStyle = style.guideClr;
- ctx.setLineDash([2]);
-
- if (isVertical)
- {
- y1 = bounds.y + ret.y + RULER_THICKNESS - this.graph.container.scrollTop;
- x1 = 0;
- y2 = y1 + bounds.height / 2;
- x2 = RULER_THICKNESS / 2;
- y3 = y1 + bounds.height;
- x3 = 0;
- imgData1 = ctx.getImageData(x1, y1 - 1, RULER_THICKNESS, 3);
- drawLine(x1, y1, RULER_THICKNESS, y1);
- y1--;
- imgData2 = ctx.getImageData(x2, y2 - 1, RULER_THICKNESS, 3);
- drawLine(x2, y2, RULER_THICKNESS, y2);
- y2--;
- imgData3 = ctx.getImageData(x3, y3 - 1, RULER_THICKNESS, 3);
- drawLine(x3, y3, RULER_THICKNESS, y3);
- y3--;
- }
- else
+ try
{
- y1 = 0;
- x1 = bounds.x + ret.x + RULER_THICKNESS - this.graph.container.scrollLeft;
- y2 = RULER_THICKNESS / 2;
- x2 = x1 + bounds.width / 2;
- y3 = 0;
- x3 = x1 + bounds.width;
- imgData1 = ctx.getImageData(x1 - 1, y1, 3, RULER_THICKNESS);
- drawLine(x1, y1, x1, RULER_THICKNESS);
- x1--;
- imgData2 = ctx.getImageData(x2 - 1, y2, 3, RULER_THICKNESS);
- drawLine(x2, y2, x2, RULER_THICKNESS);
- x2--;
- imgData3 = ctx.getImageData(x3 - 1, y3, 3, RULER_THICKNESS);
- drawLine(x3, y3, x3, RULER_THICKNESS);
- x3--;
+ var x1, y1, imgData1, x2, y2, imgData2, x3, y3, imgData3;
+ ctx.lineWidth = 0.5;
+ ctx.strokeStyle = style.guideClr;
+ ctx.setLineDash([2]);
+
+ if (isVertical)
+ {
+ y1 = bounds.y + ret.y + RULER_THICKNESS - this.graph.container.scrollTop;
+ x1 = 0;
+ y2 = y1 + bounds.height / 2;
+ x2 = RULER_THICKNESS / 2;
+ y3 = y1 + bounds.height;
+ x3 = 0;
+ imgData1 = ctx.getImageData(x1, y1 - 1, RULER_THICKNESS, 3);
+ drawLine(x1, y1, RULER_THICKNESS, y1);
+ y1--;
+ imgData2 = ctx.getImageData(x2, y2 - 1, RULER_THICKNESS, 3);
+ drawLine(x2, y2, RULER_THICKNESS, y2);
+ y2--;
+ imgData3 = ctx.getImageData(x3, y3 - 1, RULER_THICKNESS, 3);
+ drawLine(x3, y3, RULER_THICKNESS, y3);
+ y3--;
+ }
+ else
+ {
+ y1 = 0;
+ x1 = bounds.x + ret.x + RULER_THICKNESS - this.graph.container.scrollLeft;
+ y2 = RULER_THICKNESS / 2;
+ x2 = x1 + bounds.width / 2;
+ y3 = 0;
+ x3 = x1 + bounds.width;
+ imgData1 = ctx.getImageData(x1 - 1, y1, 3, RULER_THICKNESS);
+ drawLine(x1, y1, x1, RULER_THICKNESS);
+ x1--;
+ imgData2 = ctx.getImageData(x2 - 1, y2, 3, RULER_THICKNESS);
+ drawLine(x2, y2, x2, RULER_THICKNESS);
+ x2--;
+ imgData3 = ctx.getImageData(x3 - 1, y3, 3, RULER_THICKNESS);
+ drawLine(x3, y3, x3, RULER_THICKNESS);
+ x3--;
+ }
+
+ if (ruler.guidePart == null || ruler.guidePart.x1 != x1 || ruler.guidePart.y1 != y1)
+ {
+ ruler.guidePart = {
+ imgData1: imgData1,
+ x1: x1,
+ y1: y1,
+ imgData2: imgData2,
+ x2: x2,
+ y2: y2,
+ imgData3: imgData3,
+ x3: x3,
+ y3: y3
+ }
+ }
}
-
- if (ruler.guidePart == null || ruler.guidePart.x1 != x1 || ruler.guidePart.y1 != y1)
+ catch (e)
{
- ruler.guidePart = {
- imgData1: imgData1,
- x1: x1,
- y1: y1,
- imgData2: imgData2,
- x2: x2,
- y2: y2,
- imgData3: imgData3,
- x3: x3,
- y3: y3
- }
+ // ignore
}
}
else
diff --git a/src/main/webapp/js/mxgraph/Graph.js b/src/main/webapp/js/mxgraph/Graph.js
index e13435b2..15366eba 100644
--- a/src/main/webapp/js/mxgraph/Graph.js
+++ b/src/main/webapp/js/mxgraph/Graph.js
@@ -1864,6 +1864,14 @@ Graph.prototype.initLayoutManager = function()
return flowLayout;
}
+ else if (style['childLayout'] == 'circleLayout')
+ {
+ return new mxCircleLayout(this.graph);
+ }
+ else if (style['childLayout'] == 'organicLayout')
+ {
+ return new mxFastOrganicLayout(this.graph);
+ }
}
return null;
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index d95868ed..fd40a988 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -1322,8 +1322,8 @@ this.shiftPreview1.parentNode.removeChild(this.shiftPreview1);this.shiftPreview1
"absolute";this.shiftPreview1.style.overflow="visible";this.shiftPreview2=document.createElement("div");this.shiftPreview2.style.position="absolute";this.shiftPreview2.style.overflow="visible";for(var f=this.shiftPreview1,d=this.container.firstChild;null!=d;)e=d.nextSibling,d!=c.parentNode?f.appendChild(d):f=this.shiftPreview2,d=e;null!=this.shiftPreview1.firstChild&&this.container.insertBefore(this.shiftPreview1,c.parentNode);null!=this.shiftPreview2.firstChild&&this.container.appendChild(this.shiftPreview2)}this.shiftPreview1.style.left=
a+"px";this.shiftPreview1.style.top=b+"px";this.shiftPreview2.style.left=a+"px";this.shiftPreview2.style.top=b+"px"}else c.style.left=a+"px",c.style.top=b+"px";this.panDx=a;this.panDy=b;this.fireEvent(new mxEventObject(mxEvent.PAN))}};mxGraph.prototype.zoomIn=function(){this.zoom(this.zoomFactor)};mxGraph.prototype.zoomOut=function(){this.zoom(1/this.zoomFactor)};
mxGraph.prototype.zoomActual=function(){1==this.view.scale?this.view.setTranslate(0,0):(this.view.translate.x=0,this.view.translate.y=0,this.view.setScale(1))};mxGraph.prototype.zoomTo=function(a,b){this.zoom(a/this.view.scale,b)};
-mxGraph.prototype.center=function(a,b,c,d){a=null!=a?a:!0;b=null!=b?b:!0;c=null!=c?c:.5;d=null!=d?d:.5;var e=mxUtils.hasScrollbars(this.container),f=this.container.clientWidth,g=this.container.clientHeight,k=this.getGraphBounds(),l=this.view.translate,m=this.view.scale,n=a?f-k.width:0,p=b?g-k.height:0;e?(k.x-=l.x,k.y-=l.y,a=this.container.scrollWidth,b=this.container.scrollHeight,a>f&&(n=0),b>g&&(p=0),this.view.setTranslate(Math.floor(n/2-k.x),Math.floor(p/2-k.y)),this.container.scrollLeft=(a-f)/
-2,this.container.scrollTop=(b-g)/2):this.view.setTranslate(a?Math.floor(l.x-k.x*m+n*c/m):l.x,b?Math.floor(l.y-k.y*m+p*d/m):l.y)};
+mxGraph.prototype.center=function(a,b,c,d){a=null!=a?a:!0;b=null!=b?b:!0;c=null!=c?c:.5;d=null!=d?d:.5;var e=mxUtils.hasScrollbars(this.container),f=2*this.getBorder(),g=this.container.clientWidth-f,f=this.container.clientHeight-f,k=this.getGraphBounds(),l=this.view.translate,m=this.view.scale,n=a?g-k.width:0,p=b?f-k.height:0;e?(k.x-=l.x,k.y-=l.y,a=this.container.scrollWidth,b=this.container.scrollHeight,a>g&&(n=0),b>f&&(p=0),this.view.setTranslate(Math.floor(n/2-k.x),Math.floor(p/2-k.y)),this.container.scrollLeft=
+(a-g)/2,this.container.scrollTop=(b-f)/2):this.view.setTranslate(a?Math.floor(l.x-k.x*m+n*c/m):l.x,b?Math.floor(l.y-k.y*m+p*d/m):l.y)};
mxGraph.prototype.zoom=function(a,b){b=null!=b?b:this.centerZoom;var c=Math.round(this.view.scale*a*100)/100,d=this.view.getState(this.getSelectionCell());a=c/this.view.scale;if(this.keepSelectionVisibleOnZoom&&null!=d)d=new mxRectangle(d.x*a,d.y*a,d.width*a,d.height*a),this.view.scale=c,this.scrollRectToVisible(d)||(this.view.revalidate(),this.view.setScale(c));else if(d=mxUtils.hasScrollbars(this.container),b&&!d){var d=this.container.offsetWidth,e=this.container.offsetHeight;if(1<a)var f=(a-1)/
(2*c),d=d*-f,e=e*-f;else f=(1/a-1)/(2*this.view.scale),d*=f,e*=f;this.view.scaleAndTranslate(c,this.view.translate.x+d,this.view.translate.y+e)}else{var f=this.view.translate.x,g=this.view.translate.y,k=this.container.scrollLeft,l=this.container.scrollTop;this.view.setScale(c);d&&(e=d=0,b&&(d=this.container.offsetWidth*(a-1)/2,e=this.container.offsetHeight*(a-1)/2),this.container.scrollLeft=(this.view.translate.x-f)*this.view.scale+Math.round(k*a+d),this.container.scrollTop=(this.view.translate.y-
g)*this.view.scale+Math.round(l*a+e))}};
@@ -2097,7 +2097,7 @@ this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return ke
null!=f?f.split(";"):[],f=0;f<m.length;f++){var v=m[f],p=v.indexOf("=");if(0<=p){k=v.substring(0,p);var t=v.substring(p+1);null!=b[k]&&"none"==t&&(a.push(t),g.push(k))}}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",g,"values",a,"cells",[c.cell]))}}catch(H){this.handleError(H)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);
this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var y=["fontFamily","fontSize","fontColor"],F="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),v=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],y,["opacity"],["align"],["html"]];for(a=0;a<v.length;a++)for(b=0;b<v[a].length;b++)u.push(v[a][b]);for(a=0;a<G.length;a++)0>
mxUtils.indexOf(u,G[a])&&u.push(G[a]);var D=function(a,c){var g=d.getModel();g.beginUpdate();try{if(c)for(var b=g.isEdge(p),k=b?d.currentEdgeStyle:d.currentVertexStyle,b=["fontSize","fontFamily","fontColor"],f=0;f<b.length;f++){var m=k[b[f]];null!=m&&d.setCellStyles(b[f],m,a)}else for(m=0;m<a.length;m++){for(var p=a[m],t=g.getStyle(p),D=null!=t?t.split(";"):[],z=u.slice(),f=0;f<D.length;f++){var l=D[f],A=l.indexOf("=");if(0<=A){var y=l.substring(0,A),ba=mxUtils.indexOf(z,y);0<=ba&&z.splice(ba,1);
-for(var O=0;O<v.length;O++){var x=v[O];if(0<=mxUtils.indexOf(x,y))for(var n=0;n<x.length;n++){var Z=mxUtils.indexOf(z,x[n]);0<=Z&&z.splice(Z,1)}}}}for(var k=(b=g.isEdge(p))?d.currentEdgeStyle:d.currentVertexStyle,q=g.getStyle(p),f=0;f<z.length;f++){var y=z[f],F=k[y];null==F||"shape"==y&&!b||b&&!(0>mxUtils.indexOf(G,y))||(q=mxUtils.setStyle(q,y,F))}g.setStyle(p,q)}}finally{g.endUpdate()}};d.addListener("cellsInserted",function(a,c){D(c.getProperty("cells"))});d.addListener("textInserted",function(a,
+for(var O=0;O<v.length;O++){var n=v[O];if(0<=mxUtils.indexOf(n,y))for(var x=0;x<n.length;x++){var Z=mxUtils.indexOf(z,n[x]);0<=Z&&z.splice(Z,1)}}}}for(var k=(b=g.isEdge(p))?d.currentEdgeStyle:d.currentVertexStyle,q=g.getStyle(p),f=0;f<z.length;f++){var y=z[f],F=k[y];null==F||"shape"==y&&!b||b&&!(0>mxUtils.indexOf(G,y))||(q=mxUtils.setStyle(q,y,F))}g.setStyle(p,q)}}finally{g.endUpdate()}};d.addListener("cellsInserted",function(a,c){D(c.getProperty("cells"))});d.addListener("textInserted",function(a,
c){D(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var g=[c.getProperty("cell")];c.getProperty("terminalInserted")&&g.push(c.getProperty("terminal"));D(g)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var g=c.getProperty("cells"),b=!1,k=!1;if(0<g.length)for(var f=0;f<g.length&&(b=d.getModel().isVertex(g[f])||b,!(k=d.getModel().isEdge(g[f])||k)||!b);f++);else k=b=!0;for(var g=c.getProperty("keys"),m=c.getProperty("values"),f=0;f<g.length;f++){var v=
0<=mxUtils.indexOf(y,g[f]);if("strokeColor"!=g[f]||null!=m[f]&&"none"!=m[f])if(0<=mxUtils.indexOf(G,g[f]))k||0<=mxUtils.indexOf(F,g[f])?null==m[f]?delete d.currentEdgeStyle[g[f]]:d.currentEdgeStyle[g[f]]=m[f]:b&&0<=mxUtils.indexOf(u,g[f])&&(null==m[f]?delete d.currentVertexStyle[g[f]]:d.currentVertexStyle[g[f]]=m[f]);else if(0<=mxUtils.indexOf(u,g[f])){if(b||v)null==m[f]?delete d.currentVertexStyle[g[f]]:d.currentVertexStyle[g[f]]=m[f];if(k||v||0<=mxUtils.indexOf(F,g[f]))null==m[f]?delete d.currentEdgeStyle[g[f]]:
d.currentEdgeStyle[g[f]]=m[f]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||
@@ -2274,7 +2274,8 @@ Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPatte
Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.getLayout=function(a){a=this.graph.getCellStyle(a);if(null!=a){if("stackLayout"==a.childLayout){var b=new mxStackLayout(this.graph,!0);b.resizeParentMax="1"==mxUtils.getValue(a,"resizeParentMax","1");b.horizontal="1"==mxUtils.getValue(a,"horizontalStack","1");b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1");b.resizeLast="1"==mxUtils.getValue(a,"resizeLast","0");b.spacing=a.stackSpacing||
b.spacing;b.border=a.stackBorder||b.border;b.marginLeft=a.marginLeft||0;b.marginRight=a.marginRight||0;b.marginTop=a.marginTop||0;b.marginBottom=a.marginBottom||0;b.fill=!0;return b}if("treeLayout"==a.childLayout)return b=new mxCompactTreeLayout(this.graph),b.horizontal="1"==mxUtils.getValue(a,"horizontalTree","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.groupPadding=mxUtils.getValue(a,"parentPadding",20),b.levelDistance=mxUtils.getValue(a,"treeLevelDistance",30),b.maintainParentLocation=
!0,b.edgeRouting=!1,b.resetEdges=!1,b;if("flowLayout"==a.childLayout)return b=new mxHierarchicalLayout(this.graph,mxUtils.getValue(a,"flowOrientation",mxConstants.DIRECTION_EAST)),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.parentBorder=mxUtils.getValue(a,"parentPadding",20),b.maintainParentLocation=!0,b.intraCellSpacing=mxUtils.getValue(a,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),b.interRankCellSpacing=mxUtils.getValue(a,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),
-b.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),b.parallelEdgeSpacing=mxUtils.getValue(a,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b}return null}};Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
+b.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),b.parallelEdgeSpacing=mxUtils.getValue(a,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b;if("circleLayout"==a.childLayout)return new mxCircleLayout(this.graph);if("organicLayout"==a.childLayout)return new mxFastOrganicLayout(this.graph)}return null}};
+Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var f=Math.ceil(b.x/this.view.scale-this.view.translate.x),d=Math.ceil(b.y/this.view.scale-this.view.translate.y),l=Math.floor(f/a.width),n=Math.floor(d/a.height);return new mxRectangle(l,n,Math.ceil((f+Math.floor(b.width/this.view.scale))/a.width)-l,Math.ceil((d+Math.floor(b.height/this.view.scale))/a.height)-n)};
Graph.prototype.sanitizeHtml=function(a,b){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var f=this.model.cells[b];this.isReplacePlaceholders(f)&&(this.view.invalidate(f,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
Graph.prototype.isZoomWheelEvent=function(a){return mxEvent.isAltDown(a)||mxEvent.isMetaDown(a)&&mxClient.IS_MAC||mxEvent.isControlDown(a)&&!mxClient.IS_MAC};Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)};
@@ -3503,14 +3504,15 @@ n=new f(mxUtils.bind(this,function(b){0<a.offsetWidth&&(n.disconnect(),d())}));n
GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a=this.imageBaseUrl+a);return a};GraphViewer.prototype.setXmlNode=function(a){this.xmlDocument=a.ownerDocument;this.xml=mxUtils.getXml(a);this.xmlNode=a;this.updateGraphXml(a);this.fireEvent(new mxEventObject("xmlNodeChanged"))};
GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))};
GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale})};
-GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),f=!1;a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var d=mxUtils.bind(this,function(){if(!f){f=!0;var b=this.graph.getGraphBounds();a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?a.offsetWidth<=b.width+2*this.graph.border*this.graph.view.scale?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){var b=a.getBoundingClientRect(),
-d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},b={left:b.left-d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+
-"px"):this.toolbar.style.top=b.top+"px"}f=!1}}),l=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(b){var d=a.offsetWidth;d==l||this.handlingResize||(this.handlingResize=!0,this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom||(this.allowZoomIn?null:1),this.graph.fit(null!=b?0:null,null,null,null,!1,!0),b=this.graph.getGraphBounds(),this.center&&this.graph.center(),this.graph.maxFitScale=null,this.updateContainerHeight(a,Math.max(this.minHeight,b.height+2*this.graph.border+1)),
-this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},l=d,window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=!1}),0))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size",d)):new ResizeSensor(this.graph.container,d));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,
-0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=a.style.height&&this.autoFit||this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,Math.max(this.minHeight,b.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var n=l=null,d=mxUtils.bind(this,function(){window.clearTimeout(n);this.handlingResize||(n=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=
-document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",d);var q=mxUtils.bind(this,function(){var d=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");var f=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=a.style.height&&this.autoFit?a.offsetHeight:void 0;if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||
-b.height+2*this.graph.border>f)){var n=null;null!=f&&b.height+2*this.graph.border>f&&(n=(f-2*this.graph.border)/b.height);this.fitGraph(n)}else this.graph.view.setTranslate(Math.floor((this.graph.border-b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),l=a.offsetWidth;a.style.minWidth=d});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();l=null;q()}};
-GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
+GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),f=!1;a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?"hidden":"visible";var d=mxUtils.bind(this,function(){if(!f){f=!0;var b=this.graph.getGraphBounds();a.style.overflow=1!=this.graphConfig["toolbar-nohide"]?b.width+2*this.graph.border>a.offsetWidth-2?"auto":"hidden":"visible";if(null!=this.toolbar&&1!=this.graphConfig["toolbar-nohide"]){var b=a.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),
+d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},b={left:b.left-d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}f=
+!1}}),l=null;this.handlingResize=!1;this.fitGraph=mxUtils.bind(this,function(b){var d=a.offsetWidth;if(d!=l&&!this.handlingResize){this.handlingResize=!0;this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom||(this.allowZoomIn?null:1);this.graph.container.style.overflow="hidden";this.graph.fit();if(this.center||0==this.graphConfig.resize&&""!=a.style.height)this.graph.center(),console.log("center0");this.graph.maxFitScale=null;0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,
+Math.max(this.minHeight,this.graph.getGraphBounds().height+2*this.graph.border+1));this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};l=d;window.setTimeout(mxUtils.bind(this,function(){this.handlingResize=!1}),0)}});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size",d)):new ResizeSensor(this.graph.container,d));if(this.graphConfig.resize||(this.zoomEnabled||
+!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,this.minWidth,this.minHeight),this.graph.resizeContainer=!0;else if(!this.widthIsEmpty||""!=a.style.height&&this.autoFit||this.updateContainerWidth(a,b.width+2*this.graph.border),0==this.graphConfig.resize&&""!=a.style.height||this.updateContainerHeight(a,Math.max(this.minHeight,b.height+2*this.graph.border+1)),!this.zoomEnabled&&this.autoFit){var n=l=null,d=mxUtils.bind(this,function(){window.clearTimeout(n);
+this.handlingResize||(n=window.setTimeout(mxUtils.bind(this,this.fitGraph),100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",d);var q=mxUtils.bind(this,function(){var d=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");var f=null!=this.graphConfig["max-height"]?this.graphConfig["max-height"]:""!=
+a.style.height&&this.autoFit?a.offsetHeight:void 0;if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>f)){var n=null;null!=f&&b.height+2*this.graph.border>f-2&&(n=(f-2*this.graph.border-2)/b.height);this.fitGraph(n)}else this.widthIsEmpty||0!=this.graphConfig.resize||""==a.style.height?(this.graph.view.setTranslate(Math.floor(this.graph.border-b.x/this.graph.view.scale),Math.floor(this.graph.border-b.y/this.graph.view.scale)),l=a.offsetWidth):
+this.graph.center((!this.widthIsEmpty||b.width<this.minWidth)&&1!=this.graphConfig.resize);a.style.minWidth=d});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();l=null;q()}};GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};
+GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
GraphViewer.prototype.showLayers=function(a,b){var f=this.graphConfig.layers;if(null!=f||null!=b)if(f=null!=f?f.split(" "):null,null!=b||0<f.length){var d=null!=b?b.getModel():null,l=a.getModel();l.beginUpdate();try{for(var n=l.getChildCount(l.root),q=0;q<n;q++)l.setVisible(l.getChildAt(l.root,q),null!=b?d.isVisible(d.getChildAt(d.root,q)):!1);if(null==d)for(q=0;q<f.length;q++)l.setVisible(l.getChildAt(l.root,parseInt(f[q])),!0)}finally{l.endUpdate()}}};
GraphViewer.prototype.addToolbar=function(){function a(a,b,d,g){var k=document.createElement("div");k.style.borderRight="1px solid #d0d0d0";k.style.padding="3px 6px 3px 6px";mxEvent.addListener(k,"click",a);null!=d&&k.setAttribute("title",d);k.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==g||g?(mxEvent.addListener(k,"mouseenter",function(){k.style.backgroundColor="#ddd"}),mxEvent.addListener(k,"mouseleave",
function(){k.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),k.style.cursor="pointer"):mxUtils.setOpacity(k,30);k.appendChild(a);f.appendChild(k);c++;return k}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var f=b.ownerDocument.createElement("div");f.style.position="absolute";f.style.overflow="hidden";f.style.boxSizing="border-box";