nicolas-t/Chocolat

Add buttons for rotating an image

mick9000 opened this issue · 1 comments

Two buttons

  • rotate left
  • rotate right

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

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