Gestures for Hyperapp
See original GitHub issueSo… I’ve been doing mobile web dev since 2005. Ugh, them were dark times. Then the iPhone launched in 2007 and things got better. As part of the many mobile projects that I’ve worked on, I’ve created a module that adds gestures using a jQuery-compatible interface that works identically on desktop and mobile. It provides the following gestures: tap (200 ms delay to allow the start of scrolling), long tap, double tap, swipe left, swipe right, swipe up and swipe down. Currently it weighs in at 2kb minified compared to HammerJS at 45kb minified. 😱 Considering that Hyperapp minified is only 4kb, MC Hammer gonna have take a hike. Would you guys be interested in a port of my gesture module so that it would work with Hyperapp? You could do an import and then maybe use it like this, I’m thinking:
<button onmousedown={actions.add}>+</button>
effects: {
// Define gesture and call to execute:
add _ => createGesture('tap', callback)
}
Interested to hear how you guys think that could/should be implemented.
Issue Analytics
- State:
- Created 7 years ago
- Comments:20 (17 by maintainers)
I just need something inline, same as current <button onclick='doStuff'>, except it will be something like: `<button onload=‘createEvent(“tap”, msg)’ or whatever.
Oh, you mean the lifecycle one? Ok, that’s basically the same as HTMLElement.onload then, right?