[dojo-contributors] Initial shape of dojo.touch + dojo.gesture - changes for next patch

Evan Huang evanhuangwei at gmail.com
Fri Mar 11 10:22:50 EST 2011

Yep, actually that was the 1st way being tried  e.g. by adding a
touch/gesture listener similar as dojo._event_listener with add() /
remove() / _fixCallback() / _fixEvent() etc. but that requires a bit
invasive changes - either hook in through the separate touch/gesture
file or insert a new section in event.js.

And this violates our original hope of not changing the existing core
code as possible.

- Evan

On Fri, Mar 11, 2011 at 12:48 PM, Kris Zyp <kzyp at dojotoolkit.org> wrote:
> Another suggestion on this, I believe in dojo/_base/event.js we are
> doing synthesis of mouseenter and mouseleave (for non-IE browsers). It
> might be nice if the event emulation in event.js was refactored to be
> consistent with whatever mechanism you use for press, move, and release
> events (or whatever you call them).
> Kris

> On 3/9/2011 5:37 PM, Evan Huang wrote:
>> So as agreed in today's IRC, we will make a bit changes based on the
>> 0.1 version,
>> 1. Don't do any magic mapping
>> 2. Use below new event names to avoid any conflicts with any existing
>> native mouse/touch usages
>>     - 'press, move, release' - these new events will work across devices
>>     - we'll still have chances to change the naming if come up with better ones
>> 3. If a widget want to support gesture, it simply requires
>> dojo.gesture(which auto requires dojo.touch), and use the standard new
>> event name:
>>     - dojo.connect(n, 'press | move | release', callback)
>>     - dojo.connect(n, 'tap | swipe | ...', callback)
>> We will try how it works by experimenting on Slider(dnd) and hopefully
>> we won't need to struggle with auto mapping anymore
>> - Evan

More information about the dojo-contributors mailing list