lokesh / lightbox2

THE original Lightbox script (v2).
http://lokeshdhakar.com/projects/lightbox2/
MIT License
6.22k stars 1.77k forks source link

Rotate Image #498

Closed tiagoboldt closed 8 years ago

tiagoboldt commented 8 years ago

I would very much appreciate if lightbox was able to rotate the image being overlayed. I can image it as being an option such as:

<script>
    lightbox.option({
      'enableRotation': true,
    })
</script>

The option would place two buttons, to rotate the image +90º and -90º. Your thoughts?

EDIT: someone has already tried to do this at http://jsfiddle.net/pootie/EBLc7/

Huberttao commented 8 years ago

What browser do you use

tiagoboldt commented 8 years ago

Chrome mostly, Firefox and Safari occasionally. But I fail to see the relevance of it.

Huberttao commented 8 years ago

You can use jquery.rotate and easily solve the rotation problem.Still do not know, I can send you the code.

lokesh commented 8 years ago

Looks like the linked jsfiddle does what you're looking for. The example could benefit from using css transforms to smooth out the animations but otherwise it works well!

This feature isn't requested enough to be in the main codebase though so I'm closing out this issue.