Skip to content

Commit

Permalink
22.1.22 release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgraph committed Jan 23, 2024
1 parent 3fc998b commit 6bea84f
Show file tree
Hide file tree
Showing 78 changed files with 6,636 additions and 6,027 deletions.
35 changes: 22 additions & 13 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
17-JAN-2024: 21.1.21
23-JAN-2024: 22.1.22

- Adds experimental freehand settings [drawio-3093]
- Ports Embed2 servlet to CF worker
- Consistent handling for closing splash [drawio-4089]
- [conf cloud] Storing services log to configuration space [drawio-3991]
- [conf cloud] Improved viewer settings dialog
- Improved compatibility for SVG export [drawio-4119]

17-JAN-2024: 22.1.21

- Fixes immediate Dropbox file loading in dev mode
- Updates DOMPurify from 3.0.6 to 3.0.8
- Fixes dropbox naming clash in global scope, duplicate function

16-JAN-2024: 21.1.20
16-JAN-2024: 22.1.20

- Internal release, see release notes

16-JAN-2024: 21.1.19
16-JAN-2024: 22.1.19

- Scrolls page tab to visible after moving page
- Fixes possible timeout when entering commit message
- Removes line jumps at branching points [drawio-3965]
- Fixes ignored text direction style [drawio-4104]

09-JAN-2024: 21.1.18
09-JAN-2024: 22.1.18

- Fixes overridden configurations [drawio-desktop-1564]
- Removes multiple javascript protocol prefixes
Expand All @@ -25,7 +34,7 @@
- Experimental support for vertical writing mode [drawio-4068]
- Fixes relative links in SVG export

04-JAN-2024: 21.1.17
04-JAN-2024: 22.1.17

- Adds copyAsText in Edit drop down [drawio-3949]
- Replaces clearWaypoints button with drop down
Expand All @@ -37,44 +46,44 @@
- Fixes scrollbar positions after enter-/exitGroup
- Fixes move of selected edges in groups

29-DEC-2023: 21.1.16
29-DEC-2023: 22.1.16

- Adds simple theme to atlas.min.js

27-DEC-2023: 21.1.15
27-DEC-2023: 22.1.15

- Fixes NPE of undefined function emfDone [drawio-4072]
- Prints current version number in clear.html
- Fixes dark mode not persisted in some cases [drawio-desktop-1540]

27-DEC-2023: 21.1.14
27-DEC-2023: 22.1.14

- Fixes this.isVisioFilename undefined in Editor.js
- Fixes mxSettings is undefined [DID-10370]
- Fixes NPE for minified freehand code in production build

27-DEC-2023: 21.1.13
27-DEC-2023: 22.1.13

- Fixes "Add tag" dialog title clipped [drawio-desktop-1537]
- Increases maximumFileSizeToCacheInBytes to 10MB [DID-10317]

26-DEC-2023: 21.1.12
26-DEC-2023: 22.1.12

- Handles possible empty content in GitHub [drawio-4045]
- Fixes use of modified default style for sidebar items
- Fixes use of defaults for curved edge styles
- Adds new Kubernetes shapes [drawio-3699]
- [conf cloud] Adds enableCssDarkMode config to viewers also [DID-10038]

15-DEC-2023: 21.1.11
15-DEC-2023: 22.1.11

- Fixes default edge style overrides edges in sidebar [drawio-4038]

15-DEC-2023: 21.1.10
15-DEC-2023: 22.1.10

- Release stopped due to NPE in testing

14-DEC-2023: 21.1.9
14-DEC-2023: 22.1.9

- Scrolls to loaded libraries, fixes library export to browser
- Fixes library moved to end after edit
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.1.21
22.1.22
30 changes: 30 additions & 0 deletions src/main/mxgraph/util/mxUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3279,6 +3279,36 @@ var mxUtils =
}
},

/**
* Function: createElementNs
*
* Helper function for creating an element in a namespace.
*
* Parameters:
*
* doc - Owner document of the new element.
* ns - Namespace for the element.
* tagName - Qualified name of the element.
*/
createElementNs: function(doc, ns, tagName)
{
if (doc.createElementNS != null)
{
return doc.createElementNS(ns, tagName);
}
else
{
var elt = doc.createElement(tagName);

if (namespace != null)
{
elt.setAttribute('xmlns', ns);
}

return elt;
}
},

