meltingice/CamanJS-Plugins — pull request #6 by eflynch (2014-07-17 21:53:37+00:00)
Title: Added to new rotation plugins that are have more intuitive behavior

I was pretty confused by the existing rotation plugin. It makes sense of 90º rotations, but for anything else, it makes a box thats big enough to house the new image but then doesn't render it in the center. I wasn't sure if preserving the behavior of the original is important or not, so my changes add two new rotation plugins. The first, rotateSquareBox, behaves just like the original should (I think) for non 90º rotations, and for 90º rotations keeps the square-box behavior for consistency. The second, rotateBoundingBox, makes a canvas exactly as big as required to house the rotation and no larger, therefore it behaves like the original for 90º rotations and has a more intuitive behavior for other rotations.