Skip to content

Commit

Permalink
23.1.3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjgraph committed Feb 12, 2024
1 parent dfa7176 commit 1c71e02
Show file tree
Hide file tree
Showing 36 changed files with 6,430 additions and 6,372 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
@@ -1,3 +1,11 @@
12-FEB-2024: 23.1.3

- [conf cloud] Added support for Gliffy pinned versions & display name in mass import [DID-10522]
- Improves copy/paste for styles
- Improves font defaults for themes
- Applies default theme edge font size to general edge labels
- [conf cloud] Moving back to REST v1 to avoid encoding issues [DID-10762]

06-FEB-2024: 23.1.2

- Fixes possible spin forever in image dialogs [drawio-4166]
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
23.1.2
23.1.3
Binary file modified src/main/webapp/favicon.ico
Binary file not shown.
Binary file removed src/main/webapp/images/android-chrome-192x192.png
Binary file not shown.
Binary file removed src/main/webapp/images/android-chrome-196x196.png
Binary file not shown.
Binary file removed src/main/webapp/images/android-chrome-512x512.png
Binary file not shown.
Binary file modified src/main/webapp/images/apple-touch-icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/main/webapp/images/favicon-16x16.png
Binary file not shown.
Binary file removed src/main/webapp/images/favicon-32x32.png
Binary file not shown.
Binary file added src/main/webapp/images/icon-192-maskable.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/images/icon-192.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/images/icon-512-maskable.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/webapp/images/icon-512.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/webapp/images/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 5 additions & 11 deletions src/main/webapp/images/manifest.json
Expand Up @@ -3,17 +3,11 @@
"short_name": "draw.io",
"description": "draw.io is a completely free diagram editor",
"icons": [
{
"src": "/images/android-chrome-196x196.png",
"sizes": "196x196",
"type": "image/png",
"purpose": "any maskable"
},
{
"src": "/images/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
{ "src": "/favicon.ico", "type": "image/x-icon", "sizes": "16x16 32x32" },
{ "src": "/images/icon-192.png", "type": "image/png", "sizes": "192x192" },
{ "src": "/images/icon-512.png", "type": "image/png", "sizes": "512x512" },
{ "src": "/images/icon-192-maskable.png", "type": "image/png", "sizes": "192x192", "purpose": "maskable" },
{ "src": "/images/icon-512-maskable.png", "type": "image/png", "sizes": "512x512", "purpose": "maskable" }
],
"theme_color": "#DF6C0C",
"background_color": "#DF6C0C",
Expand Down
Binary file removed src/main/webapp/images/mstile-150x150.png
Binary file not shown.
26 changes: 0 additions & 26 deletions src/main/webapp/images/safari-pinned-tab.svg

This file was deleted.

7 changes: 2 additions & 5 deletions src/main/webapp/index.html
Expand Up @@ -358,11 +358,8 @@
}
};
</script>
<link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/plgmlhohecdddhbmmkncjdmlhcmaachm">
<link rel="apple-touch-icon" sizes="180x180" href="images/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="images/favicon-16x16.png">
<link rel="mask-icon" href="images/safari-pinned-tab.svg" color="#d89000">
<link rel="icon" href="favicon.ico" sizes="any">
<link rel="apple-touch-icon" href="images/apple-touch-icon.png">
<link rel="stylesheet" type="text/css" href="styles/grapheditor.css">
<link rel="canonical" href="https://app.diagrams.net">
<link rel="manifest" href="images/manifest.json">
Expand Down
3,159 changes: 1,580 additions & 1,579 deletions src/main/webapp/js/app.min.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/main/webapp/js/diagramly/App.js
Expand Up @@ -6765,7 +6765,11 @@ App.prototype.descriptorChanged = function()

