Skip to content

Commit

Permalink
12.4.3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgraph committed Dec 17, 2019
1 parent e707d6a commit f9d1e61
Show file tree
Hide file tree
Showing 80 changed files with 29,033 additions and 2,159 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
17-DEC-2019: 12.4.3

- Uses fast zoom preview on iOS
- Uses mxGraph 4.0.6 beta 12

14-DEC-2019: 12.4.2

- Improves move/resize preview and guides
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.4.2
12.4.3
1 change: 1 addition & 0 deletions etc/build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
<file name="Sidebar-Bootstrap.js" />
<file name="Sidebar-BPMN.js" />
<file name="Sidebar-Cabinet.js" />
<file name="Sidebar-Cisco19.js" />
<file name="Sidebar-CiscoSafe.js" />
<file name="Sidebar-Citrix.js" />
<file name="Sidebar-Cumulus.js" />
Expand Down
38 changes: 19 additions & 19 deletions etc/mxgraph/mxClient.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/webapp/cache.manifest
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CACHE MANIFEST

# THIS FILE WAS GENERATED. DO NOT MODIFY!
# 12/14/2019 11:28 AM
# 12/17/2019 10:00 PM

app.html
index.html?offline=1
Expand Down
Binary file added src/main/webapp/images/sidebar-cisco19.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/main/webapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@

if (mxIsElectron5)
{
addMeta(null, 'default-src \'self\' \'unsafe-inline\'; connect-src \'self\' https://*.draw.io; img-src * data:; media-src *; font-src *; style-src-elem \'self\' \'unsafe-inline\' https://fonts.googleapis.com', 'Content-Security-Policy');
addMeta(null, 'default-src \'self\' \'unsafe-inline\'; connect-src \'self\' https://*.draw.io https://fonts.googleapis.com https://fonts.gstatic.com; img-src * data:; media-src *; font-src *; style-src-elem \'self\' \'unsafe-inline\' https://fonts.googleapis.com', 'Content-Security-Policy');
}
})();
</script>
Expand Down
1,280 changes: 690 additions & 590 deletions src/main/webapp/js/app.min.js

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions src/main/webapp/js/diagramly/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -1483,7 +1483,7 @@ App.prototype.init = function()
{
mxUtils.setPrefixedStyle(footer.style, 'transform', 'translate(-50%,110%)');
this.footerShowing = false;
}), 15000);
}), 60000);
}
// else if ((!isLocalStorage || mxSettings.settings == null ||
// mxSettings.settings.closeRateFooter == null) &&
Expand Down Expand Up @@ -2754,7 +2754,11 @@ App.prototype.showAlert = function(message)
*/
App.prototype.start = function()
{
this.bg.parentNode.removeChild(this.bg);
if (this.bg != null && this.bg.parentNode != null)
{
this.bg.parentNode.removeChild(this.bg);
}

this.restoreLibraries();
this.spinner.stop();

Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/js/diagramly/Devel.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-Basic.js');
mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-Bootstrap.js');
mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-BPMN.js');
mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-Cabinet.js');
mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-Cisco19.js');
mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-CiscoSafe.js');
mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-Citrix.js');
mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-Cumulus.js');
Expand Down
9 changes: 8 additions & 1 deletion src/main/webapp/js/diagramly/Dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -2721,8 +2721,14 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
while (i0 < templates.length && (first || mxUtils.mod(i0, 30) != 0))
{
var tmp = templates[i0++];
addButton(tmp.url, tmp.libs, tmp.title, tmp.tooltip? tmp.tooltip : tmp.title,
var btn = addButton(tmp.url, tmp.libs, tmp.title, tmp.tooltip? tmp.tooltip : tmp.title,
tmp.select, tmp.imgUrl, tmp.info, tmp.onClick, tmp.preview, tmp.noImg, tmp.clibs);

if (first)
{
btn.click();
}

first = false;
}
}
Expand Down Expand Up @@ -3117,6 +3123,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly, canc
}

div.appendChild(elt);
return elt;
};

var categories = {}, customCats = {};
Expand Down
10 changes: 5 additions & 5 deletions src/main/webapp/js/diagramly/DrawioFileSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ DrawioFileSync = function(file)
this.fileChangedNotify();
}

var len = (data != null) ? data.length : 'null';

EditorUi.logError('Protocol Error ' + e.message,
null, 'data_' + len + '_file_' + this.file.getHash() +
'_client_' + this.clientId);
// var len = (data != null) ? data.length : 'null';
//
// EditorUi.logError('Protocol Error ' + e.message,
// null, 'data_' + len + '_file_' + this.file.getHash() +
// '_client_' + this.clientId);

