rsantamaria/papercrop — pull request #20 by CyborgMaster (2014-03-09 07:01:56+00:00)
Title: Largest Aspect Ratio Constrained Initial selection

Right now the initial selection is constrain to 250x250 pixels in the upper left corner. This is really annoying if you have a very large image to crop (1920x1080) because then the drag handles are very small and close together.

This calculates an optimum initial select box based on the aspect ratio. It is the largest selection that with fit in the image, centered (either horizontally or vertically).

I also took the opportunity to speed up the update_crop function by running some of the selectors before hand, so we don't have to run them in the tight loop.