MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / adjustZoom

Function adjustZoom

webview-ui/src/components/common/ImageViewer.tsx:111–116  ·  view source on GitHub ↗
(amount: number)

Source from the content-addressed store, hash-verified

109 * Adjust zoom level in the modal
110 */
111 const adjustZoom = (amount: number) => {
112 setZoomLevel((prev) => {
113 const newZoom = prev + amount
114 return Math.max(MIN_ZOOM, Math.min(MAX_ZOOM, newZoom))
115 })
116 }
117
118 /**
119 * Handle wheel event for zooming with scroll wheel

Callers 3

startContinuousZoomFunction · 0.70
ZoomControlsFunction · 0.70
ImageViewerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected