Drag and Drop baby steps

2 views
Skip to first unread message

Joe Hewitt

unread,
Jul 2, 2007, 9:12:35 PM7/2/07
to iPhoneWebDev
Thanks to Tahoma Toelkes, we now know that the mousewheel event fires
when you do a two-finger vertical dragging motion on the phone. It
seems that this only works over certain elements, like textarea. It
also seems to work only for vertical dragging, not horizontal. Still,
it's a start! I've used this info to scratch my biggest iPhone itch,
which is to be able to drag and drop elements on a page.

Here is a very simple demo. Touch the blue box with your index finger
and middle finger and then drag it up and down in a precise vertical
line. It should move with your fingers. With the vertical
limitation, this still isn't very useful, but it's better than
nothing, right!

Try it yourself: http://www.joehewitt.com/files/dragger.html

- Joe

Jeffrey903

unread,
Jul 2, 2007, 9:42:36 PM7/2/07
to iPhoneWebDev
Wow. That is pretty sweet. I can imagine that we will see some
pretty amazing stuff come from this and also when other similar
gestures are discovered.

Glen Murphy

unread,
Jul 2, 2007, 10:47:31 PM7/2/07
to iPhoneWebDev
I worked on this today - it shows 2D scrolling deltas:
<http://glenmurphy.com/tmp/iphone.html>

a mousewheel event doesn't fire if you do purely horizontal scrolling,
but will fire for partially horizontal scrolling, so I just poll for
those changes.

Annoyingly, it doesn't look like you can send requests while scrolling
(if you do an XHR or SRC request in the event handler, they just queue
up until the scrolling is done - blech).

~ Glen

--
http://glenmurphy.com

Reply all
Reply to author
Forward
0 new messages