publiclab/ImageDistortLeaflet — pull request #3 by manleyjster (2014-12-13 21:10:43+00:00)
Title: Refactoring

### !! [Not ready to be merged]

### In this update
* Separate the code for displaying distorted images from UI code handling interactions.
* Add some simple tests for matrix calculations and calculations on the distorted image (i.e. calculating its centroid).
* Fix zooming so that the image scales smoothly during zoom (fixes jerky image refresh at the end of zoom animation).
* Implement rotation as an additional CSS transform rather than calculating modified corner points using `Math.cos` and `Math.sin`.

Note that this update breaks *all* of the interaction functionality that Jeff has built. :(. It seems like a step backwards - but it's a good thing, I promise! The codebase is going to be better for this refactoring.

### To Do
* Pull in `EditHandle`, `RotateHandle`, `DragHandle` from `Leaflet.Illustrate`, either by copy-and-pasting, or by including `Leaflet.Illustrate` as a dependency.
* Integrate editing handles into `L.DistortableImage.Edit` (for handling dragging, rotating, distorting interactions)
* Integrate all of Jeff's other features - transparency, bring-to-front, etc.