Skip to content

Commit

Permalink
21.3.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgraph committed May 15, 2023
1 parent d27dfa2 commit 78e881c
Show file tree
Hide file tree
Showing 21 changed files with 7,393 additions and 6,697 deletions.
13 changes: 12 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
15-MAY-2023: 21.3.1

- Removes animation for lightbox in all viewers
- Shows error for possible NPE in print preview
- Fixes restoring scrollbars after page selection
- Fixes view after undo, restore and for blank pages
- Escapes HTML in embed dialog preview title and body
- Handles possible missing child in row [drawio-3592]
- Fixes removed text between < and > with pasteHere
- Fixes blank PDF export [drawio-3596]
- Adds shortcut for in-/decrease font [drawio-3585]

12-MAY-2023: 21.3.0

- Updates DOMPurify from 3.0.2 to 3.0.3
Expand All @@ -10,7 +22,6 @@
- [desktop]] Potential fix for spawn errors [drawio-desktop-1122]
- Resets scrollbar state after inserting new pages
- Fixes reset of scrollbars after deleting last page
-

04-MAY-2023: 21.2.9

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
21.3.0
21.3.1
3,714 changes: 1,867 additions & 1,847 deletions src/main/webapp/js/app.min.js

Large diffs are not rendered by default.

82 changes: 48 additions & 34 deletions src/main/webapp/js/diagramly/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6370,51 +6370,65 @@ App.prototype.save = function(name, done)

if (file != null && this.spinner.spin(document.body, mxResources.get('saving')))
{
this.editor.setStatus('');

if (this.editor.graph.isEditing())
{
this.editor.graph.stopEditing();
}

var success = mxUtils.bind(this, function()
var onerror = mxUtils.bind(this, function(e)
{
file.handleFileSuccess(true);
this.handleError(e);
});

if (done != null)
this.createTimeout(3 * this.timeout, mxUtils.bind(this, function(timeout)
{
this.editor.setStatus('');

if (this.editor.graph.isEditing())
{
done();
this.editor.graph.stopEditing();
}
});

var error = mxUtils.bind(this, function(err)
{
if (file.isModified())

var success = mxUtils.bind(this, function()
{
Editor.addRetryToError(err, mxUtils.bind(this, function()
if (timeout.clear())
{
this.save(name, done);
}));
}
file.handleFileSuccess(true);

if (done != null)
{
done();
}
}
});

file.handleFileError(err, err == null || err.name != 'AbortError');
});

try
{
if (name == file.getTitle())
var error = mxUtils.bind(this, function(err)
{
file.save(true, success, error);
if (timeout.clear())
{
if (file.isModified())
{
Editor.addRetryToError(err, mxUtils.bind(this, function()
{
this.save(name, done);
}));
}

file.handleFileError(err, err == null || err.name != 'AbortError');
}
});

try
{
if (name == file.getTitle())
{
file.save(true, success, error);
}
else
{
file.saveAs(name, success, error)
}
}
else
catch (err)
{
file.saveAs(name, success, error)
error(err);
}
}
catch (err)
{
error(err);
}
}), onerror);
}
};

Expand Down
40 changes: 37 additions & 3 deletions src/main/webapp/js/diagramly/Dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -778,9 +778,10 @@ var EmbedDialog = function(editorUi, result, timeout, ignoreSize, previewFn, tit

if (doc != null)
{
doc.writeln('<html><head><title>' + encodeURIComponent(mxResources.get('preview')) +
'</title><meta charset="utf-8"></head>' +
'<body>' + result + '</body></html>');
doc.writeln('<html><head><title>' +
mxUtils.htmlEntities(mxResources.get('preview')) +
'</title><meta charset="utf-8"></head><body>' +
mxUtils.htmlEntities(result) + '</body></html>');
doc.close();
}
else
Expand Down Expand Up @@ -6531,6 +6532,14 @@ var RevisionDialog = function(editorUi, revs, restoreFn)

newBtn.className = 'geBtn';
newBtn.setAttribute('disabled', 'disabled');

var createBtn = mxUtils.button(mxResources.get('createRevision'), function()
{
editorUi.actions.get('save').funct(false);
});

createBtn.className = 'geBtn';
createBtn.setAttribute('disabled', 'disabled');

if (restoreFn != null)
{
Expand Down Expand Up @@ -6752,6 +6761,7 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
}

newBtn.removeAttribute('disabled');
createBtn.removeAttribute('disabled');
}

mxUtils.setOpacity(zoomInBtn, 60);
Expand Down Expand Up @@ -6913,6 +6923,12 @@ var RevisionDialog = function(editorUi, revs, restoreFn)
}

buttons.appendChild(newBtn);

if (file != null && file.constructor == DriveFile)
{
buttons.appendChild(createBtn);
}

buttons.appendChild(restoreBtn);

if (!editorUi.editor.cancelFirst)
Expand Down Expand Up @@ -13075,6 +13091,24 @@ var FilePropertiesDialog = function(editorUi)
tbody.appendChild(row);
}

if (file != null && editorUi.getServiceName() == 'draw.io' &&
file.getSize() > 0 && urlParams['embed'] != '1')
{
row = document.createElement('tr');
td = document.createElement('td');
td.style.whiteSpace = 'nowrap';
td.style.fontSize = '10pt';
td.style.width = '120px';
mxUtils.write(td, mxResources.get('size') + ':');
row.appendChild(td);

td = document.createElement('td');
td.style.whiteSpace = 'nowrap';
mxUtils.write(td, editorUi.formatFileSize(file.getSize()));
row.appendChild(td);
tbody.appendChild(row);
}

this.init = (this.init != null) ? this.init : function() { };

var genericBtn = mxUtils.button(mxResources.get('apply'), apply);
Expand Down
Loading

0 comments on commit 78e881c

Please sign in to comment.