kopia lustrzana https://github.com/dceejay/electron-node-red
Update main.js
rodzic
980b770e5e
commit
138456ed63
3
main.js
3
main.js
|
@ -336,13 +336,12 @@ function createWindow() {
|
||||||
mainWindow.webContents.on("new-window", function(e, url, frameName, disposition, options) {
|
mainWindow.webContents.on("new-window", function(e, url, frameName, disposition, options) {
|
||||||
// if a child window opens... modify any other options such as width/height, etc
|
// if a child window opens... modify any other options such as width/height, etc
|
||||||
// in this case make the child overlap the parent exactly...
|
// in this case make the child overlap the parent exactly...
|
||||||
|
//console.log("NEW WINDOW",url);
|
||||||
var w = mainWindow.getBounds();
|
var w = mainWindow.getBounds();
|
||||||
options.x = w.x;
|
options.x = w.x;
|
||||||
options.y = w.y;
|
options.y = w.y;
|
||||||
options.width = w.width;
|
options.width = w.width;
|
||||||
options.height = w.height;
|
options.height = w.height;
|
||||||
//re-use the same child name so all "2nd" windows use the same one.
|
|
||||||
//frameName = "child";
|
|
||||||
})
|
})
|
||||||
|
|
||||||
mainWindow.on('closed', () => {
|
mainWindow.on('closed', () => {
|
||||||
|
|
Ładowanie…
Reference in New Issue