diff --git a/browser/main/MainPage.js b/browser/main/MainPage.js index b48f39d9..4cfe6df1 100644 --- a/browser/main/MainPage.js +++ b/browser/main/MainPage.js @@ -19,9 +19,27 @@ export default class MainContainer extends React.Component { ipc.send('update-app', 'Deal with it.') } + handleWheel (e) { + if (e.ctrlKey && process.platform !== 'darwin') { + if (window.document.body.style.zoom == null) { + window.document.body.style.zoom = 1 + } + console.log(window.document.body.style.zoom) + let zoom = Number(window.document.body.style.zoom) + if (e.deltaY > 0 && zoom < 4) { + document.body.style.zoom = zoom + 0.05 + } else if (e.deltaY < 0 && zoom > 0.5) { + document.body.style.zoom = zoom - 0.05 + } + } + } + render () { return ( -