JavaScript drag and drop, resizing and multi-touch gestures with inertia and snapping