Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: sky/framework/sky-scrollable.sky

Issue 876853005: Add wheel support to sky-scrollable (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Add missing files Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/examples/example-scrollable.sky ('k') | sky/viewer/converters/input_event_types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/sky-scrollable.sky
diff --git a/sky/framework/sky-scrollable.sky b/sky/framework/sky-scrollable.sky
index 5adc6841d3e758adc15573abc3b74f5d28eb4517..33fe82822c33e712a741978d58e8f017c9a76c22 100644
--- a/sky/framework/sky-scrollable.sky
+++ b/sky/framework/sky-scrollable.sky
@@ -12,7 +12,8 @@
on-gesturescrollend="handleScrollEnd_"
on-gesturescrollupdate="handleScrollUpdate_"
on-gestureflingstart="handleFlingStart_"
- on-gestureflingcancel="handleFlingCancel_">
+ on-gestureflingcancel="handleFlingCancel_"
+ on-wheel="handleWheel_">
<template>
<style>
:host {
@@ -115,6 +116,10 @@ module.exports = class extends SkyElement {
handleFlingCancel_(event) {
this.stopFling_();
}
+
+ handleWheel_(event) {
+ this.scrollBy(-event.offsetY);
+ }
}.register();
</script>
</sky-element>
« no previous file with comments | « sky/examples/example-scrollable.sky ('k') | sky/viewer/converters/input_event_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698