if (newHash.length > 0)
{
window.location.hash = newHash;
if (newHash != this.getDiagramId())
{
window.location.hash = newHash;
}

this.updateHashObject();
}
else if (window.location.hash.length > 0)
Expand Down
15 changes: 11 additions & 4 deletions src/main/webapp/js/diagramly/DropboxClient.js
Expand Up @@ -149,10 +149,17 @@ DropboxClient.prototype.authenticateStep2 = function(state, success, error)
{
if (req.getStatus() >= 200 && req.getStatus() <= 299)
{
_token = JSON.parse(req.getText()).access_token;
this.client.setAccessToken(_token);
this.setUser(null);
success();
try
{
_token = JSON.parse(req.getText()).access_token;
this.client.setAccessToken(_token);
this.setUser(null);
success();
}
catch (e)
{
error({message: mxResources.get('authFailed'), retry: auth});
}
}
else
{
Expand Down
85 changes: 48 additions & 37 deletions src/main/webapp/js/diagramly/EditorUi.js
Expand Up @@ -28,6 +28,7 @@
EditorUi.enableLogging = urlParams['stealth'] != '1' && urlParams['lockdown'] != '1' &&
(/.*\.draw\.io$/.test(window.location.hostname) ||
/.*\.diagrams\.net$/.test(window.location.hostname)) &&
window.location.hostname != 'https://preprod.diagrams.net/' &&
window.location.hostname != 'support.draw.io';

/**
Expand Down Expand Up @@ -2409,8 +2410,8 @@
*/
EditorUi.prototype.updateHashObject = function()
{
if (this.currentFile != null && this.currentFile.getHash() != '' &&
this.currentPage != null && this.getSelectedPageIndex() > 0)
if (this.currentFile != null && this.currentPage != null &&
this.currentFile.getHash() != '')
{
var obj = this.getHashObject();
obj.pageId = this.currentPage.getId();
Expand Down Expand Up @@ -2457,8 +2458,16 @@
{
// ignore
}

window.location.hash = id;

// Adds to browsing history if hash object changed
if (last > 0 && id.lastIndexOf('#') > 0)
{
window.location.hash = id;
}
else
{
window.location.replace(id);
}
}
};

Expand Down Expand Up @@ -4217,6 +4226,14 @@
Editor.configurationKey = '.sketch-configuration';
Editor.settingsKey = '.sketch-config';
}

if (Editor.currentTheme == 'sketch')
{
Graph.prototype.defaultVertexStyle['fontFamily'] = Editor.sketchFontFamily;
Graph.prototype.defaultVertexStyle['fontSource'] = Editor.sketchFontSource;
Graph.prototype.defaultEdgeStyle['fontFamily'] = Editor.sketchFontFamily;
Graph.prototype.defaultEdgeStyle['fontSource'] = Editor.sketchFontSource;
}
};

EditorUi.initTheme();
Expand Down Expand Up @@ -7969,10 +7986,8 @@

if (applyDefaultStyles)
{
this.insertHandler(cells, null, null,
graph.defaultVertexStyle,
graph.defaultEdgeStyle,
false, true);
graph.pasteCellStyles(graph.includeDescendants(cells),
graph.defaultVertexStyle, graph.defaultEdgeStyle);
}
}
finally
Expand Down Expand Up @@ -9260,7 +9275,8 @@
try
{
cell = graph.insertVertex(graph.getDefaultParent(), null, text,
graph.snap(dx), graph.snap(dy), 1, 1, 'text;' + ((html) ? 'html=1;' : ''));
graph.snap(dx), graph.snap(dy), 1, 1, 'text;' +
((html) ? 'html=1;' : ''));
graph.updateCellSize(cell);
graph.fireEvent(new mxEventObject('textInserted', 'cells', [cell]));
}
Expand Down Expand Up @@ -9307,7 +9323,8 @@
// Fires cellsInserted to apply the current style to the inserted text.
// This requires the value to be empty when the event is fired.
cell = graph.insertVertex(graph.getDefaultParent(), null, '',
graph.snap(dx), graph.snap(dy), 1, 1, 'text;whiteSpace=wrap;' + ((html) ? 'html=1;' : ''));
graph.snap(dx), graph.snap(dy), 1, 1, 'text;whiteSpace=wrap;' +
((html) ? 'html=1;' : ''));
graph.fireEvent(new mxEventObject('textInserted', 'cells', [cell]));

