no message
This commit is contained in:
parent
49c5a9f621
commit
cbf2e6a140
@ -118,6 +118,7 @@ services:
|
|||||||
- ./docker/drawio/webapp/stencils:/usr/local/tomcat/webapps/draw/stencils
|
- ./docker/drawio/webapp/stencils:/usr/local/tomcat/webapps/draw/stencils
|
||||||
- ./docker/drawio/webapp/js/app.min.js:/usr/local/tomcat/webapps/draw/js/app.min.js
|
- ./docker/drawio/webapp/js/app.min.js:/usr/local/tomcat/webapps/draw/js/app.min.js
|
||||||
- ./docker/drawio/webapp/js/croppie/croppie.min.css:/usr/local/tomcat/webapps/draw/js/croppie/croppie.min.css
|
- ./docker/drawio/webapp/js/croppie/croppie.min.css:/usr/local/tomcat/webapps/draw/js/croppie/croppie.min.css
|
||||||
|
- ./docker/drawio/webapp/js/diagramly/ElectronApp.js:/usr/local/tomcat/webapps/draw/js/diagramly/ElectronApp.js
|
||||||
networks:
|
networks:
|
||||||
extnetwork:
|
extnetwork:
|
||||||
ipv4_address: "${APP_IPPR}.8"
|
ipv4_address: "${APP_IPPR}.8"
|
||||||
|
2206
docker/drawio/webapp/js/diagramly/ElectronApp.js
vendored
Normal file
2206
docker/drawio/webapp/js/diagramly/ElectronApp.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
12
electron/main.js
vendored
12
electron/main.js
vendored
@ -73,6 +73,7 @@ function createMainWindow() {
|
|||||||
preload: path.join(__dirname, 'preload.js'),
|
preload: path.join(__dirname, 'preload.js'),
|
||||||
webSecurity: true,
|
webSecurity: true,
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
|
nodeIntegrationInSubFrames: true,
|
||||||
contextIsolation: true
|
contextIsolation: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -156,6 +157,7 @@ function createSubWindow(args) {
|
|||||||
devTools: args.devTools !== false,
|
devTools: args.devTools !== false,
|
||||||
webSecurity: true,
|
webSecurity: true,
|
||||||
nodeIntegration: true,
|
nodeIntegration: true,
|
||||||
|
nodeIntegrationInSubFrames: true,
|
||||||
contextIsolation: true
|
contextIsolation: true
|
||||||
},
|
},
|
||||||
}, config))
|
}, config))
|
||||||
@ -418,8 +420,10 @@ ipcMain.on('setDockBadge', (event, args) => {
|
|||||||
event.returnValue = "ok"
|
event.returnValue = "ok"
|
||||||
})
|
})
|
||||||
|
|
||||||
|
//================================================================
|
||||||
|
// Pdf export
|
||||||
|
//================================================================
|
||||||
|
|
||||||
//Pdf export
|
|
||||||
const MICRON_TO_PIXEL = 264.58 //264.58 micron = 1 pixel
|
const MICRON_TO_PIXEL = 264.58 //264.58 micron = 1 pixel
|
||||||
const PNG_CHUNK_IDAT = 1229209940;
|
const PNG_CHUNK_IDAT = 1229209940;
|
||||||
const LARGE_IMAGE_AREA = 30000000;
|
const LARGE_IMAGE_AREA = 30000000;
|
||||||
@ -644,7 +648,7 @@ function exportDiagram(event, args, directFinalize) {
|
|||||||
try {
|
try {
|
||||||
browser = new BrowserWindow({
|
browser = new BrowserWindow({
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
preload: `${__dirname}/electron-preload.js`,
|
preload: path.join(__dirname, 'preload.js'),
|
||||||
backgroundThrottling: false,
|
backgroundThrottling: false,
|
||||||
contextIsolation: true,
|
contextIsolation: true,
|
||||||
nativeWindowOpen: true
|
nativeWindowOpen: true
|
||||||
@ -658,7 +662,7 @@ function exportDiagram(event, args, directFinalize) {
|
|||||||
browser.loadURL(`file://${__dirname}/export3.html`);
|
browser.loadURL(`file://${__dirname}/export3.html`);
|
||||||
|
|
||||||
const contents = browser.webContents;
|
const contents = browser.webContents;
|
||||||
let pageByPage = (args.format == 'pdf' && !args.print), from, pdfs;
|
let pageByPage = (args.format == 'pdf' && !args.print), from, to, pdfs;
|
||||||
|
|
||||||
if (pageByPage) {
|
if (pageByPage) {
|
||||||
from = args.allPages ? 0 : parseInt(args.from || 0);
|
from = args.allPages ? 0 : parseInt(args.from || 0);
|
||||||
@ -1107,7 +1111,7 @@ function windowAction(method) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openExternal(url) {
|
function openExternal(url) {
|
||||||
shell.openExternal(url);
|
shell.openExternal(url).then(() => {}).catch(() => {});
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user