7.6.4 release

Former-commit-id: 5e32ba61b9
This commit is contained in:
Gaudenz Alder 2017-10-28 17:52:40 +02:00
parent efa707691e
commit 08a464d69d
22 changed files with 2987 additions and 2486 deletions

View file

@ -1,3 +1,10 @@
28-OCT-2017: 7.6.4
- Adds vector handles
- Fixes text style combo in Firefox
- Fixes text flow after word wrap change
- Uses mxGraph 3.7.6 beta 7
26-OCT-2017: 7.6.3
- Adds current style to CSV and text

View file

@ -1 +1 @@
7.6.3
7.6.4

View file

@ -928,9 +928,9 @@ e.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b,a));mxEvent.consume(b)},f
mxCellRenderer.prototype.isShapeEvent=function(a,b){return!0};mxCellRenderer.prototype.isLabelEvent=function(a,b){return!0};
mxCellRenderer.prototype.installListeners=function(a){var b=a.view.graph,c=function(c){var d=a;if(b.dialect!=mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(c).nodeName||mxClient.IS_TOUCH)d=mxEvent.getClientX(c),c=mxEvent.getClientY(c),c=mxUtils.convertPoint(b.container,d,c),d=b.view.getState(b.getCellAt(c.x,c.y));return d};mxEvent.addGestureListeners(a.shape.node,mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c,a))}),mxUtils.bind(this,
function(d){this.isShapeEvent(a,d)&&b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(d,c(d)))}),mxUtils.bind(this,function(d){this.isShapeEvent(a,d)&&b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(d,c(d)))}));b.nativeDblClickEnabled&&mxEvent.addListener(a.shape.node,"dblclick",mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&(b.dblClick(c,a.cell),mxEvent.consume(c))}))};
mxCellRenderer.prototype.redrawLabel=function(a,b){var c=this.getLabelValue(a);null==a.text&&null!=c&&(mxUtils.isNode(c)||0<c.length)?this.createLabel(a,c):null==a.text||null!=c&&0!=c.length||(a.text.destroy(),a.text=null);if(null!=a.text){var d=a.view.graph;b&&(null!=a.text.lastValue&&this.isTextShapeInvalid(a,a.text)&&(a.text.lastValue=null),a.text.resetStyles(),a.text.apply(a),a.text.valign=d.getVerticalAlign(a));var e=this.getLabelBounds(a),f=d.isWrapping(a.cell),d=d.isLabelClipped(a.cell),g=
a.view.graph.isHtmlLabel(a.cell)||null!=c&&mxUtils.isNode(c)?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect,k=a.style[mxConstants.STYLE_OVERFLOW]||"visible",l=this.getTextScale(a);if(b||a.text.value!=c||a.text.isWrapping!=f||a.text.overflow!=k||a.text.isClipping!=d||a.text.scale!=l||a.text.dialect!=g||!a.text.bounds.equals(e))0!=a.text.bounds.width&&0!=Math.round(a.text.bounds.width/a.text.scale*l-e.width)&&(a.unscaledWidth=null),a.text.dialect=g,a.text.value=c,a.text.bounds=e,a.text.scale=l,
a.text.wrap=f,a.text.clipped=d,a.text.overflow=k,c=a.text.node.style.visibility,this.redrawLabelShape(a.text),a.text.node.style.visibility=c}};
mxCellRenderer.prototype.redrawLabel=function(a,b){var c=a.view.graph,d=this.getLabelValue(a),e=c.isWrapping(a.cell),f=c.isLabelClipped(a.cell),g=a.view.graph.isHtmlLabel(a.cell)||null!=d&&mxUtils.isNode(d)?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect,k=a.style[mxConstants.STYLE_OVERFLOW]||"visible";null==a.text||a.text.wrap==e&&a.text.clipped==f&&a.text.overflow==k&&a.text.dialect==g||(a.text.destroy(),a.text=null);null==a.text&&null!=d&&(mxUtils.isNode(d)||0<d.length)?this.createLabel(a,
d):null==a.text||null!=d&&0!=d.length||(a.text.destroy(),a.text=null);if(null!=a.text){b&&(null!=a.text.lastValue&&this.isTextShapeInvalid(a,a.text)&&(a.text.lastValue=null),a.text.resetStyles(),a.text.apply(a),a.text.valign=c.getVerticalAlign(a));var c=this.getLabelBounds(a),l=this.getTextScale(a);if(b||a.text.value!=d||a.text.isWrapping!=e||a.text.overflow!=k||a.text.isClipping!=f||a.text.scale!=l||a.text.dialect!=g||!a.text.bounds.equals(c))0!=a.text.bounds.width&&null!=a.unscaledWidth&&0!=Math.round(a.text.bounds.width/
a.text.scale*l-c.width)&&(a.unscaledWidth=null),a.text.dialect=g,a.text.value=d,a.text.bounds=c,a.text.scale=l,a.text.wrap=e,a.text.clipped=f,a.text.overflow=k,d=a.text.node.style.visibility,this.redrawLabelShape(a.text),a.text.node.style.visibility=d}};
mxCellRenderer.prototype.isTextShapeInvalid=function(a,b){function c(c,e,f){return result="spacingTop"==e||"spacingRight"==e||"spacingBottom"==e||"spacingLeft"==e?parseFloat(b[c])-parseFloat(b.spacing)!=(a.style[e]||f):b[c]!=(a.style[e]||f)}return c("fontStyle",mxConstants.STYLE_FONTSTYLE,mxConstants.DEFAULT_FONTSTYLE)||c("family",mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY)||c("size",mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE)||c("color",mxConstants.STYLE_FONTCOLOR,"black")||
c("align",mxConstants.STYLE_ALIGN,"")||c("valign",mxConstants.STYLE_VERTICAL_ALIGN,"")||c("spacing",mxConstants.STYLE_SPACING,2)||c("spacingTop",mxConstants.STYLE_SPACING_TOP,0)||c("spacingRight",mxConstants.STYLE_SPACING_RIGHT,0)||c("spacingBottom",mxConstants.STYLE_SPACING_BOTTOM,0)||c("spacingLeft",mxConstants.STYLE_SPACING_LEFT,0)||c("horizontal",mxConstants.STYLE_HORIZONTAL,!0)||c("background",mxConstants.STYLE_LABEL_BACKGROUNDCOLOR)||c("border",mxConstants.STYLE_LABEL_BORDERCOLOR)||c("opacity",
mxConstants.STYLE_TEXT_OPACITY,100)||c("textDirection",mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION)};mxCellRenderer.prototype.redrawLabelShape=function(a){a.redraw()};mxCellRenderer.prototype.getTextScale=function(a){return a.view.scale};