if (html)
Expand Down Expand Up @@ -13884,31 +13901,26 @@

// Skipped if defaultVertexStyle or defaultEdgeStyle configured
if (Editor.config == null || (Editor.config.defaultVertexStyle == null &&
Editor.config.defaultEdgeStyle == null))
Editor.config.defaultEdgeStyle == null))
{
if (Editor.sketchMode)
if (Editor.currentTheme == 'sketch')
{
this.menus.defaultFontSize = 20;
graph.vertexFontSize = 20;
graph.edgeFontSize = graph.vertexFontSize - 4;
}
else if (Editor.currentTheme == 'simple')
{
this.menus.defaultFontSize = 16;
graph.vertexFontSize = 16;
graph.edgeFontSize = graph.vertexFontSize - 4;
}
else
{
this.menus.defaultFontSize = Menus.prototype.defaultFontSize;
graph.vertexFontSize = Graph.prototype.vertexFontSize;
graph.edgeFontSize = Graph.prototype.edgeFontSize;
}

if (this.menus.defaultFontSize == Menus.prototype.defaultFontSize)
{
setStyle(graph.defaultEdgeStyle, 'fontSize', null);
setStyle(graph.defaultVertexStyle, 'fontSize', null);
}
else
{
setStyle(graph.defaultVertexStyle, 'fontSize', this.menus.defaultFontSize);
setStyle(graph.defaultEdgeStyle, 'fontSize', parseInt(this.menus.defaultFontSize) - 4);
}
// Font size for edges is applied to all inserted edges
setStyle(graph.defaultEdgeStyle, 'fontSize', graph.edgeFontSize);
}

// Skipped if defaultEdgeStyle configured
Expand Down Expand Up @@ -13936,33 +13948,32 @@
setStyle(graph.defaultEdgeStyle, 'targetPerimeterSpacing', '8');
}
}

