Rotation other than 90°

45 views
Skip to first unread message

Martin

unread,
May 4, 2015, 7:27:25 AM5/4/15
to jquery-g...@googlegroups.com
Hi,

first: great plugin - I like it a lot!

I tried to rotate the picture in an other angle than 90°

I changed the source like this:


to 
return unless angle isnt 0 and angle % 5 is 0

and


to
rotateLeft: -> @enabled and (@_rotate(-5); @_trigger('rotateLeft'))
rotateRight: -> @enabled and (@_rotate(5); @_trigger('rotateRight'))

but the image gets distorted in some angels.

Do you've got a solution for that ?

Thanks a lot!
Martin

mgag....@gmail.com

unread,
May 5, 2015, 3:50:38 PM5/5/15
to jquery-g...@googlegroups.com
Hi, Martin. Good to see people not only using Guillotine but also extending it.

Unfortunately, the strict 90° rotation design was on purpose. The aim of the plugin is to crop images to a restricted area (the window or guillotine) and allowing other angles makes it very cumbersome to check and fit the image to avoid blank spaces (spaces with no image inside the guillotine).

Although not impossible, adding this feature would result in a lot of extra code and in a heavy plugin. The point here is to keep it lightweight and simple, and not necessarily address every use case.

If fine grained rotation is a 'must' for your implementation then Guillotine isn't the right tool, other more complex plugins might make like easier implementing this.

Sorry for not being more helpful.
Reply all
Reply to author
Forward
0 new messages