7.8.4 release

This commit is contained in:
Gaudenz Alder 2017-12-05 15:25:51 +01:00
parent 295d460f31
commit 85d5dfff27
18 changed files with 2805 additions and 2927 deletions

View file

@ -1,3 +1,10 @@
05-DEC-2017: 7.8.4
- Fixes font rendering in library dialog
- Adds move subtree handle for tree containers
- Fixes special cases for font size changes
- Adds fixes for older versions of IE
04-DEC-2017: 7.8.3
- Improves handling of fontsize in format panel

View file

@ -1 +1 @@
7.8.3
7.8.4

View file

@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
# 12/05/2017 12:09 AM
# 12/05/2017 03:12 PM
app.html
index.html?offline=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 634 B

After

Width:  |  Height:  |  Size: 304 B

1252
war/js/app.min.js vendored

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

1432
war/js/atlas.min.js vendored

File diff suppressed because it is too large Load diff

View file

@ -1783,22 +1783,10 @@
}
}));
// Shows tooltip if mouse over background
mxEvent.addListener(contentDiv, 'mousemove', mxUtils.bind(this, function(evt)
{
if (mxEvent.getSource(evt) == contentDiv)
{
contentDiv.setAttribute('title', mxResources.get('libraryTooltip'));
}
else
{
contentDiv.removeAttribute('title');
}
}));
if (file.isEditable())
{
var graph = this.editor.graph;
var spinBtn = null;
var editLibrary = mxUtils.bind(this, function(evt)
{
@ -2193,10 +2181,11 @@
}
});
btn = btn.cloneNode(false);
btn.setAttribute('src', Editor.plusImage);
btn.setAttribute('title', mxResources.get('add'));
buttons.insertBefore(btn, buttons.firstChild);
var btn2 = btn.cloneNode(false);
btn2.setAttribute('src', Editor.plusImage);
btn2.setAttribute('title', mxResources.get('add'));
buttons.insertBefore(btn2, buttons.firstChild);
mxEvent.addListener(btn2, 'click', addSelection);
if (!this.isOffline() && file.title == '.scratchpad' && EditorUi.scratchpadHelpLink != null)
{
@ -2214,10 +2203,6 @@
buttons.insertBefore(link, buttons.firstChild);
}
var spinBtn = null;
mxEvent.addListener(btn, 'click', addSelection);
}
title.appendChild(buttons);

View file