// Skipped if defaultFonts configured
if (Editor.config == null || Editor.config.defaultFonts == null)
{
if (Editor.sketchMode)
// Skipped if defaultFonts, defaultVertexStyle or defaultEdgeStyle configured
if (Editor.config == null || (Editor.config.defaultVertexStyle == null &&
Editor.config.defaultEdgeStyle == null))
{
this.menus.defaultFonts = Menus.prototype.defaultFonts.concat(Editor.sketchFonts);

// Skipped if defaultFonts, defaultVertexStyle or defaultEdgeStyle configured
if (Editor.config == null || (Editor.config.defaultVertexStyle == null &&
Editor.config.defaultEdgeStyle == null))
if (Editor.sketchMode)
{
setStyle(graph.defaultVertexStyle, 'fontFamily', Editor.sketchFontFamily);
setStyle(graph.defaultVertexStyle, 'fontSource', Editor.sketchFontSource);
setStyle(graph.defaultVertexStyle, 'hachureGap', '4');
setStyle(graph.defaultVertexStyle, 'sketch', '1');
setStyle(graph.defaultVertexStyle, 'curveFitting', Editor.sketchDefaultCurveFitting);
setStyle(graph.defaultVertexStyle, 'jiggle', Editor.sketchDefaultJiggle);
setStyle(graph.defaultVertexStyle, 'hachureGap', '4');

setStyle(graph.defaultEdgeStyle, 'fontFamily', Editor.sketchFontFamily);
setStyle(graph.defaultEdgeStyle, 'fontSource', Editor.sketchFontSource);
setStyle(graph.defaultEdgeStyle, 'sketch', '1');
setStyle(graph.defaultEdgeStyle, 'curveFitting', Editor.sketchDefaultCurveFitting);
setStyle(graph.defaultEdgeStyle, 'jiggle', Editor.sketchDefaultJiggle);
setStyle(graph.defaultEdgeStyle, 'hachureGap', '4');
}
}

if (Editor.currentTheme == 'sketch')
{
this.menus.defaultFonts = Menus.prototype.defaultFonts.concat(Editor.sketchFonts);
}
else
{
this.menus.defaultFonts = Menus.prototype.defaultFonts;
Expand Down
13 changes: 10 additions & 3 deletions src/main/webapp/js/diagramly/GitHubClient.js
Expand Up @@ -156,9 +156,16 @@ GitHubClient.prototype.authenticateStep2 = function(state, success, error)
{
if (req.getStatus() >= 200 && req.getStatus() <= 299)
{
_token = JSON.parse(req.getText()).access_token;
this.setUser(null);
success();
try
{
_token = JSON.parse(req.getText()).access_token;
this.setUser(null);
success();
}
catch (e)
{
error({message: mxResources.get('authFailed'), retry: auth});
}
}
else
{
Expand Down
15 changes: 11 additions & 4 deletions src/main/webapp/js/diagramly/GitLabClient.js
Expand Up @@ -81,10 +81,17 @@ GitLabClient.prototype.authenticateStep2 = function(state, success, error)
{
if (req.getStatus() >= 200 && req.getStatus() <= 299)
{
_token = JSON.parse(req.getText()).access_token;
this.setToken(_token);
this.setUser(null);
success();
try
{
_token = JSON.parse(req.getText()).access_token;
this.setToken(_token);
this.setUser(null);
success();
}
catch (e)
{
error({message: mxResources.get('authFailed'), retry: auth});
}
}
else
{
Expand Down
28 changes: 22 additions & 6 deletions src/main/webapp/js/diagramly/Menus.js
Expand Up @@ -818,17 +818,32 @@

editorUi.actions.addAction('copyStyle', function()
{
if (graph.isEnabled() && !graph.isSelectionEmpty())
if (graph.isEnabled() && graph.getSelectionCount() == 1)
{
editorUi.copiedStyle = graph.copyStyle(graph.getSelectionCell())
var cell = graph.getSelectionCell();
var style = graph.getCellStyle(cell, false);
editorUi.copiedStyle = {};
var values = [];
var keys = [];

for (var key in style)
{
values.push(style[key]);
keys.push(key);
}

graph.copyCellStyles([cell], keys, values,
editorUi.copiedStyle, editorUi.copiedStyle,
null, null, null, true);
}
}, null, null, 'Alt+C');

editorUi.actions.addAction('pasteStyle', function()
{
if (graph.isEnabled() && !graph.isSelectionEmpty() && editorUi.copiedStyle != null)
{
graph.pasteStyle(editorUi.copiedStyle, graph.getSelectionCells())
graph.pasteCellStyles(graph.includeDescendants(graph.getSelectionCells()),
editorUi.copiedStyle, editorUi.copiedStyle, true);
}
}, null, null, 'Alt+V');

Expand Down Expand Up @@ -3748,9 +3763,10 @@
{
if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
{
graph.startEditingAtCell(insertVertex('Text', 60, 30, 'text;strokeColor=none;align=center;' +
'fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;',
(evt != null && !mxEvent.isControlDown(evt) && !mxEvent.isMetaDown(evt) &&
graph.startEditingAtCell(insertVertex('Text', 60, 30, graph.appendFontSize(
'text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;' +
'whiteSpace=wrap;rounded=0;', graph.vertexFontSize), (evt != null &&
!mxEvent.isControlDown(evt) && !mxEvent.isMetaDown(evt) &&
graph.isMouseInsertPoint()) ? graph.getInsertPoint() : null));
}
}, null, null, 'A')).isEnabled = isGraphEnabled;
Expand Down

0 comments on commit 1c71e02

Please sign in to comment.