git ssb

16+

Dominic / patchbay



Commit 41c069304b2bd78a228c769290dcaf99d6b470c2

minor refactor of zoom settings code

mix irving committed on 9/4/2017, 9:38:31 PM
Parent: 8fc563e4d194a9104ed67be2da2283e8539df948

Files changed

app/html/app.jschanged
main.jschanged
package-lock.jsonchanged
app/html/app.jsView
@@ -58,29 +58,30 @@
5858
5959 addError(ev.error || ev)
6060 })
6161
62- // TODO - extract this to keep patch-lite isolated from electron
62 + ////// TODO - extract this to keep patch-lite isolated from electron
63 + const { getCurrentWebContents, getCurrentWindow } = electron.remote
6364 window.addEventListener('resize', () => {
64- var wc = electron.remote.getCurrentWebContents()
65 + var wc = getCurrentWebContents()
6566 wc && wc.getZoomFactor((zf) => {
6667 api.settings.sync.set({
6768 electron: {
68- zoomFactor: zf,
69- windowBounds: electron.remote.getCurrentWindow().getBounds()
69 + zoomFactor: zf,
70 + windowBounds: getCurrentWindow().getBounds()
7071 }
7172 })
7273 })
7374 })
7475
7576 var zoomFactor = api.settings.sync.get('electron.zoomFactor')
7677 if (zoomFactor)
77- electron.remote.getCurrentWebContents().setZoomFactor(zoomFactor)
78 + getCurrentWebContents().setZoomFactor(zoomFactor)
7879
7980 var bounds = api.settings.sync.get('electron.windowBounds')
8081 if (bounds)
81- electron.remote.getCurrentWindow().setBounds(bounds)
82- ///////////////////
82 + getCurrentWindow().setBounds(bounds)
83 + //////
8384
8485 return App
8586 }
8687 }
main.jsView
@@ -23,10 +23,10 @@
2323 // gatherings,
2424 // bayGatherings, // TODO collect gatherings into this
2525 patchbay,
2626 patchContext,
27- patchcore,
28- patchSettings
27 + patchSettings,
28 + patchcore
2929 )
3030
3131 const api = entry(sockets, nest('app.html.app', 'first'))
3232
package-lock.jsonView
The diff is too large to show. Use a local git client to view these changes.
Old file size: 252990 bytes
New file size: 253788 bytes

Built with git-ssb-web