Pinch Zoom and Viewports

I’ve written some code handling zooming in a view with pinch, inspired by the code of @Herwig (http://twolivesleft.com/Codea/Talk/discussion/550/zoom-library/p1). I rewrote it quite a bit to match my UI library and added support for snapping to boundaries and using tweens if you move outside of boundaries in X,Y or Zoom.

The left map view in the video is with boundaries, and the right view is without boundaries.

http://www.youtube.com/watch?v=IqRNT23v8iY

The code is available here, will probably make it a bit more documented later on.

https://gist.github.com/tnlogy/5024809

The code (if it works) will store a few images in documents when running.