7.8.9 release

Former-commit-id: ff0fe6df11
This commit is contained in:
Gaudenz Alder 2017-12-29 15:00:47 +01:00
parent 449816b278
commit 851764783f
14 changed files with 1515 additions and 2586 deletions

View file

@ -1,3 +1,7 @@
29-DEC-2017: 7.8.9
- Replaces search.xml with inline data
21-DEC-2017: 7.8.8
- Deletes transparent groups with no remaining cells

View file

@ -1 +1 @@
7.8.8
7.8.9

View file

@ -1,7 +1,7 @@
CACHE MANIFEST
# THIS FILE WAS GENERATED. DO NOT MODIFY!
# 12/21/2017 03:39 PM
# 12/29/2017 02:57 PM
app.html
index.html?offline=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

517
war/js/app.min.js vendored

File diff suppressed because one or more lines are too long

1385
war/js/atlas.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -4613,7 +4613,7 @@ FeedbackDialog.maxAttachmentSize = 1000000;
/**
* Constructs a new revision dialog
*/
var RevisionDialog = function(editorUi, revs)
var RevisionDialog = function(editorUi, revs, restoreFn)
{
var div = document.createElement('div');
@ -4821,19 +4821,26 @@ var RevisionDialog = function(editorUi, revs)
{
editorUi.confirm(mxResources.get('areYouSure'), function()
{
if (editorUi.spinner.spin(document.body, mxResources.get('restoring')))
if (restoreFn != null)
{
file.save(true, function(resp)
restoreFn(currentXml);
}
else
{
if (editorUi.spinner.spin(document.body, mxResources.get('restoring')))
{
editorUi.spinner.stop();
editorUi.replaceFileData(currentXml);
editorUi.hideDialog();
}, function(resp)
{
editorUi.spinner.stop();
editorUi.editor.setStatus('');
editorUi.handleError(resp, (resp != null) ? mxResources.get('errorSavingFile') : null);
});
file.save(true, function(resp)
{
editorUi.spinner.stop();
editorUi.replaceFileData(currentXml);
editorUi.hideDialog();
}, function(resp)
{
editorUi.spinner.stop();
editorUi.editor.setStatus('');
editorUi.handleError(resp, (resp != null) ? mxResources.get('errorSavingFile') : null);
});
}
}
});
}
@ -4877,6 +4884,11 @@ var RevisionDialog = function(editorUi, revs)
newBtn.className = 'geBtn';
newBtn.setAttribute('disabled', 'disabled');
if (restoreFn != null)
{
newBtn.style.display = 'none';
}
var showBtn = mxUtils.button(mxResources.get('show'), function()
{
if (currentRev != null)
@ -4886,6 +4898,12 @@ var RevisionDialog = function(editorUi, revs)
});
showBtn.className = 'geBtn gePrimaryBtn';
showBtn.setAttribute('disabled', 'disabled');
if (restoreFn != null)
{
showBtn.style.display = 'none';
restoreBtn.className = 'geBtn gePrimaryBtn';
}
var buttons = document.createElement('div');
buttons.style.position = 'absolute';
@ -4902,8 +4920,294 @@ var RevisionDialog = function(editorUi, revs)
tb.style.top = '442px';
var currentElt = null;
if (revs != null && revs.length > 0)
{
container.style.cursor = 'move';
var table = document.createElement('table');
table.style.border = '1px solid lightGray';
table.style.borderCollapse = 'collapse';
table.style.borderSpacing = '0px';
table.style.width = '100%';
var tbody = document.createElement('tbody');
var today = new Date().toDateString();
if (editorUi.currentPage != null && editorUi.pages != null)
{
currentPage = mxUtils.indexOf(editorUi.pages, editorUi.currentPage);
}
for (var i = revs.length - 1; i >= 0; i--)
{
var elt = (function(item)
{
var ts = new Date(item.modifiedDate);
var row = null;
var pd = '6px';
// Workaround for negative timestamps in Dropbox
if (ts.getTime() >= 0)
{
row = document.createElement('tr');
row.style.borderBottom = '1px solid lightGray';
row.style.fontSize = '12px';
row.style.cursor = 'pointer';
var date = document.createElement('td');
date.style.padding = pd;
date.style.whiteSpace = 'nowrap';
if (item == revs[revs.length - 1])
{
mxUtils.write(date, mxResources.get('current'));
}
else
{
if (ts.toDateString() === today)
{
mxUtils.write(date, ts.toLocaleTimeString());
}
else
{
mxUtils.write(date, ts.toLocaleDateString() + ' ' +
ts.toLocaleTimeString());
}
}
row.appendChild(date);
row.setAttribute('title', ts.toLocaleDateString() + ' ' +
ts.toLocaleTimeString() + ' ' +
editorUi.formatFileSize(parseInt(item.fileSize)) +
((item.lastModifyingUserName != null) ? ' ' +
item.lastModifyingUserName : ''));
function updateGraph(xml)
{
spinner.stop();
var doc = mxUtils.parseXml(xml);
var node = editorUi.editor.extractGraphModel(doc.documentElement, true);
if (node != null)
{
pageSelect.style.display = 'none';
pageSelect.innerHTML = '';
currentDoc = doc;
currentXml = xml;
parseSelectFunction = null;
diagrams = null;
realPage = 0;
function parseGraphModel(dataNode)
{
var bg = dataNode.getAttribute('background');
if (bg == null || bg == '' || bg == mxConstants.NONE)
{
bg = '#ffffff';
}
container.style.backgroundColor = bg;
var codec = new mxCodec(dataNode.ownerDocument);
codec.decode(dataNode, graph.getModel());
graph.maxFitScale = 1;
graph.fit(8);
graph.center();
return dataNode;
}
function parseDiagram(diagramNode)
{
if (diagramNode != null)
{
diagramNode = parseGraphModel(mxUtils.parseXml(editorUi.editor.graph.decompress(
mxUtils.getTextContent(diagramNode))).documentElement);
}
return diagramNode;
}
if (node.nodeName == 'mxfile')
{
// Workaround for "invalid calling object" error in IE
var tmp = node.getElementsByTagName('diagram');
diagrams = [];
for (var i = 0; i < tmp.length; i++)
{
diagrams.push(tmp[i]);
}
realPage = Math.min(currentPage, diagrams.length - 1);
if (diagrams.length > 0)
{
parseDiagram(diagrams[realPage]);
}
if (diagrams.length > 1)
{
pageSelect.removeAttribute('disabled');
pageSelect.style.display = '';
for (var i = 0; i < diagrams.length; i++)
{
var pageOption = document.createElement('option');
mxUtils.write(pageOption, diagrams[i].getAttribute('name') ||
mxResources.get('pageWithNumber', [i + 1]));
pageOption.setAttribute('value', i);
if (i == realPage)
{
pageOption.setAttribute('selected', 'selected');
}
if (file == null || (editorUi.drive == null && file.constructor == window.DriveFile) ||
pageSelect.appendChild(pageOption);
}
}
pageSelectFunction = function()
{
currentPage = parseInt(pageSelect.value);
realPage = currentPage;
parseDiagram(diagrams[currentPage]);
}
}
else
{
parseGraphModel(node);
}
fileInfo.innerHTML = '';
mxUtils.write(fileInfo, ts.toLocaleDateString() + ' ' +
ts.toLocaleTimeString());
fileInfo.setAttribute('title', row.getAttribute('title'));
zoomInBtn.removeAttribute('disabled');
zoomOutBtn.removeAttribute('disabled');
zoomFitBtn.removeAttribute('disabled');
zoomActualBtn.removeAttribute('disabled');
if (file == null || !file.isRestricted())
{
if (editorUi.editor.graph.isEnabled())
{
restoreBtn.removeAttribute('disabled');
}
downloadBtn.removeAttribute('disabled');
showBtn.removeAttribute('disabled');
newBtn.removeAttribute('disabled');
}
mxUtils.setOpacity(zoomInBtn, 60);
mxUtils.setOpacity(zoomOutBtn, 60);
mxUtils.setOpacity(zoomFitBtn, 60);
mxUtils.setOpacity(zoomActualBtn, 60);
}
else
{
pageSelect.style.display = 'none';
pageSelect.innerHTML = '';
fileInfo.innerHTML = '';
mxUtils.write(fileInfo, mxResources.get('errorLoadingFile'));
}
};
mxEvent.addListener(row, 'click', function(evt)
{
if (currentRev != item)
{
spinner.stop();
if (currentRow != null)
{
currentRow.style.backgroundColor = '';
}
currentRev = item;
currentRow = row;
currentRow.style.backgroundColor = '#ebf2f9';
currentDoc = null;
currentXml = null;
fileInfo.removeAttribute('title');
fileInfo.innerHTML = mxResources.get('loading') + '...';
container.style.backgroundColor = '#ffffff';
graph.getModel().clear();
restoreBtn.setAttribute('disabled', 'disabled');
downloadBtn.setAttribute('disabled', 'disabled');
zoomInBtn.setAttribute('disabled', 'disabled');
zoomOutBtn.setAttribute('disabled', 'disabled');
zoomActualBtn.setAttribute('disabled', 'disabled');
zoomFitBtn.setAttribute('disabled', 'disabled');
newBtn.setAttribute('disabled', 'disabled');
showBtn.setAttribute('disabled', 'disabled');
pageSelect.setAttribute('disabled', 'disabled');
mxUtils.setOpacity(zoomInBtn, 20);
mxUtils.setOpacity(zoomOutBtn, 20);
mxUtils.setOpacity(zoomFitBtn, 20);
mxUtils.setOpacity(zoomActualBtn, 20);
spinner.spin(container);
item.getXml(function(xml)
{
if (currentRev == item)
{
updateGraph(xml);
}
}, function(err)
{
spinner.stop();
pageSelect.style.display = 'none';
pageSelect.innerHTML = '';
fileInfo.innerHTML = '';
mxUtils.write(fileInfo, mxResources.get('errorLoadingFile'));
});
mxEvent.consume(evt);
}
});
mxEvent.addListener(row, 'dblclick', function(evt)
{
showBtn.click();
if (window.getSelection)
{
window.getSelection().removeAllRanges();
}
else if (document.selection)
{
document.selection.empty();
}
mxEvent.consume(evt);
}, false);
tbody.appendChild(row);
}
return row;
})(revs[i]);
// Selects and loads first element in list (ie current version) after
// graph container was initialized since there is no loading delay
if (elt != null && i == revs.length - 1)
{
currentElt = elt;
}
}
table.appendChild(tbody);
list.appendChild(table);
}
else if (file == null || (editorUi.drive == null && file.constructor == window.DriveFile) ||
(editorUi.dropbox == null && file.constructor == window.DropboxFile))
{
container.style.display = 'none';
@ -4912,298 +5216,9 @@ var RevisionDialog = function(editorUi, revs)
}
else
{
if (revs != null && revs.length > 0)
{
container.style.cursor = 'move';
var table = document.createElement('table');
table.style.border = '1px solid lightGray';
table.style.borderCollapse = 'collapse';
table.style.borderSpacing = '0px';
table.style.width = '100%';
var tbody = document.createElement('tbody');
var today = new Date().toDateString();
if (editorUi.currentPage != null && editorUi.pages != null)
{
currentPage = mxUtils.indexOf(editorUi.pages, editorUi.currentPage);
}
for (var i = revs.length - 1; i >= 0; i--)
{
var elt = (function(item)
{
var ts = new Date(item.modifiedDate);
var row = null;
var pd = '6px';
// Workaround for negative timestamps in Dropbox
if (ts.getTime() >= 0)
{
row = document.createElement('tr');
row.style.borderBottom = '1px solid lightGray';
row.style.fontSize = '12px';
row.style.cursor = 'pointer';
var date = document.createElement('td');
date.style.padding = pd;
date.style.whiteSpace = 'nowrap';
if (item == revs[revs.length - 1])
{
mxUtils.write(date, mxResources.get('current'));
}
else
{
if (ts.toDateString() === today)
{
mxUtils.write(date, ts.toLocaleTimeString());
}
else
{
mxUtils.write(date, ts.toLocaleDateString() + ' ' +
ts.toLocaleTimeString());
}
}
row.appendChild(date);
row.setAttribute('title', ts.toLocaleDateString() + ' ' +
ts.toLocaleTimeString() + ' ' +
editorUi.formatFileSize(parseInt(item.fileSize)) +
((item.lastModifyingUserName != null) ? ' ' +
item.lastModifyingUserName : ''));
function updateGraph(xml)
{
spinner.stop();
var doc = mxUtils.parseXml(xml);
var node = editorUi.editor.extractGraphModel(doc.documentElement, true);
if (node != null)
{
pageSelect.style.display = 'none';
pageSelect.innerHTML = '';
currentDoc = doc;
currentXml = xml;
parseSelectFunction = null;
diagrams = null;
realPage = 0;
function parseGraphModel(dataNode)
{
var bg = dataNode.getAttribute('background');
if (bg == null || bg == '' || bg == mxConstants.NONE)
{
bg = '#ffffff';
}
container.style.backgroundColor = bg;
var codec = new mxCodec(dataNode.ownerDocument);
codec.decode(dataNode, graph.getModel());
graph.maxFitScale = 1;
graph.fit(8);
graph.center();
return dataNode;
}
function parseDiagram(diagramNode)
{
if (diagramNode != null)
{
diagramNode = parseGraphModel(mxUtils.parseXml(editorUi.editor.graph.decompress(
mxUtils.getTextContent(diagramNode))).documentElement);
}
return diagramNode;
}
if (node.nodeName == 'mxfile')
{
// Workaround for "invalid calling object" error in IE
var tmp = node.getElementsByTagName('diagram');
diagrams = [];
for (var i = 0; i < tmp.length; i++)
{
diagrams.push(tmp[i]);
}
realPage = Math.min(currentPage, diagrams.length - 1);
if (diagrams.length > 0)
{
parseDiagram(diagrams[realPage]);
}
if (diagrams.length > 1)
{
pageSelect.removeAttribute('disabled');
pageSelect.style.display = '';
for (var i = 0; i < diagrams.length; i++)
{
var pageOption = document.createElement('option');
mxUtils.write(pageOption, diagrams[i].getAttribute('name') ||
mxResources.get('pageWithNumber', [i + 1]));
pageOption.setAttribute('value', i);
if (i == realPage)
{
pageOption.setAttribute('selected', 'selected');
}
pageSelect.appendChild(pageOption);
}
}
pageSelectFunction = function()
{
currentPage = parseInt(pageSelect.value);
realPage = currentPage;
parseDiagram(diagrams[currentPage]);
}
}
else
{
parseGraphModel(node);
}
fileInfo.innerHTML = '';
mxUtils.write(fileInfo, ts.toLocaleDateString() + ' ' +
ts.toLocaleTimeString());
fileInfo.setAttribute('title', row.getAttribute('title'));
zoomInBtn.removeAttribute('disabled');
zoomOutBtn.removeAttribute('disabled');
zoomFitBtn.removeAttribute('disabled');
zoomActualBtn.removeAttribute('disabled');
if (file == null || !file.isRestricted())
{
if (editorUi.editor.graph.isEnabled())
{
restoreBtn.removeAttribute('disabled');
}
downloadBtn.removeAttribute('disabled');
showBtn.removeAttribute('disabled');
newBtn.removeAttribute('disabled');
}
mxUtils.setOpacity(zoomInBtn, 60);
mxUtils.setOpacity(zoomOutBtn, 60);
mxUtils.setOpacity(zoomFitBtn, 60);
mxUtils.setOpacity(zoomActualBtn, 60);
}
else
{
pageSelect.style.display = 'none';
pageSelect.innerHTML = '';
fileInfo.innerHTML = '';
mxUtils.write(fileInfo, mxResources.get('errorLoadingFile'));
}
};
mxEvent.addListener(row, 'click', function(evt)
{
if (currentRev != item)
{
spinner.stop();
if (currentRow != null)
{
currentRow.style.backgroundColor = '';
}
currentRev = item;
currentRow = row;
currentRow.style.backgroundColor = '#ebf2f9';
currentDoc = null;
currentXml = null;
fileInfo.removeAttribute('title');
fileInfo.innerHTML = mxResources.get('loading') + '...';
container.style.backgroundColor = '#ffffff';
graph.getModel().clear();
restoreBtn.setAttribute('disabled', 'disabled');
downloadBtn.setAttribute('disabled', 'disabled');
zoomInBtn.setAttribute('disabled', 'disabled');
zoomOutBtn.setAttribute('disabled', 'disabled');
zoomActualBtn.setAttribute('disabled', 'disabled');
zoomFitBtn.setAttribute('disabled', 'disabled');
newBtn.setAttribute('disabled', 'disabled');
showBtn.setAttribute('disabled', 'disabled');
pageSelect.setAttribute('disabled', 'disabled');
mxUtils.setOpacity(zoomInBtn, 20);
mxUtils.setOpacity(zoomOutBtn, 20);
mxUtils.setOpacity(zoomFitBtn, 20);
mxUtils.setOpacity(zoomActualBtn, 20);
spinner.spin(container);
item.getXml(function(xml)
{
if (currentRev == item)
{
updateGraph(xml);
}
}, function(err)
{
spinner.stop();
pageSelect.style.display = 'none';
pageSelect.innerHTML = '';
fileInfo.innerHTML = '';
mxUtils.write(fileInfo, mxResources.get('errorLoadingFile'));
});
mxEvent.consume(evt);
}
});
mxEvent.addListener(row, 'dblclick', function(evt)
{
showBtn.click();
if (window.getSelection)
{
window.getSelection().removeAllRanges();
}
else if (document.selection)
{
document.selection.empty();
}
mxEvent.consume(evt);
}, false);
tbody.appendChild(row);
}
return row;
})(revs[i]);
// Selects and loads first element in list (ie current version) after
// graph container was initialized since there is no loading delay
if (elt != null && i == revs.length - 1)
{
currentElt = elt;
}
}
table.appendChild(tbody);
list.appendChild(table);
}
else
{
container.style.display = 'none';
tb.style.display = 'none';
mxUtils.write(list, mxResources.get('noRevisions'));
}
container.style.display = 'none';
tb.style.display = 'none';
mxUtils.write(list, mxResources.get('noRevisions'));
}
this.init = function()

View file

@ -361,7 +361,7 @@ mxGraphMlCodec.prototype.mapArray = function(arr, mapping, map)
{
if (arr[k].name)
{
obj[arr[k].name] = arr[k].value;
obj[arr[k].name] = arr[k].value || arr[k];
}
}
this.mapObject(obj, mapping, map);
@ -1460,25 +1460,58 @@ mxGraphMlCodec.prototype.handleCompoundShape = function (node, styleMap, mlStyle
"yed.table.lane.color.alternating": {key: "laneColorAlt", mod: "color"},
"yed.table.lane.style": "laneStyle",
"com.yworks.bpmn.type": "isHorz",
"y.view.tabular.TableNodePainter.ALTERNATE_ROW_STYLE": {
"fillColor": {key: "secColor", mod: "color"},
"lineColor": {key: "secColor", mod: "color"},
"lineType": "lineType",
"lineWidth": "lineWidth"
}
"POOL_LANE_COLOR_ALTERNATING": {key: "laneColorAlt", mod: "color"},
"POOL_LANE_COLOR_MAIN": {key: "laneColor", mod: "color"},
"POOL_LANE_STYLE": "laneStyle",
"POOL_HEADER_COLOR_MAIN": {key: "headerColor", mod: "color"},
"POOL_HEADER_COLOR_ALTERNATING": {key: "headerColorAlt", mod: "color"},
"POOL_TABLE_SECTION_COLOR": {key: "secColor", mod: "color"}
// //Not Used!
// "y.view.tabular.TableNodePainter.ALTERNATE_ROW_STYLE": {
// "y:SimpleStyle": {
// "fillColor": {key: "rowAltFillColor", mod: "color"},
// "lineColor": {key: "rowAltLineColor", mod: "color"},
// "lineType": "rowAltlineType",
// "lineWidth": "rowAltlineWidth"
// }
// },
// "y.view.tabular.TableNodePainter.ALTERNATE_COLUMN_STYLE": {
// "y:SimpleStyle": {
// "fillColor": {key: "colAltFillColor", mod: "color"},
// "lineColor": {key: "colAltLineColor", mod: "color"},
// "lineType": "colAltlineType",
// "lineWidth": "colAltlineWidth"
// }
// }
},
"y:Table": {
"y:DefaultColumnInsets.top": "colHHeight",
"y:DefaultRowInsets.left": "rowHWidth",
"y:Insets.top": "tblHHeight", //TODO is there rotated tables?
"y:Insets": {
"top": "tblHHeight",
"left": "tblHWidth"
}
}
}
}, tmpMap);
styleMap["startSize"] = tmpMap["tblHHeight"];
styleMap["swimlaneFillColor"] = styleMap["fillColor"];
var th = parseFloat(styleMap["startSize"]);
var isHor = tmpMap["isHorz"] == "pool_type_lane_and_column"
|| tmpMap["isHorz"] == "pool_type_empty"
|| tmpMap["isHorz"] == "pool_type_lane";
var th = 0, tw = 0;
if (isHor)
{
tw = parseFloat(tmpMap["tblHWidth"]);
}
else
{
th = parseFloat(tmpMap["tblHHeight"]);
}
styleMap["startSize"] = th? th : tw;
//Assumptions: There is always rows and cols in every table
//Also all tables seems to be not rotated
try
@ -1486,7 +1519,7 @@ mxGraphMlCodec.prototype.handleCompoundShape = function (node, styleMap, mlStyle
var rows = mlStyleObj["y:TableNode"]["y:Table"]["y:Rows"]["y:Row"];
var cols = mlStyleObj["y:TableNode"]["y:Table"]["y:Columns"]["y:Column"];
var atts4Rows = tmpMap["laneStyle"] == "lane.style.rows";
var atts4Rows = tmpMap["laneStyle"] == "lane.style.rows" || tmpMap["laneStyle"] == "lane_style_rows";
if (!(rows instanceof Array))
rows = [rows];
@ -1494,74 +1527,31 @@ mxGraphMlCodec.prototype.handleCompoundShape = function (node, styleMap, mlStyle
if (!(cols instanceof Array))
cols = [cols];
var y = th + parseFloat(tmpMap["colHHeight"]);
var rowStartSize = parseFloat(tmpMap["rowHWidth"]);
for (var i = 0; i < rows.length; i++)
{
var odd = i & 1;
var cell = new mxCell();
cell.vertex = true;
var rowStyle = {
"shape": "swimlane;collapsible=0;horizontal=0",
"startSize": (rows[i]["y:Insets"]? rows[i]["y:Insets"]["left"] : tmpMap["rowHWidth"]),
"fillColor": tmpMap["secColor"]
};
if (parseFloat(rowStyle["startSize"]) == 0)
{
rowStyle["fillColor"] = "none";
}
if (atts4Rows)
{
rowStyle["fillColor"] = odd? tmpMap["headerColorAlt"] : tmpMap["headerColor"];
rowStyle["swimlaneFillColor"] = odd? tmpMap["laneColorAlt"] : tmpMap["laneColor"];
}
var height = parseFloat(rows[i]["height"]);
cell.geometry = new mxGeometry(0, y, node.geometry.width, height);
y += height;
// if (lblObj)
// this.addLabels(cell, lblObj, rowStyle)
cell.style = this.styleMap2Str(rowStyle);
node.insert(cell);
if (rows[i]["y:Insets"])
rowStartSize = Math.max(rowStartSize,
parseFloat(rows[i]["y:Insets"]["left"]) + parseFloat(rows[i]["y:Insets"]["right"]));
}
var x = parseFloat(tmpMap["rowHWidth"]);
var colStartSize = parseFloat(tmpMap["colHHeight"]);
for (var i = 0; i < cols.length; i++)
{
var odd = i & 1;
var cell = new mxCell();
cell.vertex = true;
var colStyle = {
"shape": "swimlane;collapsible=0",
"startSize": (cols[i]["y:Insets"]? cols[i]["y:Insets"]["top"] : tmpMap["colHHeight"]),
"fillColor": tmpMap["secColor"]
};
if (parseFloat(colStyle["startSize"]) == 0)
{
colStyle["fillColor"] = "none";
}
if (!atts4Rows)
{
colStyle["fillColor"] = odd? tmpMap["headerColorAlt"] : tmpMap["headerColor"];
colStyle["swimlaneFillColor"] = odd? tmpMap["laneColorAlt"] : tmpMap["laneColor"];
}
var width = parseFloat(cols[i]["width"]);
cell.geometry = new mxGeometry(x, th, width, node.geometry.height - th);
x += width;
// if (lblObj)
// this.addLabels(cell, lblObj, rowStyle)
cell.style = this.styleMap2Str(colStyle);
node.insert(cell);
if (cols[i]["y:Insets"])
colStartSize = Math.max(colStartSize,
parseFloat(cols[i]["y:Insets"]["top"]) + parseFloat(cols[i]["y:Insets"]["bottom"]));
}
if (atts4Rows)
{
this.addTbl2Rows(node, rows, th, tw, rowStartSize, colStartSize, atts4Rows, tmpMap);
this.addTbl2Cols(node, cols, th, tw, rowStartSize, colStartSize, atts4Rows, tmpMap);
}
else
{
this.addTbl2Cols(node, cols, th, tw, rowStartSize, colStartSize, atts4Rows, tmpMap);
this.addTbl2Rows(node, rows, th, tw, rowStartSize, colStartSize, atts4Rows, tmpMap);
}
}
catch(e)
@ -1578,6 +1568,90 @@ mxGraphMlCodec.prototype.handleCompoundShape = function (node, styleMap, mlStyle
}
};
mxGraphMlCodec.prototype.addTbl2Rows = function(node, rows, th, tw, rowStartSize, colStartSize, atts4Rows, tmpMap)
{
var y = th + colStartSize;
var isBPMN = tmpMap["isHorz"] != null;
for (var i = 0; i < rows.length; i++)
{
var odd = i & 1;
var cell = new mxCell();
cell.vertex = true;
var rowStyle = {
"shape": "swimlane;collapsible=0;horizontal=0",
"startSize": rowStartSize,
"fillColor": tmpMap["secColor"] || "none",
"swimlaneLine": (isBPMN? "0" : "1")
};
if (parseFloat(rowStyle["startSize"]) == 0)
{
rowStyle["fillColor"] = "none";
}
if (atts4Rows)
{
var fillColor = odd? tmpMap["headerColorAlt"] : tmpMap["headerColor"];
rowStyle["swimlaneFillColor"] = odd? tmpMap["laneColorAlt"] : tmpMap["laneColor"];
rowStyle["fillColor"] = fillColor? fillColor : rowStyle["swimlaneFillColor"];
}
var height = parseFloat(rows[i]["height"]);
var dh = (isBPMN && i == 0)? colStartSize : 0 ;
cell.geometry = new mxGeometry(tw, y - dh, node.geometry.width - tw, height + dh);
y += height;
// if (lblObj)
// this.addLabels(cell, lblObj, rowStyle)
cell.style = this.styleMap2Str(rowStyle);
node.insert(cell);
}
};
mxGraphMlCodec.prototype.addTbl2Cols = function(node, cols, th, tw, rowStartSize, colStartSize, atts4Rows, tmpMap)
{
var x = rowStartSize + tw;
var isBPMN = tmpMap["isHorz"] != null;
for (var i = 0; i < cols.length; i++)
{
var odd = i & 1;
var cell = new mxCell();
cell.vertex = true;
var colStyle = {
"shape": "swimlane;collapsible=0",
"startSize": colStartSize,
"fillColor": tmpMap["secColor"] || "none",
"swimlaneLine": (isBPMN? "0" : "1")
};
if (parseFloat(colStyle["startSize"]) == 0)
{
colStyle["fillColor"] = "none";
}
if (!atts4Rows)
{
var fillColor = odd? tmpMap["headerColorAlt"] : tmpMap["headerColor"];
colStyle["swimlaneFillColor"] = odd? tmpMap["laneColorAlt"] : tmpMap["laneColor"];
colStyle["fillColor"] = fillColor? fillColor : colStyle["swimlaneFillColor"];
}
var width = parseFloat(cols[i]["width"]);
var dw = (isBPMN && i == 0)? rowStartSize : 0 ;
cell.geometry = new mxGeometry(x - dw, th, width + dw, node.geometry.height - th);
x += width;
// if (lblObj)
// this.addLabels(cell, lblObj, rowStyle)
cell.style = this.styleMap2Str(colStyle);
node.insert(cell);
}
};
mxGraphMlCodec.prototype.addRow = function(row, parent, odd, y, xShift, rowMapping, defRowStyle)
{
var cell = new mxCell();

File diff suppressed because one or more lines are too long

View file

@ -184,7 +184,7 @@ f)+"\n"+u+"}":"{"+z.join(",")+"}";f=u;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.8",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.9",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/")||

View file

@ -184,7 +184,7 @@ f)+"\n"+u+"}":"{"+z.join(",")+"}";f=u;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.8",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.9",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/")||

File diff suppressed because it is too large Load diff