From 6622a72241eca57799436a59fd6aba9ea1d68d3c Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Tue, 26 Feb 2019 16:43:14 -0500 Subject: [PATCH] Resize app when second projector connected --- app/main.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/app/main.js b/app/main.js index a5fd3cd..fe2adf5 100644 --- a/app/main.js +++ b/app/main.js @@ -346,16 +346,24 @@ dev.remember = function (which, device, type) { } }; -dev.ready = function (projector, camera, light) { - mainWindow.webContents.send('ready', { +dev.ready = function (projector, camera, light, projector_second) { + let args = { camera, projector, light, profile: mcopy.settings.profile - }) + } + if (projector_second && projector_second.arduino) { + args.projector_second = projector_second + } + mainWindow.webContents.send('ready', args) settings.update('camera', camera) settings.update('projector', projector) settings.update('light', light) + if (projector_second && projector_second.arduino) { + settings.update('projector_second', projector_second) + mainWindow.setSize(800, 800) + } settings.save() return true };