Monday, July 14th, 2008
His ~100 lines of code uses the new CSS transforms handles all of the touch events: touchstart, touchmove, touchend, touchcancel with code such as:
In desktop browsers it uses the previous clicked location as a second â€œtouchâ€, so you can click a photo then click and drag another spot on the photo to resize and rotate (notice the yellow dot).
Clearly the reverse of this bridge would be even more useful, since iPhone only sends mouse events under specific conditions. The mousedown, mouseup, and mousemove events could be emulated using the touch equivalents to make certain web apps work on the iPhone without much additional work. Of course you would need to either cancel the default actions (i.e. panning and zooming) on touch events, or have some way to manage the interactions between them.
Posted by Dion Almaer at 8:17 am