MCPcopy
hub / github.com/ollm/OpenComic / zoomIn

Function zoomIn

scripts/reading.js:2366–2382  ·  view source on GitHub ↗
(animation = true, center = false, delta = false)

Source from the content-addressed store, hash-verified

2364
2365// Zoom in
2366function zoomIn(animation = true, center = false, delta = false)
2367{
2368 if(zoomMoveData.active)
2369 return;
2370
2371 if(delta) // From MouseWheel event
2372 delta = delta * (config.mouseWheelSensitivityInZoom / 10);
2373 else
2374 delta = 120;
2375
2376 const multipler = 0.25 * (delta / 120);
2377
2378 if(currentScale < 8)
2379 currentScale *= 1 + multipler;
2380
2381 applyScale(animation, currentScale, center);
2382}
2383
2384// Zoom out
2385function zoomOut(animation = true, center = false, delta = false)

Callers

nothing calls this directly

Calls 1

applyScaleFunction · 0.85

Tested by

no test coverage detected