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

Function zoomOut

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

Source from the content-addressed store, hash-verified

2383
2384// Zoom out
2385function zoomOut(animation = true, center = false, delta = false)
2386{
2387 if(zoomMoveData.active)
2388 return;
2389
2390 if(delta) // From MouseWheel event
2391 delta = delta * (config.mouseWheelSensitivityInZoom / 10);
2392 else
2393 delta = 120;
2394
2395 const multipler = 0.25 * (delta / 120);
2396
2397 if(currentScale > 0.2)
2398 currentScale /= 1 + multipler;
2399
2400 applyScale(animation, currentScale, center, true);
2401}
2402
2403function zoomUp(delta = 20, animation = false)
2404{

Callers

nothing calls this directly

Calls 1

applyScaleFunction · 0.85

Tested by

no test coverage detected