| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
| 6 | 6 |
| 7 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { | 7 $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| 8 | 8 |
| 9 factory WheelEvent(String type, | 9 factory WheelEvent(String type, |
| 10 {Window view, int deltaX: 0, int deltaY: 0, | 10 {Window view, int deltaX: 0, int deltaY: 0, |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 | 164 |
| 165 @DomName('WheelEvent.deltaMode') | 165 @DomName('WheelEvent.deltaMode') |
| 166 int get deltaMode { | 166 int get deltaMode { |
| 167 if (JS('bool', '!!(#.deltaMode)', this)) { | 167 if (JS('bool', '!!(#.deltaMode)', this)) { |
| 168 return JS('int', '#.deltaMode', this); | 168 return JS('int', '#.deltaMode', this); |
| 169 } | 169 } |
| 170 // If not available then we're poly-filling and doing pixel scroll. | 170 // If not available then we're poly-filling and doing pixel scroll. |
| 171 return 0; | 171 return 0; |
| 172 } | 172 } |
| 173 | 173 |
| 174 num get _deltaY => JS('num', '#.deltaY', this); | |
| 175 num get _deltaX => JS('num', '#.deltaX', this); | |
| 176 num get _wheelDelta => JS('num', '#.wheelDelta', this); | 174 num get _wheelDelta => JS('num', '#.wheelDelta', this); |
| 177 num get _wheelDeltaX => JS('num', '#.wheelDeltaX', this); | 175 num get _wheelDeltaX => JS('num', '#.wheelDeltaX', this); |
| 178 num get _detail => JS('num', '#.detail', this); | 176 num get _detail => JS('num', '#.detail', this); |
| 179 | 177 |
| 180 bool get _hasInitMouseScrollEvent => | 178 bool get _hasInitMouseScrollEvent => |
| 181 JS('bool', '!!(#.initMouseScrollEvent)', this); | 179 JS('bool', '!!(#.initMouseScrollEvent)', this); |
| 182 | 180 |
| 183 @JSName('initMouseScrollEvent') | 181 @JSName('initMouseScrollEvent') |
| 184 void _initMouseScrollEvent( | 182 void _initMouseScrollEvent( |
| 185 String type, | 183 String type, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 * [deltaMode]. | 235 * [deltaMode]. |
| 238 * | 236 * |
| 239 * See also: | 237 * See also: |
| 240 * | 238 * |
| 241 * * [WheelEvent.deltaY](http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html
/DOM3-Events.html#events-WheelEvent-deltaY) from the W3C. | 239 * * [WheelEvent.deltaY](http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html
/DOM3-Events.html#events-WheelEvent-deltaY) from the W3C. |
| 242 */ | 240 */ |
| 243 @DomName('WheelEvent.deltaY') | 241 @DomName('WheelEvent.deltaY') |
| 244 num get deltaY => _deltaY; | 242 num get deltaY => _deltaY; |
| 245 $endif | 243 $endif |
| 246 } | 244 } |
| OLD | NEW |