@ -8,7 +8,7 @@
* Defines resources.
*/
var moveImage = (!mxClient.IS_SVG) ? IMAGE_PATH + '/move.png' :
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAMAAADypuvZAAAAhFBMVEUAAAD///8KCgpNTU24uLgBAQEBAQEMDAxFRUWEhIQBAQEBAQEBAQEAAAAVFRXAwMBYWFgBAQEBAQEAAAAAAAAAAAAAAAAAAAABAQEBAQEAAAAAAAAAAAABAQEBAQEAAAAAAAASEhLAwMC+vr4BAQEBAQEAAAAAAAAAAAABAQEAAAD///+vipwtAAAAKnRSTlMA/Prw9f7A+fHq1uvFOfPv7+TOmkUyCwb3kT9UT+yPLAL49PTbkmloKvYw/P7BAAABe0lEQVRIx52W63LCIBBGwRhUkFxNYtTEa9Xi+79fR9KxrgtY9/xjMmcIH5ddhmmqSylk3nW5FOWlath7dCsNQLY6bOzWwjgQ64CzmhsPYuVR6jY2XuK2djnbwgQptthZKPMGtXh1NkvzluXmZR7geC0w17YziNHIILrrU26FwzkeHVbxl+GXwxnfbmOH1T72NHY6Tiv+3eXd3Ol4rPnOSmv0YWIda03QxyF3NNE+5XxwOE/3aCp7F9CKkiyacevMoixBq9JDdJjpIE2NcQbYnIyDaJAi4+DUsCqGGSRYSmAaccXOMOs0w1KWwuTPrIT7w6dwTcMA7lfJBHDugd2x6T0NgCWYfDkH3GKdpwGwJMuB4wFaOVOP3A63IIdHhookkX6PFAQpctLmko4R6cCSrgbtEjJtCNed8LAQnjDSY0l4ljWhAPT0UmO5/rOoqSulfH5eqL83lJaA1nxg6j7U5vS1r6ESgYbKj7d1C6N7Cf9L9joogHZUKW87+gMYYTZWVGas2QAAAABJRU5ErkJggg==';
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAMAAABhEH5lAAAASFBMVEUAAAAAAAB/f3/9/f319fUfHx/7+/s+Pj69vb0AAAAAAAAAAAAAAAAAAAAAAAAAAAB2dnZ1dXUAAAAAAAAVFRX///8ZGRkGBgbOcI1hAAAAE3RSTlMA+vr9/f38+fb1893Bo00u+/tFvPJUBQAAAIRJREFUGNM0jEcSxCAQAxlydGqD///TNWxZBx1aXVIrWysplbapL3sFxgDq/idXBnHgBPK1nIxwc55vCXl6dRFtrV6svs/A/UjsPcpzA5tqyByD92HqQlMFh45BG6ND1DiKSoPDdm96N77bg5F+wyaEqRGb8ZiOwHQqdg9hehszcLAEIQB2lQ4p/sEpnAAAAABJRU5ErkJggg==';
/**
* Overrides folding based on treeFolding style.
@ -1075,58 +1075,19 @@
}
else
{
this.model.beginUpdate();
try
{
var cells = graphConnectVertex.call(this, source, direction, length, evt, forceClone,
ignoreCellAt || edges.length == 0);
}
finally
{
this.model.endUpdate();
}
return cells;
return graphConnectVertex.call(this, source, direction,
length, evt, forceClone, ignoreCellAt);
}
};
// Keeps edges connected in trees
var graphHandlerGetCells = graph.graphHandler.getCells;
graph.graphHandler.getCells = function(initialCell)
graph.getSubtree = function(initialCell)
{
var cells = graphHandlerGetCells.apply(this, arguments);
var temp = cells.slice(0);
var cells = [initialCell];
// Removes all edges first
for (var i = 0; i < temp.length; i++)
{
if (isTreeVertex(temp[i]))
{
// Avoids disconnecting subtree by removing all incoming edges
var edges = graph.getIncomingEdges(temp[i]);
for (var j = 0; j < edges.length; j++)
{
mxUtils.remove(edges[j], cells);
}
}
}
for (var i = 0; i < temp.length; i++)
{
var target = cells[i];
// LATER: Move edge should move subtree
// if (model.isEdge(target) && hasTreeParent(target))
// {
// target = model.getTerminal(target, false);
// }
if (isTreeVertex(target) && !hasLayoutParent(target))
if (isTreeVertex(initialCell) && !hasLayoutParent(initialCell))
{
// Gets the subtree from cell downwards
graph.traverse(target, true, function(vertex, edge)
graph.traverse(initialCell, true, function(vertex, edge)
{
// LATER: Use dictionary to avoid duplicates
if (edge != null && mxUtils.indexOf(cells, edge) < 0)
@ -1142,145 +1103,68 @@
return true;
});
}
}
return cells;
};
// Defines a new class for all icons
function mxIconSet(state)
var vertexHandlerInit = mxVertexHandler.prototype.init;
mxVertexHandler.prototype.init = function()
{
this.images = [];
var graph = state.view.graph;
vertexHandlerInit.apply(this, arguments);
// Delete
var img = mxUtils.createImage(moveImage);
img.setAttribute('title', 'Move Cell without Subtree');
img.style.position = 'absolute';
img.style.cursor = 'pointer';
img.style.width = '26px';
img.style.height = '26px';
img.style.left = (state.getCenterX() - 13) + 'px';
img.style.top = (state.getCenterY() - 13) + 'px';
mxEvent.addGestureListeners(img, mxUtils.bind(this, function(evt)
if (isTreeVertex(this.state.cell) && this.graph.getOutgoingEdges(this.state.cell).length > 0)
{
graph.stopEditing(false);
ui.hoverIcons.reset();
this.moveHandle = mxUtils.createImage(moveImage);
this.moveHandle.setAttribute('title', 'Move Subtree');
this.moveHandle.style.position = 'absolute';
this.moveHandle.style.cursor = 'pointer';
this.moveHandle.style.width = '18px';
this.moveHandle.style.height = '18px';
this.graph.container.appendChild(this.moveHandle);
if (!graph.isCellSelected(state.cell))
mxEvent.addGestureListeners(this.moveHandle, mxUtils.bind(this, function(evt)
{
graph.setSelectionCell(state.cell);
}
graph.graphHandler.start(state.cell, mxEvent.getClientX(evt), mxEvent.getClientY(evt));
graph.graphHandler.cells = [state.cell];
graph.graphHandler.bounds = graph.graphHandler.graph.getView().getBounds(graph.graphHandler.cells);
graph.graphHandler.pBounds = graph.graphHandler.getPreviewBounds(graph.graphHandler.cells);
graph.graphHandler.cellWasClicked = true;
graph.isMouseDown = true;
graph.isMouseTrigger = mxEvent.isMouseEvent(evt);
this.graph.graphHandler.start(this.state.cell, mxEvent.getClientX(evt), mxEvent.getClientY(evt));
this.graph.graphHandler.cells = this.graph.getSubtree(this.state.cell);
this.graph.graphHandler.bounds = this.state.view.getBounds(this.graph.graphHandler.cells);
this.graph.graphHandler.pBounds = this.graph.graphHandler.getPreviewBounds(this.graph.graphHandler.cells);
this.graph.graphHandler.cellWasClicked = true;
this.graph.isMouseTrigger = mxEvent.isMouseEvent(evt);
this.graph.isMouseDown = true;
mxEvent.consume(evt);
// Disables dragging the image
mxEvent.consume(evt);
this.destroy();
}));
state.view.graph.container.appendChild(img);
this.images.push(img);
}
};
mxIconSet.prototype.destroy = function()
{
if (this.images != null)
{
for (var i = 0; i < this.images.length; i++)
{
var img = this.images[i];
img.parentNode.removeChild(img);
}
}
var vertexHandlerRedrawHandles = mxVertexHandler.prototype.redrawHandles;
this.images = null;
mxVertexHandler.prototype.redrawHandles = function()
{
vertexHandlerRedrawHandles.apply(this, arguments);
if (this.moveHandle != null)
{
this.moveHandle.style.left = this.state.x + this.state.width +
((this.state.width < 40) ? 10 : 0) + 2 + 'px';
this.moveHandle.style.top = this.state.y + this.state.height +
((this.state.height < 40) ? 10 : 0) + 2 + 'px';
}
};
// Defines the tolerance before removing the icons
var iconTolerance = 20;
var vertexHandlerDestroy = mxVertexHandler.prototype.destroy;
// Shows icons if the mouse is over a cell
graph.addMouseListener(
mxVertexHandler.prototype.destroy = function(sender, me)
{
currentState: null,
currentIconSet: null,
mouseDown: function(sender, me)
{
// Hides icons on mouse down
if (this.currentState != null)
{
this.dragLeave(me.getEvent(), this.currentState);
this.currentState = null;
}
},
mouseMove: function(sender, me)
{
if (this.currentState != null && (me.getState() == this.currentState ||
me.getState() == null))
{
var tol = iconTolerance;
var tmp = new mxRectangle(me.getGraphX() - tol,
me.getGraphY() - tol, 2 * tol, 2 * tol);
vertexHandlerDestroy.apply(this, arguments);
if (mxUtils.intersects(tmp, this.currentState))
if (this.moveHandle != null)
{
return;
this.moveHandle.parentNode.removeChild(this.moveHandle);
this.moveHandle = null;
}
}
var tmp = me.getState();
// Ignores everything but vertices
if ((graph.isMouseDown && !mxEvent.isTouchEvent(me.getEvent())) ||
graph.isEditing() || (tmp != null && (!graph.getModel().isVertex(tmp.cell) ||
!isTreeVertex(me.getCell()) || hasLayoutParent(tmp.cell))))
{
tmp = null;
}
if (tmp != this.currentState)
{
if (this.currentState != null)
{
this.dragLeave(me.getEvent(), this.currentState);
}
this.currentState = tmp;
if (this.currentState != null)
{
this.dragEnter(me.getEvent(), this.currentState);
}
}
},
mouseUp: function(sender, me) { },
dragEnter: function(evt, state)
{
if (this.currentIconSet == null)
{
this.currentIconSet = new mxIconSet(state);
}
},
dragLeave: function(evt, state)
{
if (this.currentIconSet != null)
{
this.currentIconSet.destroy();
this.currentIconSet = null;
}
}
});
};
};
/**

View file

@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"7.8.3",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"7.8.4",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
@ -1543,7 +1543,7 @@ g.getChildAt(e,m),p=this.view.getState(n);if(null!=p&&this.isCellVisible(n)&&"1"
mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),n.start(c.x,c.y)):null!=F?this.addSelectionCells(F):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);F=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=
function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var E=this.updateMouseEvent;this.updateMouseEvent=function(a){a=E.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
Graph.createSvgImage=function(a,b,c){return new mxImage("data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" version="1.1">'+c+"</svg>"))),a,b)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;
Graph.createSvgImage=function(a,b,c){c=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" version="1.1">'+c+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(c):Base64.encode(c,!0)),a,b)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;
Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;
Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,c){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,e=!0,f=null,g=mxUtils.bind(this,function(a){e=!0;f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),h=mxUtils.bind(this,function(a){e=e&&null!=f&&Math.abs(f.x-mxEvent.getClientX(a))<b&&Math.abs(f.y-mxEvent.getClientY(a))<b}),k=mxUtils.bind(this,function(b){if(e)for(var d=mxEvent.getSource(b);null!=

View file

@ -2530,20 +2530,17 @@ TextFormatPanel.prototype.addFont = function(container)
var inputUpdate = this.installInputHandler(input, mxConstants.STYLE_FONTSIZE, Menus.prototype.defaultFontSize, 1, 999, ' pt',
function(fontSize)
{
var handled = false;
// IE does not support containsNode
// KNOWN: Fixes font size issues but bypasses undo
if (window.getSelection)
if (window.getSelection && !mxClient.IS_IE && !mxClient.IS_IE11)
{
input.value = fontSize + ' pt';
var selection = window.getSelection();
var container = selection.getRangeAt(0).commonAncestorContainer;
var container = (selection.rangeCount > 0) ? selection.getRangeAt(0).commonAncestorContainer :
graph.cellEditor.textarea;
if (container.nodeType == mxConstants.NODETYPE_ELEMENT)
function updateSize(elt, ignoreContains)
{
var elts = container.getElementsByTagName('*');
function updateSize(elt)
if (elt != graph.cellEditor.textarea && (ignoreContains || selection.containsNode(elt, true)))
{
if (elt.nodeName == 'FONT')
{
@ -2566,26 +2563,35 @@ TextFormatPanel.prototype.addFont = function(container)
}
}
}
}
};
// Wraps text node or mixed selection with leading text in a font element
if (container == graph.cellEditor.textarea ||
container.nodeType != mxConstants.NODETYPE_ELEMENT)
{
document.execCommand('fontSize', false, '1');
}
if (container != graph.cellEditor.textarea)
{
updateSize(container);
handled = true;
container = container.parentNode;
}
if (container.nodeType == mxConstants.NODETYPE_ELEMENT)
{
var elts = container.getElementsByTagName('*');
updateSize(container);
for (var i = 0; i < elts.length; i++)
{
if (selection.containsNode(elts[i], true))
{
updateSize(elts[i]);
handled = true;
}
}
}
}
if (!handled)
input.value = fontSize + ' pt';
}
else
{
pendingFontSize = fontSize;
@ -3248,9 +3254,6 @@ TextFormatPanel.prototype.addFont = function(container)
if (node != null)
{
// Finds common font size
var elts = node.getElementsByTagName('*');
// Workaround for commonAncestor on range in IE11 returning parent of common ancestor
if (node == graph.cellEditor.textarea && graph.cellEditor.textarea.children.length == 1 &&
graph.cellEditor.textarea.firstChild.nodeType == mxConstants.NODETYPE_ELEMENT)
@ -3266,32 +3269,42 @@ TextFormatPanel.prototype.addFont = function(container)
}
else
{
return (lineHeight.substring(css.lineHeight.length - 2) == 'px') ?
return (lineHeight.substring(lineHeight.length - 2) == 'px') ?
parseFloat(lineHeight) / fontSize : parseInt(lineHeight);
}
};
function getAbsoluteFontSize(fontSize)
{
if (fontSize.substring(fontSize.length - 2) == 'px')
{
return parseFloat(fontSize);
}
else
{
return mxConstants.DEFAULT_FONTSIZE;
}
}
//var realCss = mxUtils.getCurrentStyle(selectedElement);
var css = mxUtils.getCurrentStyle(node);
var fontSize = parseFloat(css.fontSize);
var fontSize = getAbsoluteFontSize(css.fontSize);
var lineHeight = getRelativeLineHeight(fontSize, css.lineHeight, node);
if (elts.length > 0 && window.getSelection)
// Finds common font size
var elts = node.getElementsByTagName('*');
// IE does not support containsNode
if (elts.length > 0 && window.getSelection && !mxClient.IS_IE && !mxClient.IS_IE11)
{
var selection = window.getSelection();
if (selection.containsNode(elts[0], true))
{
var temp = mxUtils.getCurrentStyle(elts[0]);
fontSize = parseFloat(temp.fontSize);
lineHeight = getRelativeLineHeight(fontSize, temp.lineHeight, elts[0]);
for (var i = 0; i < elts.length; i++)
{
if (selection.containsNode(elts[i], true))
{
temp = mxUtils.getCurrentStyle(elts[i]);
fontSize = Math.max(parseFloat(temp.fontSize), fontSize);
fontSize = Math.max(getAbsoluteFontSize(temp.fontSize), fontSize);
var lh = getRelativeLineHeight(fontSize, temp.lineHeight, elts[i]);
if (lh != lineHeight || isNaN(lh))
@ -3301,7 +3314,6 @@ TextFormatPanel.prototype.addFont = function(container)
}
}
}
}
if (css != null)
{
@ -3326,12 +3338,12 @@ TextFormatPanel.prototype.addFont = function(container)
pendingFontSize != null)
{
node.removeAttribute('size');
node.style.fontSize = pendingFontSize + 'px';
node.style.fontSize = pendingFontSize + ' pt';
pendingFontSize = null;
}
else
{
input.value = (isNaN(fontSize)) ? '' : fontSize + 'px';
input.value = (isNaN(fontSize)) ? '' : fontSize + ' pt';
}
var lh = parseFloat(lineHeight);

View file

@ -889,10 +889,12 @@ Graph.defaultJumpSize = 6;
*/
Graph.createSvgImage = function(w, h, data)
{
return new mxImage('data:image/svg+xml;base64,' + btoa(unescape(encodeURIComponent(
var tmp = unescape(encodeURIComponent(
'<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">' +
'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="' + w + 'px" height="' + h + 'px" ' +
'version="1.1">' + data + '</svg>'))), w, h)
'version="1.1">' + data + '</svg>'));
return new mxImage('data:image/svg+xml;base64,' + ((window.btoa) ? btoa(tmp) : Base64.encode(tmp, true)), w, h)
};
/**

View file

@ -984,7 +984,7 @@ Menus.prototype.createPopupMenu = function(menu, cell, evt)
if (graph.isSelectionEmpty())
{
this.addMenuItems(menu, ['undo', 'redo', '-', 'pasteHere'], null, evt);
this.addMenuItems(menu, ['undo', 'redo', 'pasteHere'], null, evt);
}
else
{
@ -1068,7 +1068,8 @@ Menus.prototype.createPopupMenu = function(menu, cell, evt)
}
else
{
this.addMenuItems(menu, ['-', 'selectVertices', 'selectEdges', '-', 'selectAll'], null, evt);
this.addMenuItems(menu, ['-', 'selectVertices', 'selectEdges',
'selectAll', '-', 'clearDefaultStyle'], null, evt);
}
};

View file

@ -14,13 +14,7 @@ function Sidebar(editorUi, container)
this.graph = editorUi.createTemporaryGraph(this.editorUi.editor.graph.getStylesheet());
this.graph.cellRenderer.antiAlias = false;
this.graph.foldingEnabled = false;
// Workaround for blank output in IE11-
if (!mxClient.IS_IE && !mxClient.IS_IE11)
{
this.graph.container.style.display = 'none';
}
this.graph.container.style.visibility = 'hidden';
document.body.appendChild(this.graph.container);
this.pointerUpHandler = mxUtils.bind(this, function()
@ -817,6 +811,7 @@ Sidebar.prototype.addSearchPalette = function(expand)
if (evt.keyCode == 13 /* Enter */)
{
find();
mxEvent.consume(evt);
}
}));
@ -1799,7 +1794,6 @@ Sidebar.prototype.createThumb = function(cells, width, height, parent, title, sh
(height - 2 * this.thumbBorder) / bounds.height) * 100) / 100;
this.graph.view.scaleAndTranslate(s, Math.floor((width - bounds.width * s) / 2 / s - bounds.x),
Math.floor((height - bounds.height * s) / 2 / s - bounds.y));
var node = null;
// For supporting HTML labels in IE9 standards mode the container is cloned instead
@ -1812,6 +1806,12 @@ Sidebar.prototype.createThumb = function(cells, width, height, parent, title, sh
{
node = this.graph.container.cloneNode(false);
node.innerHTML = this.graph.container.innerHTML;
// Workaround for clipping in older IE versions
if (mxClient.IS_QUIRKS || document.documentMode == 8)
{
node.firstChild.style.overflow = 'visible';
}
}
this.graph.getModel().clear();
@ -3265,19 +3265,6 @@ Sidebar.prototype.addPalette = function(id, title, expanded, onInit)
div.style.touchAction = 'none';
}
// Shows tooltip if mouse over background
mxEvent.addListener(div, 'mousemove', mxUtils.bind(this, function(evt)
{
if (mxEvent.getSource(evt) == div)
{
div.setAttribute('title', mxResources.get('sidebarTooltip'));
}
else
{
div.removeAttribute('title');
}
}));
if (expanded)
{
onInit(div);

View file

@ -184,7 +184,7 @@ f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototy
e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
"function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"7.8.3",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"7.8.4",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
@ -1543,7 +1543,7 @@ g.getChildAt(e,m),p=this.view.getState(n);if(null!=p&&this.isCellVisible(n)&&"1"
mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),n.start(c.x,c.y)):null!=F?this.addSelectionCells(F):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);F=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=
function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var E=this.updateMouseEvent;this.updateMouseEvent=function(a){a=E.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;
Graph.createSvgImage=function(a,b,c){return new mxImage("data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" version="1.1">'+c+"</svg>"))),a,b)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;
Graph.createSvgImage=function(a,b,c){c=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" version="1.1">'+c+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(c):Base64.encode(c,!0)),a,b)};mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;
Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;
Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,c){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,e=!0,f=null,g=mxUtils.bind(this,function(a){e=!0;f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),h=mxUtils.bind(this,function(a){e=e&&null!=f&&Math.abs(f.x-mxEvent.getClientX(a))<b&&Math.abs(f.y-mxEvent.getClientY(a))<b}),k=mxUtils.bind(this,function(b){if(e)for(var d=mxEvent.getSource(b);null!=

1288
war/js/viewer.min.js vendored

File diff suppressed because it is too large Load diff

View file

@ -43,9 +43,17 @@ var com;
this.debugPaths = false;
this.vsdxModel = null;
}
mxVsdxCodec.vsdxPlaceholder_$LI$ = function () { if (mxVsdxCodec.vsdxPlaceholder == null)
mxVsdxCodec.vsdxPlaceholder = atob("dmlzaW8="); return mxVsdxCodec.vsdxPlaceholder; };
;
mxVsdxCodec.vsdxPlaceholder_$LI$ = function ()
{
if (mxVsdxCodec.vsdxPlaceholder == null)
{
var tmp = "dmlzaW8=";
mxVsdxCodec.vsdxPlaceholder = (window.atob) ? atob(tmp) : Base64.decode(tmp, true);
return mxVsdxCodec.vsdxPlaceholder;
}
};
/**
* Parses the input VSDX format and uses the information to populate
* the specified graph.