Issues: 1)
a) LzSprite#1534, ff. It seems to me that if you get a multi-touch gesture (touches.length > 1) you want to _not_ prevent the default, and return `true` so that the browser will implement the default behavior (e.g., scroll or zoom) and that this should happen before we simulate mouseover and mousemove. b) Similarly, for touchend if (touches.length > 0), which would mean that you lifted some fingers from a multi-touch. Another way of looking at it is that we only want to simulate the mouse on single-finger gestures. c) Similarly for LzMouseKernel 2) Why no handling of touchstart in LzMouseKernel? 3) The way I read the documentation, you should look at changedTouches to get the position for a touchmove. 4) Don't we need to similarly fetch the position of the correct touch for the other simulated mouse events? I.e., do we expect to know the coordinates of over/down/up/out/click? Comments: 1) Overall this seems like a step in the right direction. I can fiddle with LzPix, drag pictures, move the slider, etc. 2) Dragging is rather jerky and slow. I wonder if there is anything we can do to optimize that? 3) Somehow I managed to start drawing a group-select rectangle in LzPix and never could get rid of it. Every time I dragged after that, it would make a new group selection, but I couldn't do anything with it. 4) I expected to still be able to pinch-zoom over the app, and I can't seem to. Perhaps that is related to issue #1? On 2010-05-01, at 00:10, Max Carlson wrote: > Change 20100430-maxcarlson-O by [email protected] on 2010-04-30 > 18:15:26 PDT > in /Users/maxcarlson/openlaszlo/trunk-clean > for http://svn.openlaszlo.org/openlaszlo/trunk > > Summary: Add support for touch devices > > Bugs Fixed: LPP-8904 - Support touch and gesture events > > Technical Reviewer: ptw > QA Reviewer: hminsky > > Details: LzSprite - Add touchevents capability, set to true for > iphone/android. Reorganize __setClickable() to register/unregister for > touchstart/move/end events when capabilities.touchevents is true, clean up > IE-specific event registration. __mouseEvent() sends > onmousedown/over/up/out/click events for touchevents. > > LzMouseKernel - When touchevents is true, listen for global touchend events, > and look at the position of the first finger to find the global mouse > position. > > embednew - Add iPad and Android browser detection, set appropriate default > flags. Shorten lookups, simplify getAbsolutePosition() for Safari. > > Tests: LzPix dhtml now allows dragging on iPad, iPhone, Android and runs as > before in Safari and other browsers. > > Files: > M WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js > M WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js > M lps/includes/source/embednew.js > > Changeset: > http://svn.openlaszlo.org/openlaszlo/patches/20100430-maxcarlson-O.tar >
