@@ -34,6 +34,7 @@ const path = require('path');
3434// The Electron module used to communicate asynchronously from a renderer process to the main process.
3535const ipcRenderer = require ( 'electron' ) . ipcRenderer ;
3636const workbenchVersion = require ( '../../../package.json' ) . version ;
37+ const { webFrame } = require ( 'electron' ) ;
3738
3839/**
3940 * This is the UI Controller for the application. It's responsible for
@@ -173,6 +174,9 @@ $(document).ready(() => {
173174 ipcRenderer . on ( 'export-JSON' , exportJson ) ;
174175 ipcRenderer . on ( 'export-JSON-conclusions-only' , exportJsonConclusions ) ;
175176 ipcRenderer . on ( 'get-ScanInfo' , getScanInfo ) ;
177+ ipcRenderer . on ( 'zoom-reset' , zoomReset ) ;
178+ ipcRenderer . on ( 'zoom-in' , zoomIn ) ;
179+ ipcRenderer . on ( 'zoom-out' , zoomOut ) ;
176180
177181 // Opens the dashboard view when the app is first opened
178182 showWelcomePageButton . trigger ( 'click' ) ;
@@ -521,4 +525,16 @@ $(document).ready(() => {
521525 }
522526} ) ;
523527
528+ function zoomReset ( ) {
529+ webFrame . setZoomLevel ( 0 ) ;
530+ }
531+
532+ function zoomIn ( ) {
533+ webFrame . setZoomLevel ( webFrame . getZoomLevel ( ) + 1 ) ;
534+ }
535+
536+ function zoomOut ( ) {
537+ webFrame . setZoomLevel ( webFrame . getZoomLevel ( ) - 1 ) ;
538+ }
539+
524540module . exports = workbenchVersion ;
0 commit comments