Skip to content

Commit

Permalink
10.7.6 release
Browse files Browse the repository at this point in the history
Former-commit-id: 1d1e7ea
  • Loading branch information
davidjgraph committed Jun 11, 2019
1 parent 85e21e8 commit 4ae3d17
Show file tree
Hide file tree
Showing 16 changed files with 566 additions and 247 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
11-JUN-2019: 10.7.6

- Removes fallback to print dialog if offline in Electron
- Fixes broken link if Google Drive is not loading

04-JUN-2019: 10.7.5

- Fixes Math rendering in graph viewer
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
10.7.5
10.7.6
2 changes: 1 addition & 1 deletion src/main/webapp/cache.manifest
@@ -1,7 +1,7 @@
CACHE MANIFEST

# THIS FILE WAS GENERATED. DO NOT MODIFY!
# 06/04/2019 02:23 PM
# 06/11/2019 05:23 pm

app.html
index.html?offline=1
Expand Down
44 changes: 43 additions & 1 deletion src/main/webapp/electron.js
Expand Up @@ -24,6 +24,8 @@ const __DEV__ = process.env.NODE_ENV === 'development'

let windowsRegistry = []
let cmdQPressed = false
let firstWinLoaded = false
let firstWinFilePath = null

function createWindow (opt = {})
{
Expand Down Expand Up @@ -176,6 +178,7 @@ app.on('ready', e =>
})

let argv = process.argv

// https://github.com/electron/electron/issues/4690#issuecomment-217435222
if (process.defaultApp != true)
{
Expand Down Expand Up @@ -219,7 +222,7 @@ app.on('ready', e =>
'export all pages (for PDF format only)')
.option('-p, --page-index <pageIndex>',
'selects a specific page, if not specified and the format is an image, the first page is selected', parseInt)
.option('-g, --page-rage <from>..<to>',
.option('-g, --page-range <from>..<to>',
'selects a page range (for PDF format only)', argsRange)
.parse(argv)

Expand Down Expand Up @@ -469,6 +472,20 @@ app.on('ready', e =>

win.webContents.on('did-finish-load', function()
{
if (firstWinFilePath != null)
{
if (program.args != null)
{
program.args.push(firstWinFilePath);
}
else
{
program.args = [firstWinFilePath];
}
}

firstWinLoaded = true;

win.webContents.send('args-obj', program);

win.webContents.setZoomFactor(1);
Expand Down Expand Up @@ -618,6 +635,31 @@ app.on('activate', function ()
}
})

app.on('will-finish-launching', function()
{
app.on("open-file", function(event, path)
{
event.preventDefault();

if (firstWinLoaded)
{
let win = createWindow();

win.webContents.on('did-finish-load', function()
{
win.webContents.send('args-obj', {args: [path]});

win.webContents.setZoomFactor(1);
win.webContents.setVisualZoomLevelLimits(1, 1);
win.webContents.setLayoutZoomLevelLimits(0, 0);
});
}
else
{
firstWinFilePath = path
}
});
});

autoUpdater.on('error', e => log.error('@error@\n', e))

Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/index.html
Expand Up @@ -360,6 +360,7 @@
// Electron
if (mxIsElectron)
{
mxscript('js/diagramly/DesktopLibrary.js');
mxscript('js/diagramly/ElectronApp.js');
}

Expand Down
413 changes: 207 additions & 206 deletions src/main/webapp/js/app.min.js

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions src/main/webapp/js/diagramly/App.js
Expand Up @@ -4372,6 +4372,20 @@ App.prototype.restoreLibraries = function()
}
}
}
else if (service == 'S' && this.loadDesktopLib != null)
{
try
{
this.loadDesktopLib(decodeURIComponent(id.substring(1)), function(desktopLib)
{
onload(desktopLib);
}, onerror);
}
catch (e)
{
onerror();
}
}
else
{
var peer = null;
Expand Down
29 changes: 29 additions & 0 deletions src/main/webapp/js/diagramly/DesktopLibrary.js
@@ -0,0 +1,29 @@
// Copyright (c) 2006-2019, JGraph Ltd
/**
*/
DesktopLibrary = function(ui, data, fileObj)
{
LocalLibrary.call(this, ui, data, fileObj.name);
this.fileObj = fileObj;
};

//Extends LocalLibrary
mxUtils.extend(DesktopLibrary, LocalLibrary);

/**
*
*/
DesktopLibrary.prototype.getHash = function()
{
return 'S' + encodeURIComponent(this.fileObj.path);
};

DesktopLibrary.prototype.isAutosave = function()
{
return this.fileObj != null;
};

DesktopLibrary.prototype.save = function(revision, success, error)
{
LocalFile.prototype.saveFile.apply(this, arguments);
};
2 changes: 1 addition & 1 deletion src/main/webapp/js/diagramly/Dialogs.js
Expand Up @@ -434,7 +434,7 @@ var StorageDialog = function(editorUi, fn, rowLimit)
p3.style.fontSize = '9pt';
p3.style.marginTop = '-14px';
p3.innerHTML = '<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" ' +
'href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank">' +
'href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank">' +
'<img border="0" src="' + mxGraph.prototype.warningImage.src + '" align="top"> ' +
mxResources.get('googleDriveMissingClickHere') + '</a>';
div.appendChild(p3);
Expand Down
6 changes: 2 additions & 4 deletions src/main/webapp/js/diagramly/EditorUi.js
Expand Up @@ -6614,9 +6614,7 @@
{
try
{
//add back the file name
xhr.response.name = filename;
this.doImportVisio(xhr.response, done, onerror);
this.doImportVisio(xhr.response, done, onerror, filename);
}
catch (e)
{
Expand All @@ -6636,7 +6634,7 @@
{
try
{
this.doImportVisio(file, done, onerror);
this.doImportVisio(file, done, onerror, filename);
}
catch (e)
{
Expand Down

0 comments on commit 4ae3d17

Please sign in to comment.