/**
* Function: createImage
*
Expand Down
2,615 changes: 1,314 additions & 1,301 deletions src/main/webapp/js/app.min.js

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion src/main/webapp/js/clear.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,17 @@ try
writeln('OK');
}

var link = document.createElement('a');
link.style.marginRight = '6px';
link.setAttribute('href', 'javascript:window.location.reload();');
link.appendChild(document.createTextNode('Reload'));
document.body.appendChild(link);

if ((/test\.draw\.io$/.test(window.location.hostname)) ||
(/stage\.diagrams\.net$/.test(window.location.hostname)) ||
(/app\.diagrams\.net$/.test(window.location.hostname)))
{
var link = document.createElement('a');
link = link.cloneNode(false);
link.setAttribute('href', './');
link.appendChild(document.createTextNode('Start App'));
document.body.appendChild(link);
Expand Down
119 changes: 71 additions & 48 deletions src/main/webapp/js/diagramly/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3723,10 +3723,10 @@ App.prototype.showSplash = function(force)

this.showDialog(dlg.container, 340, (mxClient.IS_CHROMEAPP ||
EditorUi.isElectronApp) ? 200 : 230, true, true,
mxUtils.bind(this, function(cancel)
mxUtils.bind(this, function(cancel, isEsc)
{
// Creates a blank diagram if the dialog is closed
if (cancel && !mxClient.IS_CHROMEAPP)
if ((cancel || isEsc) && !mxClient.IS_CHROMEAPP)
{
var prev = Editor.useLocalStorage;
this.createFile(this.defaultFilename + (EditorUi.isElectronApp? '.drawio' : ''),
Expand Down Expand Up @@ -6388,68 +6388,91 @@ App.prototype.showNotification = function(notifs, lsReadFlag)
App.prototype.save = function(name, done)
{
var file = this.getCurrentFile();

if (file != null && this.spinner.spin(document.body, mxResources.get('saving')))
var acceptResponse = true;

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

this.createTimeout(3 * this.timeout, mxUtils.bind(this, function(timeout)
{
this.editor.setStatus('');

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

var success = mxUtils.bind(this, function()
}
});

var error = mxUtils.bind(this, function(err)
{
if (acceptResponse)
{
acceptResponse = false;

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

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

var error = mxUtils.bind(this, function(err)
// Resets acceptResponse state for retry or
// invokes success if no longer modified
if (err != null && err.retry != null)
{
if (timeout.clear())
var retry = err.retry;

err.retry = function()
{
if (file.isModified())
acceptResponse = true;

try
{
Editor.addRetryToError(err, mxUtils.bind(this, function()
if (file.isModified())
{
this.save(name, done);
}));
retry();
}
else
{
success();
}
}

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

try
catch (e)
{
error(e);
}
};
}

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

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

if (this.editor.graph.isEditing())
{
if (name == file.getTitle())
{
file.save(true, success, error);
}
else
{
file.saveAs(name, success, error)
}
this.editor.graph.stopEditing();
}

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

Expand Down
41 changes: 41 additions & 0 deletions src/main/webapp/js/diagramly/Dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -8679,6 +8679,47 @@ var FreehandWindow = function(editorUi, x, y, w, h, withBrush)
btn.innerText = '';
btn.appendChild(tempDiv);
div.appendChild(btn);

var settings = document.createElement('img');
settings.setAttribute('title', mxResources.get('settings'));
settings.setAttribute('src', Editor.gearImage);
settings.className = 'geToolbarButton geAdaptiveAsset';
settings.style.position = 'absolute';
settings.style.boxSizing = 'border-box';
settings.style.padding = '2px';
settings.style.top = '8px';
settings.style.right = '38px';
settings.style.width = '18px';
settings.style.height = '18px';
settings.style.opacity = '0.6';
div.appendChild(settings);

mxEvent.addListener(settings, 'click', mxUtils.bind(this, function(evt)
{
var options = graph.freehand.getOptions();

var dlg = new TextareaDialog(editorUi, mxResources.get('settings'), (options != null) ?
JSON.stringify(options, null, 2) : '',
mxUtils.bind(this, function(newValue)
{
if (newValue != null && newValue.length > 0)
{
try
{
graph.freehand.setOptions(JSON.parse(newValue));
editorUi.hideDialog();
}
catch (e)
{
editorUi.handleError(e);
}
}
}), null, mxResources.get('close'));

editorUi.showDialog(dlg.container, 660, 480, true, false);
dlg.init();
}));

mxUtils.br(div);

var brushSize = document.createElement('input');
Expand Down
Loading

0 comments on commit 6bea84f

Please sign in to comment.