meteor-desktop icon indicating copy to clipboard operation
meteor-desktop copied to clipboard

How to disable pinching / zooming?

Open msavin opened this issue 6 years ago • 3 comments

I have tried to set zoom limits using webFrame, but the object was not found. I have also tried to use appendSwitch to disable-pinch with no success. Could anyone point me towards another solution?

P.s. what version of Electron does this package use?

msavin avatar Nov 28 '18 13:11 msavin

Hey,

because of the nature of this integration some things unfortunately are a little bit trickier than in plain Electron. node-integration is off so you can not access node modules in the browser through require or import because the Chrome/Node integration conflicts with Meteor's code.

So to get access to a webFrame which you would normally just get through import { webFrame } from 'electron' you need to expose it through exposedModules setting in settings.json. Thne you can access it from Desktop.electron namespace in meteor app code. So Desktop.electron.webFrame should be available after proper configuration.

appendSwitch is not supported at the moment because your code (meteor app/.desktop code) does not have direct access to the app module before the app is started. If you need this I can add this as a configuration field in settings.json - let me know.

wojtkowiak avatar Nov 28 '18 13:11 wojtkowiak

Ah, thanks man, that was the tip that I needed 👍

msavin avatar Nov 28 '18 16:11 msavin

P.s. what version of Electron does this package use?

https://github.com/wojtkowiak/meteor-desktop/blob/master/CHANGELOG.md#v200-02102018 Just recently this package has been decoupled from electron. Previously it had electron in it's deps. Now you can use any version you want, however in the changelog I will always specify the recommended version which I consider to be the safest.

wojtkowiak avatar Nov 29 '18 12:11 wojtkowiak