croptool
croptool copied to clipboard
allow user to hold shift while cropping to crop proportionally
shift for advanced, users and perhaps a checkbox that is more visible for user who aren't familiar with this convention in graphics applications
Agree that would be nice to have
Had a quick look at this, and it doesn't seem straightforward to implement.
We could listen to keydown and keyup (like suggested in https://github.com/tapmodo/Jcrop/pull/18), but there's two problems:
- If JCrop has focus, JCrop will eat the shift keydown event itself, so it won't bubble down.
- We will only be able to catch the keydown event when the window has focus. The user might very well press down the shift key while focus is on something else.
- The best way to check if shift key is pressed is probably to check the
event.shiftKeyproperty on themousedownevent.But then we need a layer in front of JCrop to handle this event before letting it bubble down to JCrop.But that seems quite hard to implement in a somewhat clean way without modifying JCrop.
- The best way to check if shift key is pressed is probably to check the