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

Function rotateImage

scripts/reading.js:2757–2767  ·  view source on GitHub ↗
(rotated = false, x = 0, y = 0)

Source from the content-addressed store, hash-verified

2755}
2756
2757function rotateImage(rotated = false, x = 0, y = 0)
2758{
2759 if(rotated == 3)
2760 return 'rotate(180deg) translate(calc(-100% + '+x+'px), calc(-100% + '+y+'px))';
2761 else if(rotated)
2762 return 'rotate('+(rotated == 1 ? '-' : '')+'90deg) '+(rotated == 1 ? 'translate(calc(-100% + '+x+'px), '+y+'px)' : 'translate('+x+'px, calc(-100% + '+y+'px))');
2763 else if(x || y)
2764 return 'translate('+x+'px, '+y+'px)';
2765
2766 return '';
2767}
2768
2769//Turn the magnifying glass on and off
2770function activeMagnifyingGlass(active = null, gamepad = false, fromSwitch = false)

Callers 2

disposeImagesFunction · 0.85
fixBlurOnZoomFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected