10.5.8 release

This commit is contained in:
Gaudenz Alder 2019-03-26 15:30:12 +01:00
parent f3565a9b43
commit b6ea17ecff
10 changed files with 422 additions and 398 deletions

View file

@ -1,3 +1,8 @@
26-MAR-2019: 10.5.8
- Hides icon in Confluence cloud for resolved comments
- Uses mxGraph 4.0.1 beta 4
26-MAR-2019: 10.5.7
- Adds comments in Confluence cloud viewer

View file

@ -1 +1 @@
10.5.7
10.5.8

View file

@ -1138,8 +1138,8 @@ mxGraph.prototype.updateGroupBounds=function(a,b,c,d,e,f,g){null==a&&(a=this.get
r.height;l=l.clone();c&&(l.x=Math.round(l.x+n.x-b-p-g),l.y=Math.round(l.y+n.y-b-q-d));l.width=Math.round(n.width+2*b+p+g+e);l.height=Math.round(n.height+2*b+q+d+f);this.model.setGeometry(a[k],l);this.moveCells(m,b+p-n.x+g,b+q-n.y+d)}}}}}finally{this.model.endUpdate()}return a};
mxGraph.prototype.getBoundingBox=function(a){var b=null;if(null!=a&&0<a.length)for(var c=0;c<a.length;c++)if(this.model.isVertex(a[c])||this.model.isEdge(a[c])){var d=this.view.getBoundingBox(this.view.getState(a[c]),!0);null!=d&&(null==b?b=mxRectangle.fromRectangle(d):b.add(d))}return b};mxGraph.prototype.cloneCell=function(a,b,c,d){return this.cloneCells([a],b,c,d)[0]};
mxGraph.prototype.cloneCells=function(a,b,c,d){b=null!=b?b:!0;var e=null;if(null!=a){for(var f=new mxDictionary,e=[],g=0;g<a.length;g++)f.put(a[g],!0),e.push(a[g]);if(0<e.length)for(var k=this.view.scale,l=this.view.translate,e=this.model.cloneCells(a,!0,c),g=0;g<a.length;g++)if(!b&&this.model.isEdge(e[g])&&null!=this.getEdgeValidationError(e[g],this.model.getTerminal(e[g],!0),this.model.getTerminal(e[g],!1)))e[g]=null;else{var m=this.model.getGeometry(e[g]);if(null!=m){var n=this.view.getState(a[g]),
p=this.view.getState(this.model.getParent(a[g]));if(null!=n&&null!=p)if(c=d?0:p.origin.x,p=d?0:p.origin.y,this.model.isEdge(e[g])){if(n=n.absolutePoints,null!=n){for(var q=this.model.getTerminal(a[g],!0);null!=q&&!f.get(q);)q=this.model.getParent(q);null==q&&m.setTerminalPoint(new mxPoint(n[0].x/k-l.x,n[0].y/k-l.y),!0);for(q=this.model.getTerminal(a[g],!1);null!=q&&!f.get(q);)q=this.model.getParent(q);null==q&&(q=n.length-1,m.setTerminalPoint(new mxPoint(n[q].x/k-l.x,n[q].y/k-l.y),!1));m=m.points;
if(null!=m)for(n=0;n<m.length;n++)m[n].x+=c,m[n].y+=p}}else m.translate(c,p)}}else e=[]}return e};mxGraph.prototype.insertVertex=function(a,b,c,d,e,f,g,k,l){b=this.createVertex(a,b,c,d,e,f,g,k,l);return this.addCell(b,a)};mxGraph.prototype.createVertex=function(a,b,c,d,e,f,g,k,l){a=new mxGeometry(d,e,f,g);a.relative=null!=l?l:!1;c=new mxCell(c,a,k);c.setId(b);c.setVertex(!0);c.setConnectable(!0);return c};
p=this.view.getState(this.model.getParent(a[g]));if(null!=n&&null!=p)if(c=d?0:p.origin.x,p=d?0:p.origin.y,this.model.isEdge(e[g])){if(n=n.absolutePoints,null!=n){for(var q=this.model.getTerminal(a[g],!0);null!=q&&!f.get(q);)q=this.model.getParent(q);null==q&&null!=n[0]&&m.setTerminalPoint(new mxPoint(n[0].x/k-l.x,n[0].y/k-l.y),!0);for(q=this.model.getTerminal(a[g],!1);null!=q&&!f.get(q);)q=this.model.getParent(q);var r=n.length-1;null==q&&null!=n[r]&&m.setTerminalPoint(new mxPoint(n[r].x/k-l.x,n[r].y/
k-l.y),!1);m=m.points;if(null!=m)for(n=0;n<m.length;n++)m[n].x+=c,m[n].y+=p}}else m.translate(c,p)}}else e=[]}return e};mxGraph.prototype.insertVertex=function(a,b,c,d,e,f,g,k,l){b=this.createVertex(a,b,c,d,e,f,g,k,l);return this.addCell(b,a)};mxGraph.prototype.createVertex=function(a,b,c,d,e,f,g,k,l){a=new mxGeometry(d,e,f,g);a.relative=null!=l?l:!1;c=new mxCell(c,a,k);c.setId(b);c.setVertex(!0);c.setConnectable(!0);return c};
mxGraph.prototype.insertEdge=function(a,b,c,d,e,f){b=this.createEdge(a,b,c,d,e,f);return this.addEdge(b,a,d,e)};mxGraph.prototype.createEdge=function(a,b,c,d,e,f){a=new mxCell(c,new mxGeometry,f);a.setId(b);a.setEdge(!0);a.geometry.relative=!0;return a};mxGraph.prototype.addEdge=function(a,b,c,d,e){return this.addCell(a,b,e,c,d)};mxGraph.prototype.addCell=function(a,b,c,d,e){return this.addCells([a],b,c,d,e)[0]};
mxGraph.prototype.addCells=function(a,b,c,d,e){null==b&&(b=this.getDefaultParent());null==c&&(c=this.model.getChildCount(b));this.model.beginUpdate();try{this.cellsAdded(a,b,c,d,e,!1,!0),this.fireEvent(new mxEventObject(mxEvent.ADD_CELLS,"cells",a,"parent",b,"index",c,"source",d,"target",e))}finally{this.model.endUpdate()}return a};
mxGraph.prototype.cellsAdded=function(a,b,c,d,e,f,g,k){if(null!=a&&null!=b&&null!=c){this.model.beginUpdate();try{for(var l=f?this.view.getState(b):null,m=null!=l?l.origin:null,n=new mxPoint(0,0),l=0;l<a.length;l++)if(null==a[l])c--;else{var p=this.model.getParent(a[l]);if(null!=m&&a[l]!=b&&b!=p){var q=this.view.getState(p),r=null!=q?q.origin:n,t=this.model.getGeometry(a[l]);if(null!=t){var u=r.x-m.x,y=r.y-m.y,t=t.clone();t.translate(u,y);t.relative||!this.model.isVertex(a[l])||this.isAllowNegativeCoordinates()||

View file

@ -38,7 +38,13 @@ public class ProxyServlet extends HttpServlet
* Buffer size for content pass-through.
*/
private static int BUFFER_SIZE = 3 * 1024;
/**
* GAE deadline is 30 secs so timeout before that to avoid
* HardDeadlineExceeded errors.
*/
private static final int TIMEOUT = 29000;
/**
* A resuable empty byte array instance.
*/
@ -74,6 +80,8 @@ public class ProxyServlet extends HttpServlet
URL url = new URL(urlParam);
URLConnection connection = url.openConnection();
connection.setConnectTimeout(TIMEOUT);
connection.setReadTimeout(TIMEOUT);
response.setHeader("Cache-Control", "private, max-age=86400");
@ -103,6 +111,8 @@ public class ProxyServlet extends HttpServlet
connection = url.openConnection();
((HttpURLConnection) connection)
.setInstanceFollowRedirects(true);
connection.setConnectTimeout(TIMEOUT);
connection.setReadTimeout(TIMEOUT);
// Workaround for 451 response from Iconfinder CDN
connection.setRequestProperty("User-Agent", "draw.io");

View file

@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
# 03/25/2019 10:19 PM
# 03/26/2019 03:23 PM
app.html
index.html?offline=1

File diff suppressed because one or more lines are too long

View file

@ -418,59 +418,66 @@ EditorUi = function(editor, container, lightbox)
// Note: Everything that is not in styles is ignored (styles is augmented below)
this.setDefaultStyle = function(cell)
{
var state = graph.view.getState(cell);
if (state != null)
try
{
// Ignores default styles
var clone = cell.clone();
clone.style = ''
var defaultStyle = graph.getCellStyle(clone);
var values = [];
var keys = [];
for (var key in state.style)
var state = graph.view.getState(cell);
if (state != null)
{
if (defaultStyle[key] != state.style[key])
// Ignores default styles
var clone = cell.clone();
clone.style = ''
var defaultStyle = graph.getCellStyle(clone);
var values = [];
var keys = [];
for (var key in state.style)
{
values.push(state.style[key]);
keys.push(key);
if (defaultStyle[key] != state.style[key])
{
values.push(state.style[key]);
keys.push(key);
}
}
// Handles special case for value "none"
var cellStyle = graph.getModel().getStyle(state.cell);
var tokens = (cellStyle != null) ? cellStyle.split(';') : [];
for (var i = 0; i < tokens.length; i++)
{
var tmp = tokens[i];
var pos = tmp.indexOf('=');
if (pos >= 0)
{
var key = tmp.substring(0, pos);
var value = tmp.substring(pos + 1);
if (defaultStyle[key] != null && value == 'none')
{
values.push(value);
keys.push(key);
}
}
}
// Resets current style
if (graph.getModel().isEdge(state.cell))
{
graph.currentEdgeStyle = {};
}
else
{
graph.currentVertexStyle = {}
}
this.fireEvent(new mxEventObject('styleChanged', 'keys', keys, 'values', values, 'cells', [state.cell]));
}
// Handles special case for value "none"
var cellStyle = graph.getModel().getStyle(state.cell);
var tokens = (cellStyle != null) ? cellStyle.split(';') : [];
for (var i = 0; i < tokens.length; i++)
{
var tmp = tokens[i];
var pos = tmp.indexOf('=');
if (pos >= 0)
{
var key = tmp.substring(0, pos);
var value = tmp.substring(pos + 1);
if (defaultStyle[key] != null && value == 'none')
{
values.push(value);
keys.push(key);
}
}
}
// Resets current style
if (graph.getModel().isEdge(state.cell))
{
graph.currentEdgeStyle = {};
}
else
{
graph.currentVertexStyle = {}
}
this.fireEvent(new mxEventObject('styleChanged', 'keys', keys, 'values', values, 'cells', [state.cell]));
}
catch (e)
{
this.handleError(e);
}
};
@ -606,7 +613,6 @@ EditorUi = function(editor, container, lightbox)
if (!edge || mxUtils.indexOf(connectStyles, key) < 0)
{
newStyle = mxUtils.setStyle(newStyle, key, styleValue);
console.log('here', key, styleValue);
}
}
}

View file

@ -3915,7 +3915,8 @@ HoverIcons.prototype.update = function(state, x, y)
}
else
{
if (state != null && state.cell.geometry.relative && this.graph.model.isEdge(state.cell.parent))
if (state != null && state.cell.geometry != null && state.cell.geometry.relative &&
this.graph.model.isEdge(state.cell.parent))
{
state = null;
}
@ -5079,12 +5080,13 @@ if (typeof mxVertexHandler != 'undefined')
return result;
}
else if (terminal.shape != null)
else if (terminal.shape != null && terminal.shape.bounds != null)
{
var dir = terminal.shape.direction;
var bounds = terminal.shape.bounds;
var scale = terminal.shape.scale;
var w = bounds.width / scale, h = bounds.height / scale;
var w = bounds.width / scale;
var h = bounds.height / scale;
if (dir == mxConstants.DIRECTION_NORTH || dir == mxConstants.DIRECTION_SOUTH)
{
@ -5692,23 +5694,16 @@ if (typeof mxVertexHandler != 'undefined')
var state = (this.model.isEdge(cell)) ? this.view.getState(cell) : null;
var src = mxEvent.getSource(evt);
if (this.firstClickState == state && this.firstClickSource == src)
if ((this.firstClickState == state && this.firstClickSource == src) &&
(state == null || (state.text == null || state.text.node == null ||
state.text.boundingBox == null || (!mxUtils.contains(state.text.boundingBox,
pt.x, pt.y) && !mxUtils.isAncestorNode(state.text.node, mxEvent.getSource(evt))))) &&
((state == null && !this.isCellLocked(this.getDefaultParent())) ||
(state != null && !this.isCellLocked(state.cell))) &&
(state != null || (mxClient.IS_VML && src == this.view.getCanvas()) ||
(mxClient.IS_SVG && src == this.view.getCanvas().ownerSVGElement)))
{
if (state == null || (state.text == null || state.text.node == null ||
(!mxUtils.contains(state.text.boundingBox, pt.x, pt.y) &&
!mxUtils.isAncestorNode(state.text.node, mxEvent.getSource(evt)))))
{
if ((state == null && !this.isCellLocked(this.getDefaultParent())) ||
(state != null && !this.isCellLocked(state.cell)))
{
// Avoids accidental inserts on background
if (state != null || (mxClient.IS_VML && src == this.view.getCanvas()) ||
(mxClient.IS_SVG && src == this.view.getCanvas().ownerSVGElement))
{
cell = this.addText(pt.x, pt.y, state);
}
}
}
cell = this.addText(pt.x, pt.y, state);
}
}

View file

@ -740,13 +740,20 @@ Sidebar.prototype.addSearchPalette = function(expand)
for (var i = 0; i < results.length; i++)
{
var elt = results[i]();
// Avoids duplicates in results
if (hash[elt.innerHTML] == null)
try
{
hash[elt.innerHTML] = '1';
div.appendChild(results[i]());
var elt = results[i]();
// Avoids duplicates in results
if (hash[elt.innerHTML] == null)
{
hash[elt.innerHTML] = '1';
div.appendChild(elt);
}
}
catch (e)
{
// ignore
}
}
@ -1786,7 +1793,8 @@ Sidebar.prototype.createThumb = function(cells, width, height, parent, title, sh
var node = null;
// For supporting HTML labels in IE9 standards mode the container is cloned instead
if (this.graph.dialect == mxConstants.DIALECT_SVG && !mxClient.NO_FO)
if (this.graph.dialect == mxConstants.DIALECT_SVG && !mxClient.NO_FO &&
this.graph.view.getCanvas().ownerSVGElement != null)
{
node = this.graph.view.getCanvas().ownerSVGElement.cloneNode(true);
}

File diff suppressed because one or more lines are too long