Skip to content

Commit

Permalink
24.6.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgraph committed Jun 22, 2024
1 parent 7449d2d commit aa18279
Show file tree
Hide file tree
Showing 72 changed files with 626 additions and 616 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
22-JUN-2024: 24.6.2

- Adds option to include current page in PNG and SVG export [jgraph/drawio#2860]
- Fixes Cmd + US keyboard shortcut [jgraph/drawio-desktop#1792]

21-JUN-2024: 24.6.1

- Improves Google Drive app not installed message [DID-11885]
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24.6.1
24.6.2
62 changes: 32 additions & 30 deletions src/main/webapp/js/app.min.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/main/webapp/js/diagramly/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,11 @@
*/
Editor.defaultBorder = 5;

/**
* Specifies if cell metadata should be added to SVG output. Default is false.
*/
Editor.addSvgMetadata = false;

/**
* Specifies animations should be enabled. Default is true.
*/
Expand Down
59 changes: 54 additions & 5 deletions src/main/webapp/js/diagramly/EditorUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -7175,9 +7175,55 @@
height += 30;
}

var include = this.addCheckbox(div, mxResources.get('includeCopyOfMyDiagram'),
var include = this.addCheckbox(div, mxResources.get('includeCopyOfMyDiagram') + ':',
defaultInclude, null, null, format != 'jpeg' && format != 'webp');
include.style.marginBottom = '16px';

var includeSelect = document.createElement('select');
includeSelect.style.maxWidth = '260px';
includeSelect.style.marginLeft = '28px';

if (format == 'png' || format == 'svg')
{
var includeAllPagesOption = document.createElement('option');
includeAllPagesOption.setAttribute('value', 'allPages');
mxUtils.write(includeAllPagesOption, mxResources.get('allPages'));
includeSelect.appendChild(includeAllPagesOption);

var includeCurrentPageOption = document.createElement('option');
includeCurrentPageOption.setAttribute('value', 'currentPage');
mxUtils.write(includeCurrentPageOption, mxResources.get('currentPage'));
includeSelect.appendChild(includeCurrentPageOption);

include.style.marginBottom = '12px';
includeSelect.style.marginBottom = '16px';
div.appendChild(includeSelect);
mxUtils.br(div);
height += 20;

if (this.lastEmbedInclude != null)
{
includeSelect.value = this.lastEmbedInclude;
}

function updateIncludeSelect()
{
if (include.checked)
{
includeSelect.removeAttribute('disabled');
}
else
{
includeSelect.setAttribute('disabled', 'disabled');
}
};

mxEvent.addListener(include, 'change', updateIncludeSelect);
updateIncludeSelect();
}
else
{
include.style.marginBottom = '16px';
}

var cb5 = document.createElement('input');
cb5.style.marginBottom = '16px';
Expand All @@ -7203,7 +7249,7 @@
mxUtils.write(div, mxResources.get('embedFonts'));
mxUtils.br(div);

height += 60;
height += 50;
}

var linkSelect = document.createElement('select');
Expand Down Expand Up @@ -7247,10 +7293,13 @@
this.lastExportZoom = zoomInput.value;
this.lastEmbedImages = cb5.checked;
this.lastEmbedFonts = cb7.checked;
this.lastEmbedInclude = includeSelect.value;

callback(zoomInput.value, transparent.checked, !selection.checked, shadow.checked,
include.checked, cb5.checked && embedOption, borderInput.value, cb6.checked, false, linkSelect.value,
(grid != null) ? grid.checked : null, (themeSelect != null) ? themeSelect.value : null,
include.checked, cb5.checked && embedOption, borderInput.value, cb6.checked,
(format == 'png' || format == 'svg') && includeSelect.value == 'currentPage',
linkSelect.value, (grid != null) ? grid.checked : null,
(themeSelect != null) ? themeSelect.value : null,
exportSelect.value, cb7.checked);
}), null, btnLabel, helpLink);
this.showDialog(dlg.container, 340, height, true, true, null, null, null, null, true);
Expand Down
9 changes: 5 additions & 4 deletions src/main/webapp/js/diagramly/Menus.js
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@
if (!isNaN(val) && val > 0)
{
editorUi.exportSvg(val / 100, transparentBackground, ignoreSelection,
addShadow, editable, embedImages, border, !cropImage, false,
addShadow, editable, embedImages, border, !cropImage, currentPage,
linkTarget, theme, exportType, embedFonts);
}
}), true, editorUi.lastExportSvgEditable, 'svg', true);
Expand All @@ -733,12 +733,13 @@
{
editorUi.exportImage(val / 100, transparentBackground && format == 'png',
ignoreSelection, addShadow, editable && format == 'png', border,
!cropImage, false, format, grid, null, theme, exportType);
!cropImage, currentPage, format, grid, null, theme, exportType);

if (done != null)
{
done(scale, transparentBackground, ignoreSelection, addShadow, editable, embedImages,
border, cropImage, currentPage, dummy, grid, theme, exportType);
done(scale, transparentBackground, ignoreSelection, addShadow,
editable, embedImages, border, cropImage, currentPage,
dummy, grid, theme, exportType);
}
}
}), true, defaultEditable, format, true);
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/js/grapheditor/EditorUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -6471,10 +6471,10 @@ EditorUi.prototype.createKeyHandler = function(editor)
keyHandler.bindAction(80, true, 'print'); // Ctrl+P

// Zoom keys are best effort for international keyboards, the actual
// US keycodes for + is 192 and - is 173. Keypad + is 107 and - is 109.
// US keycodes for + is 61 and - is 173. Keypad + is 107 and - is 109.
keyHandler.bindAction(107, true, 'zoomIn'); // Ctrl+Plus (Numpad)
keyHandler.bindAction(109, true, 'zoomOut'); // Ctrl+Minus (Numpad)
keyHandler.bindAction(192, true, 'zoomIn'); // Ctrl + (US)
keyHandler.bindAction(61, true, 'zoomIn'); // Ctrl + (US)
keyHandler.bindAction(222, true, 'zoomIn'); // Ctrl Minus (CH: '/?)
keyHandler.bindAction(173, true, 'zoomOut'); // Ctrl - (US)
keyHandler.bindAction(189, true, 'zoomOut'); // Ctrl Slash (CH: -/_)
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/js/grapheditor/Graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -11773,7 +11773,7 @@ if (typeof mxVertexHandler !== 'undefined')
canvas.root = this.addCellData(state.cell,
(svgDoc.createElementNS != null) ?
svgDoc.createElementNS(mxConstants.NS_SVG, 'g') :
svgDoc.createElement('g'), false);
svgDoc.createElement('g'), Editor.addSvgMetadata);
root.appendChild(canvas.root);
visitStatesRecursive.apply(this, arguments);
canvas.root = root;
Expand Down
Loading

0 comments on commit aa18279

Please sign in to comment.