diff options
author | 2019-10-26 12:48:31 +0200 | |
---|---|---|
committer | 2019-11-28 02:31:49 +0700 | |
commit | a28c993d2045c3bef61a4435737e0c810d380282 (patch) | |
tree | 869864ab807123847dfa0e2c51f625a40b8884b1 | |
parent | #170 Upgrade to Electron 7 and bump other deps with minor up (diff) | |
download | ferdium-app-a28c993d2045c3bef61a4435737e0c810d380282.tar.gz ferdium-app-a28c993d2045c3bef61a4435737e0c810d380282.tar.zst ferdium-app-a28c993d2045c3bef61a4435737e0c810d380282.zip |
Fix zoom not working
-rw-r--r-- | src/lib/Menu.js | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index b8abf80bd..fb4ed2677 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -392,10 +392,10 @@ const _templateFactory = intl => [ | |||
392 | accelerator: 'Cmd+plus', | 392 | accelerator: 'Cmd+plus', |
393 | click() { | 393 | click() { |
394 | const activeService = getActiveWebview(); | 394 | const activeService = getActiveWebview(); |
395 | activeService.getZoomLevel((level) => { | 395 | const level = activeService.getZoomLevel(); |
396 | // level 9 =~ +300% and setZoomLevel wouldnt zoom in further | 396 | |
397 | if (level < 9) activeService.setZoomLevel(level + 1); | 397 | // level 9 =~ +300% and setZoomLevel wouldnt zoom in further |
398 | }); | 398 | if (level < 9) activeService.setZoomLevel(level + 1); |
399 | }, | 399 | }, |
400 | }, | 400 | }, |
401 | { | 401 | { |
@@ -403,10 +403,10 @@ const _templateFactory = intl => [ | |||
403 | accelerator: 'Cmd+-', | 403 | accelerator: 'Cmd+-', |
404 | click() { | 404 | click() { |
405 | const activeService = getActiveWebview(); | 405 | const activeService = getActiveWebview(); |
406 | activeService.getZoomLevel((level) => { | 406 | const level = activeService.getZoomLevel(); |
407 | // level -9 =~ -50% and setZoomLevel wouldnt zoom out further | 407 | |
408 | if (level > -9) activeService.setZoomLevel(level - 1); | 408 | // level -9 =~ -50% and setZoomLevel wouldnt zoom out further |
409 | }); | 409 | if (level > -9) activeService.setZoomLevel(level - 1); |
410 | }, | 410 | }, |
411 | }, | 411 | }, |
412 | { | 412 | { |
@@ -598,10 +598,10 @@ const _titleBarTemplateFactory = intl => [ | |||
598 | accelerator: `${ctrlKey}+=`, | 598 | accelerator: `${ctrlKey}+=`, |
599 | click() { | 599 | click() { |
600 | const activeService = getActiveWebview(); | 600 | const activeService = getActiveWebview(); |
601 | activeService.getZoomLevel((level) => { | 601 | const level = activeService.getZoomLevel(); |
602 | // level 9 =~ +300% and setZoomLevel wouldnt zoom in further | 602 | |
603 | if (level < 9) activeService.setZoomLevel(level + 1); | 603 | // level 9 =~ +300% and setZoomLevel wouldnt zoom in further |
604 | }); | 604 | if (level < 9) activeService.setZoomLevel(level + 1); |
605 | }, | 605 | }, |
606 | }, | 606 | }, |
607 | { | 607 | { |
@@ -609,10 +609,10 @@ const _titleBarTemplateFactory = intl => [ | |||
609 | accelerator: `${ctrlKey}+-`, | 609 | accelerator: `${ctrlKey}+-`, |
610 | click() { | 610 | click() { |
611 | const activeService = getActiveWebview(); | 611 | const activeService = getActiveWebview(); |
612 | activeService.getZoomLevel((level) => { | 612 | const level = activeService.getZoomLevel(); |
613 | // level -9 =~ -50% and setZoomLevel wouldnt zoom out further | 613 | |
614 | if (level > -9) activeService.setZoomLevel(level - 1); | 614 | // level -9 =~ -50% and setZoomLevel wouldnt zoom out further |
615 | }); | 615 | if (level > -9) activeService.setZoomLevel(level - 1); |
616 | }, | 616 | }, |
617 | }, | 617 | }, |
618 | { | 618 | { |