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-element.sky" /> | 6 <import src="sky-element.sky" /> |
7 | 7 |
8 <sky-element> | 8 <sky-element> |
9 <template> | 9 <template> |
10 <style> | 10 <style> |
11 :host { | 11 :host { |
12 overflow: hidden; | 12 overflow: hidden; |
13 position: relative; | 13 position: relative; |
| 14 will-change: transform; |
14 } | 15 } |
15 #scrollable { | 16 #scrollable { |
16 will-change: transform; | 17 will-change: transform; |
17 } | 18 } |
18 #vbar { | 19 #vbar { |
19 position: absolute; | 20 position: absolute; |
20 right: 0; | 21 right: 0; |
21 width: 3px; | 22 width: 3px; |
22 background-color: lightgray; | 23 background-color: lightgray; |
23 pointer-events: none; | 24 pointer-events: none; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 } | 128 } |
128 | 129 |
129 void _handleWheel(WheelEvent event) { | 130 void _handleWheel(WheelEvent event) { |
130 scrollBy(-event.offsetY); | 131 scrollBy(-event.offsetY); |
131 } | 132 } |
132 } | 133 } |
133 | 134 |
134 _init(script) => register(script, SkyScrollable); | 135 _init(script) => register(script, SkyScrollable); |
135 </script> | 136 </script> |
136 </sky-element> | 137 </sky-element> |
OLD | NEW |