View file

@ -4,11 +4,14 @@
*/
package com.mxgraph.online;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.Arrays;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
@ -80,10 +83,38 @@ public class ProxyServlet extends HttpServlet
response.setStatus(((HttpURLConnection) connection).getResponseCode());
}
String base64 = request.getParameter("base64");
if (connection != null)
{
response.setContentType(connection.getContentType());
Utils.copy(connection.getInputStream(), out);
if (base64 != null && base64.equals("1"))
{
int BUFFER_SIZE = 3 * 1024;
try (BufferedInputStream in = new BufferedInputStream(connection.getInputStream(), BUFFER_SIZE); )
{
StringBuilder result = new StringBuilder();
byte[] chunk = new byte[BUFFER_SIZE];
int len = 0;
while ( (len = in.read(chunk)) == BUFFER_SIZE )
{
result.append(mxBase64.encodeToString(chunk, false));
}
if ( len > 0 )
{
chunk = Arrays.copyOf(chunk,len);
result.append(mxBase64.encodeToString(chunk, false));
}
out.write(result.toString().getBytes());
}
}
else
{
response.setContentType(connection.getContentType());
Utils.copy(connection.getInputStream(), out);
}
}
out.flush();

View file

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

View file

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 161.6 217.4" style="enable-background:new 0 0 161.6 217.4;" xml:space="preserve">
<style type="text/css">
.st0{fill:#F08705;}
.st1{fill:#DF6C0C;}
.st2{fill:#FFFFFF;}
.st3{fill:#333333;}
</style>
<g>
<path class="st0" d="M161.6,154.7c0,3.9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.3c-0.1-0.1-0.2-0.3-0.2-0.4v-22.7c0-0.2,0.1-0.3,0.2-0.4s0.3-0.2,0.5-0.3c0.2-0.1,0.6-0.2,1-0.2
c0.4-0.1,0.9-0.1,1.6-0.1s1.1,0,1.6,0.1c0.4,0.1,0.7,0.1,1,0.2c0.2,0.1,0.4,0.2,0.5,0.3c0.1,0.1,0.2,0.3,0.2,0.4V216z"/>
<path class="st0" d="M159.6,204.4c0,1.9-0.3,3.7-0.8,5.3c-0.5,1.6-1.3,3-2.3,4.1c-1,1.2-2.3,2-3.9,2.7c-1.6,0.6-3.4,0.9-5.5,0.9
c-2,0-3.8-0.3-5.3-0.8c-1.5-0.6-2.7-1.4-3.7-2.4c-1-1.1-1.7-2.4-2.2-4s-0.7-3.3-0.7-5.4c0-1.9,0.3-3.7,0.8-5.3
c0.5-1.6,1.3-3,2.3-4.1s2.3-2,3.9-2.7c1.6-0.6,3.4-0.9,5.5-0.9c2,0,3.8,0.3,5.3,0.8c1.5,0.6,2.7,1.4,3.7,2.4c1,1.1,1.7,2.4,2.2,4
C159.3,200.6,159.6,202.4,159.6,204.4z M153,204.6c0-1.1-0.1-2.2-0.3-3.1c-0.2-0.9-0.5-1.8-0.9-2.5s-1-1.2-1.7-1.6
s-1.6-0.6-2.7-0.6c-1,0-1.8,0.2-2.5,0.5s-1.3,0.9-1.8,1.5c-0.5,0.7-0.8,1.5-1,2.4s-0.3,2-0.3,3.2c0,1.1,0.1,2.2,0.3,3.1
c0.2,0.9,0.5,1.8,0.9,2.5s1,1.2,1.7,1.6s1.6,0.6,2.7,0.6c1,0,1.8-0.2,2.5-0.5s1.3-0.9,1.8-1.5c0.5-0.7,0.8-1.5,1-2.4
C152.9,206.9,153,205.8,153,204.6z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.9 KiB

View file

@ -1,13 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="31.3002" height="29.1126" viewBox="0 0 31.3002 29.1126">
<g transform="matrix(0.3,0,0,0.3,-9.8499,-10.9437)" style="fill:#ffffff">
<g style="fill:#ffffff">
<polygon points="63.524,36.479 32.833,56.518 54.054,73.512 85,54.403" style="fill:#ffffff" />
<polygon points="32.833,90.507 63.524,110.546 85,92.62 54.054,73.512" style="fill:#ffffff" />
<polygon points="85,92.62 106.476,110.546 137.167,90.507 115.946,73.512" style="fill:#ffffff" />
<polygon points="137.167,56.518 106.476,36.479 85,54.403 115.946,73.512" style="fill:#ffffff" />
<polygon points="85.063,96.477 63.524,114.35 54.307,108.332 54.307,115.078 85.063,133.521 115.819,115.078 115.819,108.332 106.602,114.35"
style="fill:#ffffff" />
</g>
</g>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="31" height="26.333" viewBox="0 0 235.45 200">
<defs>
<style>.cls-1{fill:#ffffff;}</style>
</defs>
<title>DropboxGlyph</title>
<polygon class="cls-1" points="58.86 0 0 37.5 58.86 75 117.73 37.5 58.86 0"/>
<polygon class="cls-1" points="176.59 0 117.73 37.5 176.59 75 235.45 37.5 176.59 0"/>
<polygon class="cls-1" points="0 112.5 58.86 150 117.73 112.5 58.86 75 0 112.5"/>
<polygon class="cls-1" points="176.59 75 117.73 112.5 176.59 150 235.45 112.5 176.59 75"/>
<polygon class="cls-1" points="58.86 162.5 117.73 200 176.59 162.5 117.73 125 58.86 162.5"/>
</svg>

Before

Width:  |  Height:  |  Size: 846 B

After

Width:  |  Height:  |  Size: 707 B

View file

@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="104.334" height="97.042" viewBox="0 0 104.334 97.042">
<g transform="translate(-32.833,-36.479)" id="Layer_1">
<polygon points="63.524,36.479 32.833,56.518 54.054,73.512 85,54.403" style="fill:#007ee5" />
<polygon points="32.833,90.507 63.524,110.546 85,92.62 54.054,73.512" style="fill:#007ee5" />
<polygon points="85,92.62 106.476,110.546 137.167,90.507 115.946,73.512" style="fill:#007ee5" />
<polygon points="137.167,56.518 106.476,36.479 85,54.403 115.946,73.512" style="fill:#007ee5" />
<polygon points="85.063,133.521 115.819,115.078 115.819,108.332 106.602,114.35 85.063,96.477 63.524,114.35 54.307,108.332 54.307,115.078"
style="fill:#007ee5" />
</g>
</svg>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 235.45 200">
<defs>
<style>.cls-1{fill:#0061ff;}</style>
</defs>
<title>DropboxGlyph</title>
<polygon class="cls-1" points="58.86 0 0 37.5 58.86 75 117.73 37.5 58.86 0"/>
<polygon class="cls-1" points="176.59 0 117.73 37.5 176.59 75 235.45 37.5 176.59 0"/>
<polygon class="cls-1" points="0 112.5 58.86 150 117.73 112.5 58.86 75 0 112.5"/>
<polygon class="cls-1" points="176.59 75 117.73 112.5 176.59 150 235.45 112.5 176.59 75"/>
<polygon class="cls-1" points="58.86 162.5 117.73 200 176.59 162.5 117.73 125 58.86 162.5"/>
</svg>

Before

Width:  |  Height:  |  Size: 790 B

After

Width:  |  Height:  |  Size: 680 B

1326
war/js/app.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1269
war/js/atlas.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -123,3 +123,6 @@ if (urlParams['distanceGuides'] == '1')
//mxscript(drawDevUrl + 'js/jszip/jszip.min.js');
mxscript(drawDevUrl + 'js/vsdx/bmpDecoder.js');
mxscript(drawDevUrl + 'js/vsdx/importer.js');
//GraphMl Import
mxscript(drawDevUrl + 'js/diagramly/graphml/mxGraphMlCodec.js');

View file

@ -4403,11 +4403,24 @@ var AboutDialog = function(editorUi)
var img = document.createElement('img');
img.style.border = '0px';
img.setAttribute('width', '176');
img.setAttribute('width', '151');
img.style.width = '170px';
img.style.height = '219px';
img.setAttribute('src', IMAGE_PATH + '/logo-flat.png');
if (mxClient.IS_SVG)
{
img.setAttribute('width', '164');
img.setAttribute('height', '221');
img.style.width = '164px';
img.style.height = '221px';
img.setAttribute('src', IMAGE_PATH + '/drawlogo-text-bottom.svg');
}
else
{
img.setAttribute('width', '176');
img.setAttribute('height', '219');
img.style.width = '170px';
img.style.height = '219px';
img.setAttribute('src', IMAGE_PATH + '/logo-flat.png');
}
div.appendChild(img);
mxUtils.br(div);
@ -7911,7 +7924,7 @@ var EditShapeDialog = function(editorUi, cell, title, w, h)
this.container = table;
};
var CustomDialog = function(editorUi, content, okFn, cancelFn, okButtonText, helpLink)
var CustomDialog = function(editorUi, content, okFn, cancelFn, okButtonText, helpLink, buttonsContent)
{
var div = document.createElement('div');
div.appendChild(content);
@ -7919,6 +7932,11 @@ var CustomDialog = function(editorUi, content, okFn, cancelFn, okButtonText, hel
var btns = document.createElement('div');
btns.style.marginTop = '16px';
btns.style.textAlign = 'right';
if (buttonsContent != null)
{
btns.appendChild(buttonsContent);
}
var cancelBtn = mxUtils.button(mxResources.get('cancel'), function()
{

View file

@ -2694,10 +2694,10 @@
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
EditorUi.prototype.saveLocalFile = function(data, filename, mimeType, base64Encoded, format, allowBrowser)
EditorUi.prototype.saveLocalFile = function(data, filename, mimeType, base64Encoded, format, allowBrowser, allowTab)
{
allowBrowser = (allowBrowser != null) ? allowBrowser : false;
var allowTab = (format != 'vsdx') && (!mxClient.IS_IOS || !navigator.standalone);
allowTab = (allowTab != null) ? allowTab : (format != 'vsdx') && (!mxClient.IS_IOS || !navigator.standalone);
var count = this.getServiceCount(allowBrowser);
var dlg = new CreateDialog(this, filename, mxUtils.bind(this, function(newTitle, mode)
@ -2939,9 +2939,9 @@
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
EditorUi.prototype.saveRequest = function(filename, format, fn, data, base64Encoded, mimeType)
EditorUi.prototype.saveRequest = function(filename, format, fn, data, base64Encoded, mimeType, allowTab)
{
var allowTab = !mxClient.IS_IOS || !navigator.standalone;
allowTab = (allowTab != null) ? allowTab : !mxClient.IS_IOS || !navigator.standalone;
var count = this.getServiceCount(false);
var dlg = new CreateDialog(this, filename, mxUtils.bind(this, function(newTitle, mode)
@ -5633,6 +5633,18 @@
'verticalAlign=top;aspect=fixed;imageAspect=0;image=' + data + ';')];
}
}
else if (urlParams['dev'] == '1' && /(\.*<graphml )/.test(data))
{
new mxGraphMlCodec().decode(data, mxUtils.bind(this, function(xml)
{
var importedCells = this.importXml(xml, dx, dy, crop);
if (done != null)
{
done(importedCells);
}
}));
}
else if (!this.isOffline() && new XMLHttpRequest().upload && this.isRemoteFileFormat(data, filename))
{
// LATER: done and async are a hack before making this asynchronous

View file

@ -7,6 +7,7 @@ TrelloFile = function(ui, data, meta)
DrawioFile.call(this, ui, data);
this.meta = meta;
this.saveNeededCounter = 0;
};
//Extends mxEventSource
@ -33,7 +34,7 @@ TrelloFile.prototype.getMode = function()
*/
TrelloFile.prototype.isAutosave = function()
{
return false;
return true;
};
/**
@ -127,6 +128,10 @@ TrelloFile.prototype.saveFile = function(title, revision, success, error)
{
success();
}
if (this.saveNeededCounter > 0) {
this.saveNeededCounter--;
this.saveFile(title, revision, success, error);
}
}),
mxUtils.bind(this, function(err)
{
@ -166,6 +171,11 @@ TrelloFile.prototype.saveFile = function(title, revision, success, error)
}
this.ui.fileLoaded(file);
if (this.saveNeededCounter > 0) {
this.saveNeededCounter--;
this.saveFile(title, revision, success, error);
}
}), mxUtils.bind(this, function()
{
this.savingFile = false;
@ -180,6 +190,7 @@ TrelloFile.prototype.saveFile = function(title, revision, success, error)
}
else if (error != null)
{
this.saveNeededCounter++;
error({code: App.ERROR_BUSY});
}
};

View file

@ -0,0 +1,366 @@
function mxGraphMlCodec()
{
}
mxGraphMlCodec.prototype.decode = function (xml, callback)
{
var doc = mxUtils.parseXml(xml);
var graphs = this.getDirectChildNamedElements(doc.documentElement, mxGraphMlConstants.GRAPH);
this.initializeKeys(doc.documentElement);
var mxFile = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><mxfile>";
for (var i = 0; i < graphs.length; i++)
{
var pageElement = graphs[i];
var graph = this.createMxGraph();
graph.getModel().beginUpdate();
this.importPage(pageElement, graph);
mxFile += this.processPage(graph, i+1);
}
mxFile += "</mxfile>";
if (callback)
{
callback(mxFile);
}
}
mxGraphMlCodec.prototype.initializeKeys = function (graphmlElement)
{
var keys = this.getDirectChildNamedElements(graphmlElement, mxGraphMlConstants.KEY);
this.nodesKeys = {};
this.edgesKeys = {};
this.portsKeys = {};
this.sharedData = {};
var sharedDataId;
for (var i = 0; i < keys.length; i++)
{
var id = keys[i].getAttribute(mxGraphMlConstants.ID);
var _for = keys[i].getAttribute(mxGraphMlConstants.KEY_FOR);
var attName = keys[i].getAttribute(mxGraphMlConstants.KEY_NAME);
if (attName == mxGraphMlConstants.SHARED_DATA) sharedDataId = id;
switch (_for)
{
case mxGraphMlConstants.NODE:
this.nodesKeys[id] = {att: attName, elems: keys[i].childNodes};
break;
case mxGraphMlConstants.EDGE:
this.edgesKeys[id] = {att: attName, elems: keys[i].childNodes};
break;
case mxGraphMlConstants.PORT:
this.portsKeys[id] = {att: attName, elems: keys[i].childNodes};
break;
case mxGraphMlConstants.ALL:
this.nodesKeys[id] = {att: attName, elems: keys[i].childNodes};
this.edgesKeys[id] = {att: attName, elems: keys[i].childNodes};
this.portsKeys[id] = {att: attName, elems: keys[i].childNodes};
break;
}
}
var data = this.getDirectChildNamedElements(graphmlElement, mxGraphMlConstants.DATA);
for (var i = 0; i < data.length; i++)
{
var key = data[i].getAttribute(mxGraphMlConstants.KEY);
if (key == sharedDataId)
{
var sharedData = this.getDirectChildNamedElements(data[i], mxGraphMlConstants.Y_SHARED_DATA);
for (var j = 0; j < sharedData.length; j++)
{
var dataItems = this.getDirectChildElements(sharedData[j]);
for (var k = 0; k < dataItems.length; k++)
{
var dkey = dataItems[k].getAttribute(mxGraphMlConstants.X_KEY);
this.sharedData[dkey] = dataItems[k];
}
}
}
}
}
mxGraphMlCodec.prototype.createMxGraph = function ()
{
var graph = new mxGraph();
// graph.setExtendParents(false);
// graph.setExtendParentsOnAdd(false);
// graph.setConstrainChildren(false);
// graph.setHtmlLabels(true);
// graph.getModel().maintainEdgeParent = false;
return graph;
}
mxGraphMlCodec.prototype.importPage = function (pageElement, graph)
{
var nodes = this.getDirectChildNamedElements(pageElement, mxGraphMlConstants.NODE);
var nodesMap = {};
for (var i = 0; i < nodes.length; i++)
{
this.importNode(nodes[i], graph, nodesMap);
}
var edges = this.getDirectChildNamedElements(pageElement, mxGraphMlConstants.EDGE);
for (var i = 0; i < edges.length; i++)
{
this.importEdge(edges[i], graph, nodesMap);
}
}
mxGraphMlCodec.prototype.importNode = function (nodeElement, graph, nodesMap)
{
var data = this.getDirectChildNamedElements(nodeElement, mxGraphMlConstants.DATA);
var v;
var id = nodeElement.getAttribute(mxGraphMlConstants.ID);
for (var i = 0; i < data.length; i++)
{
var d = data[i];
if (d.getAttribute(mxGraphMlConstants.KEY) == "d2") //TODO find the key!
{
var geoRect = this.getDirectChildNamedElements(d, mxGraphMlConstants.RECT);
if (geoRect.length == 1)
{
geoRect = geoRect[0];
v = graph.insertVertex(graph.getDefaultParent(), null, null,
geoRect.getAttribute(mxGraphMlConstants.X),
geoRect.getAttribute(mxGraphMlConstants.Y),
geoRect.getAttribute(mxGraphMlConstants.WIDTH),
geoRect.getAttribute(mxGraphMlConstants.HEIGHT)
)
}
}
}
nodesMap[id] = v;
}
mxGraphMlCodec.prototype.importEdge = function (edgeElement, graph, nodesMap)
{
var data = this.getDirectChildNamedElements(edgeElement, mxGraphMlConstants.DATA);
var e;
var id = edgeElement.getAttribute(mxGraphMlConstants.ID);
for (var i = 0; i < data.length; i++)
{
// var d = data[i];
// if (d.getAttribute(mxGraphMlConstants.KEY) == "d2") //TODO find the key!
// {
// var geoRect = this.getDirectChildNamedElements(d, mxGraphMlConstants.RECT);
//
// if (geoRect.length == 1)
// {
// geoRect = geoRect[0];
// v = graph.insertVertex(graph.getDefaultParent(), null, null,
// geoRect.getAttribute(mxGraphMlConstants.X),
// geoRect.getAttribute(mxGraphMlConstants.Y),
// geoRect.getAttribute(mxGraphMlConstants.WIDTH),
// geoRect.getAttribute(mxGraphMlConstants.HEIGHT)
// )
// }
// }
}
}
mxGraphMlCodec.prototype.processPage = function (graph, pageIndex)
{
var codec = new mxCodec();
var node = codec.encode(graph.getModel());
node.setAttribute("style", "default-style2");
var modelString = mxUtils.getXml(node);
var output = "<diagram name=\"Page " + pageIndex + "\">";
output += Graph.prototype.compress(modelString);
output += "</diagram>";
return output;
}
//These are the same as mxVsdxUtils functions, but added here to be self-dependent
/**
* Returns a collection of direct child Elements that match the specified tag name
* @param {*} parent the parent whose direct children will be processed
* @param {string} name the child tag name to match
* @return {*[]} a collection of matching Elements
*/
mxGraphMlCodec.prototype.getDirectChildNamedElements = function (parent, name) {
var result = ([]);
for (var child = parent.firstChild; child != null; child = child.nextSibling) {
if ((child != null && (child.nodeType == 1)) && (name == child.nodeName)) {
/* add */ (result.push(child) > 0);
}
}
;
return result;
};
/**
* Returns a collection of direct child Elements
* @param {*} parent the parent whose direct children will be processed
* @return {*[]} a collection of all child Elements
*/
mxGraphMlCodec.prototype.getDirectChildElements = function (parent) {
var result = ([]);
for (var child = parent.firstChild; child != null; child = child.nextSibling) {
if (child != null && (child.nodeType == 1)) {
/* add */ (result.push(child) > 0);
}
}
;
return result;
};
/**
* Returns the first direct child Element
* @param {*} parent the parent whose direct first child will be processed
* @return {*} the first child Element
*/
mxGraphMlCodec.prototype.getDirectFirstChildElement = function (parent) {
for (var child = parent.firstChild; child != null; child = child.nextSibling) {
if (child != null && (child.nodeType == 1)) {
return child;
}
}
;
return null;
};
var mxGraphMlConstants =
{
ID: "id",
KEY_FOR: "for",
KEY_NAME: "attr.name",
KEY_TYPE: "attr.type",
GRAPH: "graph",
GRAPHML: "graphml",
NODE: "node",
EDGE: "edge",
HYPEREDGE: "hyperedge",
PORT: "port",
ENDPOINT: "endpoint",
KEY: "key",
DATA: "data",
ALL: "all",
EDGE_SOURCE: "source",
EDGE_SOURCE_PORT: "sourceport",
EDGE_TARGET: "target",
EDGE_TARGET_PORT: "targetport",
EDGE_DIRECTED: "directed",
EDGE_UNDIRECTED: "undirected",
EDGE_DEFAULT: "edgedefault",
PORT_NAME: "name",
HEIGHT: "Height",
WIDTH: "Width",
X: "X",
Y: "Y",
JGRAPH: "jGraph:",
GEOMETRY: "Geometry",
FILL: "Fill",
SHAPENODE: "ShapeNode",
SHAPEEDGE: "ShapeEdge",
JGRAPH_URL: "http://www.jgraph.com/",
KEY_NODE_ID: "d0",
KEY_NODE_NAME: "nodeData",
KEY_EDGE_ID: "d1",
KEY_EDGE_NAME: "edgeData",
STYLE: "Style",
SHAPE: "Shape",
TYPE: "type",
LABEL: "label",
TEXT: "text",
PROPERTIES: "properties",
SOURCETARGET: "SourceTarget",
RECT: "y:RectD",
NODE_LABELS: "NodeLabels",
NODE_GEOMETRY: "NodeGeometry",
USER_TAGS: "UserTags",
NODE_STYLE: "NodeStyle",
NODE_VIEW_STATE: "NodeViewState",
EDGE_LABELS: "EdgeLabels",
EDGE_GEOMETRY: "EdgeGeometry",
EDGE_STYLE: "EdgeStyle",
EDGE_VIEW_STATE: "EdgeViewState",
PORT_LOCATION_PARAMETER: "PortLocationParameter",
PORT_STYLE: "PortStyle",
PORT_VIEW_STATE: "PortViewState",
SHARED_DATA: "SharedData",
Y_SHARED_DATA: "y:SharedData",
X_KEY: "x:Key",
GRAPHML_REFERENCE: "y:GraphMLReference"
}

File diff suppressed because one or more lines are too long

View file

@ -97,6 +97,17 @@ Editor.pageCounter = 0;
*/
Editor.useLocalStorage = typeof(Storage) != 'undefined' && mxClient.IS_IOS;
/**
*
*/
Editor.createSvgImage = function(w, h, data)
{
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="' + w + 'px" height="' + h + 'px" ' +
'version="1.1">' + data + '</svg>'))), w, h)
};
/**
* Images below are for lightbox and embedding toolbars.
*/

View file

@ -2220,6 +2220,12 @@ TextFormatPanel.prototype.addFont = function(container)
var arrow = cssMenu.getElementsByTagName('div')[0];
arrow.style.cssFloat = 'right';
container.appendChild(cssPanel);
// Workaround for offset in FF
if (mxClient.IS_FF)
{
cssMenu.getElementsByTagName('div')[0].style.marginTop = '-18px';
}
}
container.appendChild(stylePanel);

File diff suppressed because one or more lines are too long

97
war/js/reader.min.js vendored

File diff suppressed because one or more lines are too long

1011
war/js/viewer.min.js vendored

File diff suppressed because one or more lines are too long