nicolas-t / Chocolat

Chocolat : the lightbox so cool horses use it :horse:
http://chocolat.insipi.de
GNU General Public License v3.0
1.69k stars 170 forks source link

Add buttons for rotating an image #133

Closed mick9000 closed 2 years ago

mick9000 commented 2 years ago

Two buttons

Each image to be initialised with rotation = 0. This property is saved for each image. Rotating an image increments or decrements the rotation value and uses the CSS "transform" property to rotate the image.

Each button calls imageRotate(degrees) function rotate left is -90 degrees rotate right is +90 degrees

If rotation is +360 or -360, it is reset to 0

Going between next and previous image should remember the rotation of the image Rotating an image should also scale it to fit on the screen

nicolas-t commented 2 years ago

It's outside of the scope of this library, but you can implement it for yourself