Skip to content

Commit b2a9aa1

Browse files
committed
29.5.2 release
1 parent e1b1ef6 commit b2a9aa1

File tree

154 files changed

+6435
-5045
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+6435
-5045
lines changed

ChangeLog

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
22-FEB-2026: 29.5.2
2+
3+
- Deletes unused code causing security warnings
4+
- Tidies changelog
5+
- Updates excludes
6+
- Fixes zoom while drawing freehand [jgraph/drawio#3959]
7+
- Updates MathJax from 4.1.0 to 4.1.1
8+
- Fixes panning in active freehand mode [jgraph/drawio#4080]
9+
- Adds animated gif export [jgraph/drawio#3739]
10+
- Moves animated gif functions to correct location
11+
- Fixes error for saving scratchpad [jgraph/drawio-desktop#2341]
12+
- Adds flow direction and fixes background for animated gif export
13+
- Limits show link icons to main graph
14+
- Fixes resources merge issue
15+
- Reviewed and updated translations
16+
117
20-FEB-2026: 29.5.1
218

319
- Updates to emf importer

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
29.5.1
1+
29.5.2

etc/build/build.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ OUTPUT FILES (in src/main/webapp/js/):
162162
<file name="Dialogs.js" />
163163
</sources>
164164
</jscomp>
165-
165+
166166
<!-- Step 5: Compile all sidebar shape libraries -->
167167
<jscomp compilationLevel="simple" debug="false" forceRecompile="true" output="${basedir}/sidebar.min.js">
168168
<sources dir="${war.dir}/js/diagramly/sidebar">
@@ -497,6 +497,11 @@ OUTPUT FILES (in src/main/webapp/js/):
497497
<file name="mxJsCanvas.js" />
498498
</sources>
499499

500+
<sources dir="${war.dir}/js/diagramly/gif">
501+
<file name="GifEncoder.js" />
502+
<file name="AnimatedExport.js" />
503+
</sources>
504+
500505
<!-- Cloud storage integrations -->
501506
<sources dir="${war.dir}/js/diagramly">
502507
<file name="DrawioClient.js" />

etc/dependencies/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"dompurify": "3.3.1",
1919
"spin.js": "2.0.0",
2020
"roughjs": "4.6.6",
21-
"mathjax": "4.1.0"
21+
"mathjax": "4.1.1"
2222
}
2323
}
2424

etc/mathjax/mathjax-download.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
set -e # Exit on error
77

88
# Configuration
9-
MATHJAX_VERSION="4.1.0" # Change to specific version
9+
MATHJAX_VERSION="4.1.1" # Change to specific version
1010
CDN_BASE="https://cdn.jsdelivr.net/npm/mathjax@${MATHJAX_VERSION}"
1111
FONT_BASE="https://cdn.jsdelivr.net/npm/@mathjax"
1212
TARGET_DIR="$(pwd)/../../src/main/webapp/math4/es5"

src/main/webapp/js/app.min.js

Lines changed: 1487 additions & 1458 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/webapp/js/diagramly/Devel.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ mxscript(geBasePath +'/Actions.js');
117117
mxscript(geBasePath +'/Menus.js');
118118
mxscript(geBasePath +'/Toolbar.js');
119119
mxscript(geBasePath +'/Dialogs.js');
120-
121120
// Loads main classes
122121
mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar.js');
123122
mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-ActiveDirectory.js');
@@ -189,6 +188,9 @@ mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-WebIcons.js');
189188
mxscript(drawDevUrl + 'js/diagramly/util/mxJsCanvas.js');
190189
mxscript(drawDevUrl + 'js/diagramly/util/mxAsyncCanvas.js');
191190

191+
mxscript(drawDevUrl + 'js/diagramly/gif/GifEncoder.js');
192+
mxscript(drawDevUrl + 'js/diagramly/gif/AnimatedExport.js');
193+
192194
mxscript(drawDevUrl + 'js/diagramly/DrawioFile.js');
193195
mxscript(drawDevUrl + 'js/diagramly/LocalFile.js');
194196
mxscript(drawDevUrl + 'js/diagramly/LocalLibrary.js');

src/main/webapp/js/diagramly/EditorUi.js

Lines changed: 184 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5152,7 +5152,187 @@
51525152

51535153
this.saveData(filename, ext, data.substring(data.lastIndexOf(',') + 1), 'image/' + format, true);
51545154
};
5155-
5155+
5156+
/**
5157+
* Shows the animated GIF export dialog.
5158+
*/
5159+
EditorUi.prototype.showAnimatedGifExportDialog = function()
5160+
{
5161+
var div = document.createElement('div');
5162+
div.style.whiteSpace = 'nowrap';
5163+
5164+
var hd = document.createElement('h3');
5165+
mxUtils.write(hd, mxResources.get('formatAnimatedGif', null, 'Animated GIF'));
5166+
hd.style.cssText = 'width:100%;text-align:center;margin-top:0px;margin-bottom:10px';
5167+
div.appendChild(hd);
5168+
5169+
// Speed (FPS)
5170+
mxUtils.write(div, mxResources.get('speed', null, 'Speed') + ':');
5171+
var fpsSelect = document.createElement('select');
5172+
fpsSelect.style.marginLeft = '4px';
5173+
fpsSelect.style.width = '80px';
5174+
5175+
var fpsOptions = [
5176+
{label: mxResources.get('slow', null, 'Slow'), value: 8},
5177+
{label: mxResources.get('medium', null, 'Medium'), value: 15},
5178+
{label: mxResources.get('fast', null, 'Fast'), value: 24}
5179+
];
5180+
5181+
for (var i = 0; i < fpsOptions.length; i++)
5182+
{
5183+
var opt = document.createElement('option');
5184+
mxUtils.write(opt, fpsOptions[i].label);
5185+
opt.setAttribute('value', fpsOptions[i].value);
5186+
5187+
if (fpsOptions[i].value == 15)
5188+
{
5189+
opt.setAttribute('selected', 'selected');
5190+
}
5191+
5192+
fpsSelect.appendChild(opt);
5193+
}
5194+
5195+
div.appendChild(fpsSelect);
5196+
mxUtils.br(div);
5197+
5198+
// Zoom
5199+
var zoomContainer = document.createElement('div');
5200+
zoomContainer.style.marginTop = '10px';
5201+
mxUtils.write(zoomContainer, mxResources.get('zoom') + ':');
5202+
var zoomInput = document.createElement('input');
5203+
zoomInput.setAttribute('type', 'text');
5204+
zoomInput.style.width = '60px';
5205+
zoomInput.style.marginLeft = '4px';
5206+
zoomInput.value = '100%';
5207+
zoomContainer.appendChild(zoomInput);
5208+
div.appendChild(zoomContainer);
5209+
5210+
// Border
5211+
var borderContainer = document.createElement('div');
5212+
borderContainer.style.marginTop = '10px';
5213+
mxUtils.write(borderContainer, mxResources.get('borderWidth', null, 'Border Width') + ':');
5214+
var borderInput = document.createElement('input');
5215+
borderInput.setAttribute('type', 'text');
5216+
borderInput.style.width = '60px';
5217+
borderInput.style.marginLeft = '4px';
5218+
borderInput.value = '0';
5219+
borderContainer.appendChild(borderInput);
5220+
div.appendChild(borderContainer);
5221+
5222+
// Loop
5223+
var loopContainer = document.createElement('div');
5224+
loopContainer.style.marginTop = '10px';
5225+
mxUtils.write(loopContainer, mxResources.get('loops', null, 'Loops') + ':');
5226+
var loopSelect = document.createElement('select');
5227+
loopSelect.style.marginLeft = '4px';
5228+
loopSelect.style.width = '80px';
5229+
5230+
var loopOptions = [
5231+
{label: mxResources.get('forever', null, 'Forever'), value: 0},
5232+
{label: '1', value: 1},
5233+
{label: '3', value: 3},
5234+
{label: '5', value: 5}
5235+
];
5236+
5237+
for (var i = 0; i < loopOptions.length; i++)
5238+
{
5239+
var opt = document.createElement('option');
5240+
mxUtils.write(opt, loopOptions[i].label);
5241+
opt.setAttribute('value', loopOptions[i].value);
5242+
5243+
if (loopOptions[i].value == 0)
5244+
{
5245+
opt.setAttribute('selected', 'selected');
5246+
}
5247+
5248+
loopSelect.appendChild(opt);
5249+
}
5250+
5251+
loopContainer.appendChild(loopSelect);
5252+
div.appendChild(loopContainer);
5253+
5254+
// Transparent background
5255+
var transparent = this.addCheckbox(div, mxResources.get('transparentBackground',
5256+
null, 'Transparent Background'), false);
5257+
5258+
var dlg = new CustomDialog(this, div, mxUtils.bind(this, function()
5259+
{
5260+
var zoomVal = parseInt(zoomInput.value);
5261+
5262+
if (isNaN(zoomVal) || zoomVal <= 0)
5263+
{
5264+
zoomVal = 100;
5265+
}
5266+
5267+
this.exportAnimatedGif({
5268+
fps: parseInt(fpsSelect.value),
5269+
scale: zoomVal / 100,
5270+
border: parseInt(borderInput.value) || 0,
5271+
repeat: parseInt(loopSelect.value),
5272+
transparent: transparent.checked,
5273+
background: transparent.checked ? null :
5274+
((this.editor.graph.background != null &&
5275+
this.editor.graph.background != mxConstants.NONE) ?
5276+
this.editor.graph.background : '#ffffff')
5277+
});
5278+
}), null, mxResources.get('export'),
5279+
'https://www.drawio.com/doc/faq/export-diagram');
5280+
5281+
this.showDialog(dlg.container, 300, 260, true, true, null, null, null, null, true);
5282+
};
5283+
5284+
/**
5285+
* Exports the current diagram as an animated GIF.
5286+
*/
5287+
EditorUi.prototype.exportAnimatedGif = function(options)
5288+
{
5289+
if (this.spinner.spin(document.body, mxResources.get('exporting')))
5290+
{
5291+
try
5292+
{
5293+
var exp = new AnimatedGifExport(this);
5294+
5295+
exp.doExport(options, mxUtils.bind(this, function(blob)
5296+
{
5297+
this.spinner.stop();
5298+
5299+
if (blob != null)
5300+
{
5301+
var filename = this.getBaseFilename() + '.gif';
5302+
5303+
if (typeof navigator.msSaveBlob === 'function')
5304+
{
5305+
navigator.msSaveBlob(blob, filename);
5306+
}
5307+
else
5308+
{
5309+
var a = document.createElement('a');
5310+
a.href = URL.createObjectURL(blob);
5311+
a.download = filename;
5312+
document.body.appendChild(a);
5313+
a.click();
5314+
5315+
setTimeout(function()
5316+
{
5317+
document.body.removeChild(a);
5318+
URL.revokeObjectURL(a.href);
5319+
}, 0);
5320+
}
5321+
}
5322+
}), mxUtils.bind(this, function(e)
5323+
{
5324+
this.spinner.stop();
5325+
this.handleError(e);
5326+
}));
5327+
}
5328+
catch (e)
5329+
{
5330+
this.spinner.stop();
5331+
this.handleError(e);
5332+
}
5333+
}
5334+
};
5335+
51565336
/**
51575337
* Returns true if files should be saved using <saveLocalFile>.
51585338
*/
@@ -11303,6 +11483,9 @@
1130311483
return graphIsEnabled.apply(this, arguments) && !ui.isLocked();
1130411484
};
1130511485

11486+
// Shows link icons in main graph
11487+
graph.showLinkIcons = Editor.showLinkIcons;
11488+
1130611489
// Stops panning while freehand is active
1130711490
if (Graph.touchStyle)
1130811491
{

src/main/webapp/js/diagramly/Menus.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,12 @@
775775
exportImage('webp');
776776
}));
777777

778+
editorUi.actions.put('exportAnimatedGif', new Action(mxResources.get('formatAnimatedGif',
779+
null, 'Animated GIF') + '...', function()
780+
{
781+
editorUi.showAnimatedGifExportDialog();
782+
}));
783+
778784
action = editorUi.actions.addAction('copyAsImage', mxUtils.bind(this, function()
779785
{
780786
var cells = mxUtils.sortCells(graph.model.getTopmostCells(graph.getSelectionCells()));
@@ -2781,7 +2787,12 @@
27812787
{
27822788
this.addMenuItems(menu, ['exportPng', 'exportJpg'], parent);
27832789
}
2784-
2790+
2791+
if (editorUi.editor.isExportToCanvas())
2792+
{
2793+
this.addMenuItems(menu, ['exportAnimatedGif'], parent);
2794+
}
2795+
27852796
this.addMenuItems(menu, ['exportSvg', '-'], parent);
27862797

27872798
// Redirects export to PDF to print in Chrome App

src/main/webapp/js/diagramly/StorageLibrary.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ StorageLibrary.prototype.isAutosave = function()
3434
return true;
3535
};
3636

37+
/**
38+
* Translates this point by the given vector.
39+
*
40+
* @param {number} dx X-coordinate of the translation.
41+
* @param {number} dy Y-coordinate of the translation.
42+
*/
43+
StorageLibrary.prototype.save = function(revision, success, error)
44+
{
45+
this.saveAs(this.getTitle(), success, error);
46+
};
47+
3748
/**
3849
* Overridden to avoid updating data with current file.
3950
*/

0 commit comments

Comments
 (0)