OLD | NEW |
1 <!-- | 1 <!-- |
2 // Copyright 2015 The Chromium Authors. All rights reserved. | 2 // Copyright 2015 The Chromium Authors. All rights reserved. |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 --> | 5 --> |
6 <import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" /> | 6 <import src="sky-element/sky-element.sky" as="SkyElement" /> |
7 <import src="/sky/framework/fling-curve.sky" as="FlingCurve" /> | 7 <import src="fling-curve.sky" as="FlingCurve" /> |
8 | 8 |
9 <sky-element | 9 <sky-element |
10 name="sky-scrollable" | 10 name="sky-scrollable" |
11 on-gesturescrollstart="handleScrollStart_" | 11 on-gesturescrollstart="handleScrollStart_" |
12 on-gesturescrollend="handleScrollEnd_" | 12 on-gesturescrollend="handleScrollEnd_" |
13 on-gesturescrollupdate="handleScrollUpdate_" | 13 on-gesturescrollupdate="handleScrollUpdate_" |
14 on-gestureflingstart="handleFlingStart_" | 14 on-gestureflingstart="handleFlingStart_" |
15 on-gestureflingcancel="handleFlingCancel_" | 15 on-gestureflingcancel="handleFlingCancel_" |
16 on-wheel="handleWheel_"> | 16 on-wheel="handleWheel_"> |
17 <template> | 17 <template> |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 handleFlingCancel_(event) { | 122 handleFlingCancel_(event) { |
123 this.stopFling_(); | 123 this.stopFling_(); |
124 } | 124 } |
125 | 125 |
126 handleWheel_(event) { | 126 handleWheel_(event) { |
127 this.scrollBy(-event.offsetY); | 127 this.scrollBy(-event.offsetY); |
128 } | 128 } |
129 }.register(); | 129 }.register(); |
130 </script> | 130 </script> |
131 </sky-element> | 131 </sky-element> |
OLD | NEW |