Skip to content

Commit

Permalink
21.7.5 release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgraph committed Sep 13, 2023
1 parent 8cd0c72 commit 45f88bc
Show file tree
Hide file tree
Showing 73 changed files with 2,104 additions and 2,065 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
12-SEP-2023: 21.7.5

- Adds CSS styles for Latex SVG export [drawio-3839]
- Removes invalid flow plugin UI entry [drawio-3840]
- Fixes child edge bounding box offset [drawio-3844]
- Fixes saving changes in Notion plugin [drawio-3846]
- Shows shapes panel only after loading custom libs
- [conf cloud] Improved error message for 413 HTTP error (file too large) [DID-9113]
- Fixes contentLength header for UTF16 [drawio-3847]

08-SEP-2023: 21.7.4

- AWS shapes update to Q2 2023 [drawio-3677]
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
21.7.4
21.7.5
1,031 changes: 515 additions & 516 deletions src/main/webapp/js/app.min.js

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions src/main/webapp/js/diagramly/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,6 @@ App.publicPlugin = [
// 'import',
'replay',
'anon',
'flow',
'webcola',
// 'rnd', 'page', 'gd',
'tags'
Expand Down Expand Up @@ -4147,6 +4146,7 @@ App.prototype.pickLibrary = function(mode)
try
{
this.loadLibrary(optionalFile);
this.showSidebar();
}
catch (e)
{
Expand All @@ -4164,6 +4164,7 @@ App.prototype.pickLibrary = function(mode)
try
{
this.loadLibrary(file);
this.showSidebar();
}
catch (e)
{
Expand Down Expand Up @@ -4199,7 +4200,9 @@ App.prototype.pickLibrary = function(mode)
{
try
{
this.loadLibrary(new LocalLibrary(this, e.target.result, file.name));
this.loadLibrary(new LocalLibrary(this,
e.target.result, file.name));
this.showSidebar();
}
catch (e)
{
Expand Down Expand Up @@ -4258,8 +4261,10 @@ App.prototype.pickLibrary = function(mode)
{
try
{
this.loadLibrary((mode == App.MODE_BROWSER) ? new StorageLibrary(this, xml, filename) :
this.loadLibrary((mode == App.MODE_BROWSER) ?
new StorageLibrary(this, xml, filename) :
new LocalLibrary(this, xml, filename));
this.showSidebar();
}
catch (e)
{
Expand Down
8 changes: 8 additions & 0 deletions src/main/webapp/js/diagramly/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -6672,6 +6672,14 @@
document.body.appendChild(result);
Editor.MathJaxRender(result);
result.parentNode.removeChild(result);

// Copies MathJax CSS to output
var style = result.ownerDocument.getElementById('MJX-SVG-styles');

if (style != null)
{
result.getElementsByTagName('defs')[0].appendChild(style.cloneNode(true));
}
}

if (bgImg != null)
Expand Down
37 changes: 24 additions & 13 deletions src/main/webapp/js/diagramly/EditorUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
{
if (EditorUi.enableLogging && urlParams['dev'] != '1' &&
message != EditorUi.lastErrorMessage && message.indexOf('extension:') < 0 &&
message.indexOf('ResizeObserver loop completed with undelivered notifications') < 0 &&
err.stack.indexOf('extension:') < 0 && err.stack.indexOf('<anonymous>:') < 0)
{
EditorUi.lastErrorMessage = message;
Expand Down Expand Up @@ -3428,6 +3429,24 @@
return '';
};

/**
* Translates this point by the given vector.
*
* @param {number} dx X-coordinate of the translation.
* @param {number} dy Y-coordinate of the translation.
*/
EditorUi.prototype.showSidebar = function()
{
if (this.sidebarWindow != null)
{
this.sidebarWindow.window.setVisible(true);
}
else
{
this.toggleShapesPanel(true);
}
};

/**
* Translates this point by the given vector.
*
Expand Down Expand Up @@ -9382,6 +9401,7 @@
if (xml != null && xml.substring(0, 10) == '<mxlibrary')
{
this.loadLibrary(new LocalLibrary(this, xml, filename));
this.showSidebar();
}
else
{
Expand Down Expand Up @@ -9558,6 +9578,7 @@
{
this.spinner.stop();
this.loadLibrary(new LocalLibrary(this, data, filename));
this.showSidebar();

return null;
}
Expand Down Expand Up @@ -10482,19 +10503,6 @@
}
}
}));

// Shows sidebar when libraries are loaded
this.editor.addListener('libraryLoaded', mxUtils.bind(this, function()
{
if (this.sidebarWindow != null)
{
this.sidebarWindow.window.setVisible(true);
}
else
{
this.toggleShapesPanel(true);
}
}));

// Restores background page reference in output data or
// replaces dark mode page image with normal mode image
Expand Down Expand Up @@ -15478,6 +15486,7 @@
try
{
this.loadLibrary(new LocalLibrary(this, xml, name));
this.showSidebar();
}
catch (e)
{
Expand Down Expand Up @@ -15567,6 +15576,7 @@
try
{
this.loadLibrary(new LocalLibrary(this, data, file.name));
this.showSidebar();
}
catch (e)
{
Expand Down Expand Up @@ -18770,6 +18780,7 @@
try
{
this.loadLibrary(new RemoteLibrary(this, libContent, lib));
this.showSidebar();
}
catch (e)
{
Expand Down
3 changes: 3 additions & 0 deletions src/main/webapp/js/diagramly/ElectronApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,7 @@ mxStencilRegistry.allowEval = false;
{
var library = new DesktopLibrary(this, data, fileEntry);
this.loadLibrary(library);
this.showSidebar();
}
catch (e)
{
Expand Down Expand Up @@ -1164,6 +1165,7 @@ mxStencilRegistry.allowEval = false;
try
{
this.loadLibrary(new LocalLibrary(this, xml, name));
this.showSidebar();
}
catch (e)
{
Expand Down Expand Up @@ -2128,6 +2130,7 @@ mxStencilRegistry.allowEval = false;
{
var library = new DesktopLibrary(this, data, fileEntry);
this.loadLibrary(library);
this.showSidebar();
success(library);
}), error, libPath);
};
Expand Down
4 changes: 3 additions & 1 deletion src/main/webapp/js/diagramly/Menus.js
Original file line number Diff line number Diff line change
Expand Up @@ -4291,7 +4291,9 @@

try
{
editorUi.loadLibrary(new UrlLibrary(this, req.getText(), fileUrl));
editorUi.loadLibrary(new UrlLibrary(
this, req.getText(), fileUrl));
editorUi.showSidebar();
}
catch (e)
{
Expand Down
16 changes: 9 additions & 7 deletions src/main/webapp/js/grapheditor/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -516,13 +516,15 @@ Sidebar.prototype.createTooltip = function(elt, cells, w, h, title, showLabel, o
this.graph2.shapeBackgroundColor = style.backgroundColor;

// Applies current style for preview
var temp = this.graph2.cloneCells(cells);
this.editorUi.insertHandler(temp, null, this.graph2.model,
(!applyAllStyles) ? this.editorUi.editor.graph.defaultVertexStyle : null,
(!applyAllStyles) ? this.editorUi.editor.graph.defaultEdgeStyle : null,
applyAllStyles, true);

this.graph2.addCells(temp);
if (cells != null)
{
var temp = this.graph2.cloneCells(cells);
this.editorUi.insertHandler(temp, null, this.graph2.model,
(!applyAllStyles) ? this.editorUi.editor.graph.defaultVertexStyle : null,
(!applyAllStyles) ? this.editorUi.editor.graph.defaultEdgeStyle : null,
applyAllStyles, true);
this.graph2.addCells(temp);
}

mxClient.NO_FO = fo;
var bounds = this.graph2.getGraphBounds();
Expand Down
Loading

0 comments on commit 45f88bc

Please sign in to comment.