electron/atom
Ben Gotow bd2252ea55 Extend NativeWindow to track touch-based scroll events on OS X
In N1, we want to implement the famous "swipe to archive" action on threads in the user's inbox. Chrome exposes `scroll` and `wheel` events, but these aren't sufficient to implement the interaction because the element needs to "snap" when the user lifts their fingers from the trackpad, not when they / we stop receiving `wheel` / `scroll` events. These events may stop before the user lifts their fingers, or continue after the user has lifted their fingers if they had enough momentum for the gesture to continue.

This exposes BrowserWindow `scroll-touch-down` and `scroll-touch-up`, which fire immeditaely when the user touches two fingers to the trackpad, and again when the user lifts their fingers. Combined with the existing wheel event should allow for "swipe-to-archive" and other similar interactions.

Note: This is only implemented on Mac OS X and the events don't fire unless you're using a trackpad!

Related: #1486, #2683, https://github.com/nylas/N1/issues/541
2016-01-21 09:40:21 -08:00
..
app Remove unneeded extra semicolons (;; -> ;) 2016-01-11 02:11:40 +02:00
browser Extend NativeWindow to track touch-based scroll events on OS X 2016-01-21 09:40:21 -08:00
common e -> error 2016-01-21 09:32:21 -07:00
renderer Clean up semicolon lint errors 2016-01-21 09:32:21 -07:00
utility Remove trailing whitespace 2016-01-20 09:43:32 -07:00