if (window.console != null)
{
Expand Down
48 changes: 25 additions & 23 deletions src/main/webapp/js/diagramly/DriveClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -1264,35 +1264,37 @@ DriveClient.prototype.saveFile = function(file, revision, success, errFn, noChec
// However, this would result in a missing thumbnail in most cases so a better solution might be to reduce
// the autosave interval in DriveRealtime, but that would increase the number of requests.
unloading = (unloading != null) ? unloading : false;
var prevDesc = null;
var pinned = false;
var meta =
{
'mimeType': file.desc.mimeType,
'title': file.getTitle()
};

// Overrides old mime type and creates a revision
if (this.isGoogleRealtimeMimeType(meta.mimeType))
{
meta.mimeType = this.xmlMimeType;
prevDesc = file.desc;
revision = true;
pinned = true;
}
// Overrides mime type for unknown file type uploads
else if (meta.mimeType == 'application/octet-stream' ||
(urlParams['override-mime'] == '1' &&
meta.mimeType != this.xmlMimeType))
{
meta.mimeType = this.xmlMimeType;
}

// Adds optional thumbnail to upload request
var doSave = mxUtils.bind(this, function(thumb, thumbMime, keepExisting)
{
try
{
file.saveLevel = 3;
var prevDesc = null;
var pinned = false;
var meta =
{
'mimeType': file.desc.mimeType,
'title': file.getTitle()
};

// Overrides old mime type and creates a revision
if (this.isGoogleRealtimeMimeType(file.desc.mimeType))
{
meta.mimeType = this.xmlMimeType;
prevDesc = file.desc;
revision = true;
pinned = true;
}
// Overrides mime type for unknown file type uploads
else if (meta.mimeType == 'application/octet-stream')
{
meta.mimeType = this.xmlMimeType;
}


if (file.constructor == DriveFile)
{
if (properties == null)
Expand Down Expand Up @@ -1757,7 +1759,7 @@ DriveClient.prototype.saveFile = function(file, revision, success, errFn, noChec

// NOTE: getThumbnail is asynchronous and returns false if no thumbnails can be created
if (unloading || saveAsPng || file.constructor == DriveLibrary || !this.enableThumbnails || urlParams['thumb'] == '0' ||
(file.desc.mimeType != null && file.desc.mimeType.substring(0, 29) != 'application/vnd.jgraph.mxfile') ||
(meta.mimeType != null && meta.mimeType.substring(0, 29) != 'application/vnd.jgraph.mxfile') ||
!this.ui.getThumbnail(this.thumbnailWidth, mxUtils.bind(this, function(canvas)
{
// Callback for getThumbnail
Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/js/diagramly/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -3169,7 +3169,7 @@

if (prop.allowAuto)
{
if (inputVal.trim().toLowerCase() == 'auto')
if (inputVal.trim != null && inputVal.trim().toLowerCase() == 'auto')
{
inputVal = 'auto';
pType = 'string';
Expand Down Expand Up @@ -4775,6 +4775,7 @@
mxStencilRegistry.libraries['arrows2'] = [SHAPES_PATH + '/mxArrows.js'];
mxStencilRegistry.libraries['atlassian'] = [STENCIL_PATH + '/atlassian.xml', SHAPES_PATH + '/mxAtlassian.js'];
mxStencilRegistry.libraries['bpmn'] = [SHAPES_PATH + '/bpmn/mxBpmnShape2.js', STENCIL_PATH + '/bpmn.xml'];
mxStencilRegistry.libraries['cisco19'] = [SHAPES_PATH + '/mxCisco19.js', STENCIL_PATH + '/cisco19.xml'];
mxStencilRegistry.libraries['dfd'] = [SHAPES_PATH + '/mxDFD.js'];
mxStencilRegistry.libraries['er'] = [SHAPES_PATH + '/er/mxER.js'];
mxStencilRegistry.libraries['kubernetes'] = [SHAPES_PATH + '/mxKubernetes.js', STENCIL_PATH + '/kubernetes.xml'];
Expand Down
44 changes: 34 additions & 10 deletions src/main/webapp/js/diagramly/EditorUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -6477,32 +6477,56 @@
if (grid)
{
var view = graph.view;
var curViewScale = view.scale;
view.scale = 1; //Reset the scale temporary to generate unscaled grid image which is then scaled
var gridImage = btoa(unescape(encodeURIComponent(view.createSvgGrid(view.gridColor))));
view.scale = curViewScale;
gridImage = 'data:image/svg+xml;base64,' + gridImage;
var phase = graph.gridSize * view.gridSteps * scale;

var b = graph.getGraphBounds();
var x0 = b.x * scale;
var y0 = b.y * scale;
var tx = view.translate.x * curViewScale;
var ty = view.translate.y * curViewScale;
var x0 = tx + (b.x - tx) / curViewScale;
var y0 = ty + (b.y - ty) / curViewScale;

var background = new Image();
background.src = gridImage;

background.onload = function()
{
var x = -Math.round(phase - mxUtils.mod(view.translate.x * scale - x0, phase));
var y = -Math.round(phase - mxUtils.mod(view.translate.y * scale - y0, phase));

for (var i = x; i < w; i += phase)
try
{
for (var j = y; j < h; j += phase)
var x = -Math.round(phase - mxUtils.mod((tx - x0) * scale, phase));
var y = -Math.round(phase - mxUtils.mod((ty - y0) * scale, phase));

for (var i = x; i < w; i += phase)
{
ctx.drawImage(background, i / scale, j / scale);
for (var j = y; j < h; j += phase)
{
ctx.drawImage(background, i / scale, j / scale);
}
}

drawImage();
}
catch (e)
{
if (error != null)
{
error(e);
}
}
};

drawImage();
background.onerror = function(e)
{
if (error != null)
{
error(e);
}
};

background.src = gridImage;
}
else
{
Expand Down
11 changes: 6 additions & 5 deletions src/main/webapp/js/diagramly/GraphViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,12 @@ GraphViewer.prototype.addClickHandler = function(graph, ui)

if (ui != null)
{
if (href != null && !(graph.isExternalProtocol(href) || graph.isBlankLink(href) || graph.customLinkClicked(href)))
if (href == null || graph.isCustomLink(href))
{
mxEvent.consume(evt);
}
else if (!graph.isExternalProtocol(href) &&
!graph.isBlankLink(href))
{
// Hides lightbox if any links are clicked
// Async handling needed for anchors to work
Expand All @@ -1303,10 +1308,6 @@ GraphViewer.prototype.addClickHandler = function(graph, ui)
ui.destroy();
}, 0);
}
else
{
mxEvent.consume(evt);
}
}
else if (href != null && ui == null && graph.isCustomLink(href) &&
(mxEvent.isTouchEvent(evt) || !mxEvent.isPopupTrigger(evt)) &&
Expand Down
Loading

0 comments on commit f9d1e61

Please sign in to comment.