MCPcopy
hub / github.com/wavetermdev/waveterm / broadcastZoomFactorChanged

Function broadcastZoomFactorChanged

emain/emain-util.ts:21–28  ·  view source on GitHub ↗
(newZoomFactor: number)

Source from the content-addressed store, hash-verified

19// that is safe because "zoom-factor-change" is a custom app-defined event
20// that only our renderers listen to; unrecognized IPC messages are ignored.
21function broadcastZoomFactorChanged(newZoomFactor: number): void {
22 for (const wc of electron.webContents.getAllWebContents()) {
23 if (wc.isDestroyed()) {
24 continue;
25 }
26 wc.send("zoom-factor-change", newZoomFactor);
27 }
28}
29
30export function increaseZoomLevel(webContents: electron.WebContents): void {
31 const newZoom = Math.min(MaxZoomLevel, webContents.getZoomFactor() + ZoomDelta);

Callers 3

increaseZoomLevelFunction · 0.85
decreaseZoomLevelFunction · 0.85
resetZoomLevelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected