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)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS
{ | 7 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS
{ |
8 | 8 |
9 factory WheelEvent(String type, | 9 factory WheelEvent(String type, |
10 {Window view, num deltaX: 0, num deltaY: 0, num deltaZ: 0, | 10 {Window view, num deltaX: 0, num deltaY: 0, num deltaZ: 0, |
(...skipping 17 matching lines...) Expand all Loading... |
28 'button': button, | 28 'button': button, |
29 'bubbles': canBubble, | 29 'bubbles': canBubble, |
30 'cancelable': cancelable, | 30 'cancelable': cancelable, |
31 'ctrlKey': ctrlKey, | 31 'ctrlKey': ctrlKey, |
32 'altKey': altKey, | 32 'altKey': altKey, |
33 'shiftKey': shiftKey, | 33 'shiftKey': shiftKey, |
34 'metaKey': metaKey, | 34 'metaKey': metaKey, |
35 'relatedTarget': relatedTarget, | 35 'relatedTarget': relatedTarget, |
36 }; | 36 }; |
37 | 37 |
38 $if DART2JS | |
39 if (view == null) { | 38 if (view == null) { |
40 view = window; | 39 view = window; |
41 } | 40 } |
42 | 41 |
43 return JS('WheelEvent', 'new WheelEvent(#, #)', | 42 return JS('WheelEvent', 'new WheelEvent(#, #)', |
44 type, convertDartToNative_Dictionary(options)); | 43 type, convertDartToNative_Dictionary(options)); |
45 | 44 |
46 $else | |
47 return _blink.BlinkWheelEvent.instance.constructorCallback_2_(type, convertD
artToNative_Dictionary(options)); | |
48 $endif | |
49 } | 45 } |
50 | 46 |
51 $!MEMBERS | 47 $!MEMBERS |
52 | 48 |
53 $if DART2JS | |
54 /** | 49 /** |
55 * The amount that is expected to scroll vertically, in units determined by | 50 * The amount that is expected to scroll vertically, in units determined by |
56 * [deltaMode]. | 51 * [deltaMode]. |
57 * | 52 * |
58 * See also: | 53 * See also: |
59 * | 54 * |
60 * * [WheelEvent.deltaY](http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html
/DOM3-Events.html#events-WheelEvent-deltaY) from the W3C. | 55 * * [WheelEvent.deltaY](http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html
/DOM3-Events.html#events-WheelEvent-deltaY) from the W3C. |
61 */ | 56 */ |
62 @DomName('WheelEvent.deltaY') | 57 @DomName('WheelEvent.deltaY') |
63 num get deltaY { | 58 num get deltaY { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 int clientX, | 131 int clientX, |
137 int clientY, | 132 int clientY, |
138 int button, | 133 int button, |
139 EventTarget relatedTarget, | 134 EventTarget relatedTarget, |
140 String modifiersList, | 135 String modifiersList, |
141 int deltaX, | 136 int deltaX, |
142 int deltaY, | 137 int deltaY, |
143 int deltaZ, | 138 int deltaZ, |
144 int deltaMode) native; | 139 int deltaMode) native; |
145 | 140 |
146 $else | |
147 /** | |
148 * The amount that is expected to scroll horizontally, in units determined by | |
149 * [deltaMode]. | |
150 * | |
151 * See also: | |
152 * | |
153 * * [WheelEvent.deltaX](http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html
/DOM3-Events.html#events-WheelEvent-deltaX) from the W3C. | |
154 */ | |
155 @DomName('WheelEvent.deltaX') | |
156 num get deltaX => _deltaX; | |
157 | |
158 /** | |
159 * The amount that is expected to scroll vertically, in units determined by | |
160 * [deltaMode]. | |
161 * | |
162 * See also: | |
163 * | |
164 * * [WheelEvent.deltaY](http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html
/DOM3-Events.html#events-WheelEvent-deltaY) from the W3C. | |
165 */ | |
166 @DomName('WheelEvent.deltaY') | |
167 num get deltaY => _deltaY; | |
168 $endif | |
169 } | 141 } |
OLD | NEW |