Skip to content

Commit 9619394

Browse files
committed
13.0.2 release
1 parent 005bfec commit 9619394

74 files changed

Lines changed: 2263 additions & 1132 deletions

File tree

Some content is hidden

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

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
27-APR-2020: 13.0.2
2+
3+
- Fixes print output in dark mode
4+
- Preserves pasted text colors
5+
- Adds math-font URL parameter
6+
17
21-APR-2020: 13.0.1
28

39
- Replaces HTML-CSS MathJax output files

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
13.0.1
1+
13.0.2

etc/license-worker/license.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async function handleRequest(request)
3535
if (email != null)
3636
{
3737
let msg = encodeURIComponent(('license:GWE:' + email));
38-
let url = "https://log.draw.io/" + msg;
38+
let url = "https://log.diagrams.net/" + msg;
3939
fetch(url);
4040
}
4141

src/main/webapp/connect/confluence/viewer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
//Check if the user can edit this diagram
206206
if (userCanEdit[id] == null)
207207
{
208-
if (inComment)
208+
if (inComment || (owningPageId != null && candidateId != owningPageId)) //TODO If the page id in the macro doesn't match the current page, we cannot edit it, fix this by allowing finding macro by owningPageId
209209
{
210210
userCanEdit[id] = -1; //TODO enable editing macros in comments externally (requires finding which comment it belongs to and editing that comment content)
211211
}

src/main/webapp/electron.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,10 +547,11 @@ app.on('ready', e =>
547547
if (program.args != null)
548548
{
549549
program.args.push(firstWinFilePath);
550+
program.args.push('$macOpen$');
550551
}
551552
else
552553
{
553-
program.args = [firstWinFilePath];
554+
program.args = [firstWinFilePath, '$macOpen$'];
554555
}
555556
}
556557

@@ -727,7 +728,7 @@ app.on('will-finish-launching', function()
727728

728729
win.webContents.on('did-finish-load', function()
729730
{
730-
win.webContents.send('args-obj', {args: [path]});
731+
win.webContents.send('args-obj', {args: [path, '$macOpen$']});
731732

732733
win.webContents.zoomFactor = 1;
733734
win.webContents.setVisualZoomLevelLimits(1, 1);

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

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

src/main/webapp/js/diagramly/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2002,7 +2002,7 @@ App.prototype.getThumbnail = function(width, fn)
20022002
// To avoid refresh during save dark theme uses separate graph instance
20032003
var darkTheme = graph.themes != null && graph.defaultThemeName == 'darkTheme';
20042004

2005-
if (this.pages != null && (this.currentPage != this.pages[0] || darkTheme))
2005+
if (darkTheme || (this.pages != null && this.currentPage != this.pages[0]))
20062006
{
20072007
var graphGetGlobalVariable = graph.getGlobalVariable;
20082008
graph = this.createTemporaryGraph((darkTheme) ? graph.getDefaultStylesheet() : graph.getStylesheet());

src/main/webapp/js/diagramly/DesktopLibrary.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Copyright (c) 2006-2020, JGraph Ltd
22
/**
3+
*
34
*/
45
DesktopLibrary = function(ui, data, fileObj)
56
{
@@ -18,11 +19,9 @@ DesktopLibrary.prototype.getHash = function()
1819
return 'S' + encodeURIComponent(this.fileObj.path);
1920
};
2021

21-
DesktopLibrary.prototype.isAutosave = function()
22-
{
23-
return this.fileObj != null;
24-
};
25-
22+
/**
23+
*
24+
*/
2625
DesktopLibrary.prototype.save = function(revision, success, error)
2726
{
2827
LocalFile.prototype.saveFile.apply(this, arguments);

src/main/webapp/js/diagramly/Editor.js

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,6 +1384,9 @@
13841384
},
13851385
// Needed for client-side export to work
13861386
SVG: {
1387+
font: (urlParams['math-font'] != null) ?
1388+
decodeURIComponent(urlParams['math-font']) :
1389+
'TeX',
13871390
useFontCache: false
13881391
},
13891392
// Ignores math in in-place editor
@@ -4520,7 +4523,9 @@
45204523
if (this.themes != null && this.defaultThemeName == 'darkTheme')
45214524
{
45224525
temp = this.stylesheet;
4523-
this.stylesheet = this.getDefaultStylesheet()
4526+
this.stylesheet = this.getDefaultStylesheet();
4527+
// LATER: Fix math export in dark mode by fetching text nodes before
4528+
// calling refresh and changing the font color in-place
45244529
this.refresh();
45254530
}
45264531

@@ -5639,6 +5644,16 @@
56395644
// Workaround to match available paper size in actual print output
56405645
printScale *= 0.75;
56415646

5647+
// Disables dark mode while printing
5648+
var darkStylesheet = null;
5649+
5650+
if (graph.themes != null && graph.defaultThemeName == 'darkTheme')
5651+
{
5652+
darkStylesheet = graph.stylesheet;
5653+
graph.stylesheet = graph.getDefaultStylesheet()
5654+
graph.refresh();
5655+
}
5656+
56425657
function printGraph(thisGraph, pv, forcePageBreaks)
56435658
{
56445659
// Workaround for CSS transforms affecting the print output
@@ -5882,7 +5897,7 @@
58825897

58835898
if (tempGraph == null)
58845899
{
5885-
tempGraph = editorUi.createTemporaryGraph(graph.getStylesheet());
5900+
tempGraph = editorUi.createTemporaryGraph(graph.stylesheet);//getStylesheet());
58865901

58875902
// Restores graph settings that are relevant for printing
58885903
var pageVisible = true;
@@ -5973,6 +5988,11 @@
59735988
doc.writeln('TeX: {');
59745989
doc.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]');
59755990
doc.writeln('},');
5991+
doc.writeln('SVG: {');
5992+
doc.writeln('font: "' + ((urlParams['math-font'] != null) ?
5993+
decodeURIComponent(urlParams['math-font']) :
5994+
'TeX') + '"');
5995+
doc.writeln('},');
59765996
doc.writeln('tex2jax: {');
59775997
doc.writeln('ignoreClass: "geDisableMathJax"');
59785998
doc.writeln('},');
@@ -6000,6 +6020,13 @@
60006020
PrintDialog.printPreview(pv);
60016021
}
60026022
}
6023+
6024+
// Restores dark mode
6025+
if (darkStylesheet != null)
6026+
{
6027+
graph.stylesheet = darkStylesheet;
6028+
graph.refresh();
6029+
}
60036030
};
60046031

60056032
var cancelBtn = mxUtils.button(mxResources.get('cancel'), function()

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6135,6 +6135,7 @@
61356135
try
61366136
{
61376137
var graph = this.editor.graph;
6138+
var darkTheme = graph.themes != null && graph.defaultThemeName == 'darkTheme';
61386139
var diagramData = null;
61396140

61406141
// Exports PNG for given optional data
@@ -6147,7 +6148,7 @@
61476148
diagramData = optionalData;
61486149
}
61496150
// Exports PNG for first page while other page is showing
6150-
else if (this.pages != null && this.currentPage != this.pages[0])
6151+
else if (darkTheme || (this.pages != null && this.currentPage != this.pages[0]))
61516152
{
61526153
graph = this.createTemporaryGraph(graph.getStylesheet());
61536154
var graphGetGlobalVariable = graph.getGlobalVariable;

0 commit comments

Comments
 (0)