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

Side by Side Diff: sky/specs/gestures.md

Issue 940593003: Specs: clean up the last remaining mentions of documents (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | sky/specs/markup.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Gestures 1 Gestures
2 ======== 2 ========
3 3
4 ```dart 4 ```dart
5 SKY MODULE 5 SKY MODULE
6 <!-- part of dart:sky --> 6 <!-- part of dart:sky -->
7 7
8 <script> 8 <script>
9 abstract class GestureEvent extends Event { 9 abstract class GestureEvent extends Event {
10 Gesture _gesture; 10 Gesture _gesture;
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 return new PointerState(gestures: source.gestures, chosen: source.chosen); 163 return new PointerState(gestures: source.gestures, chosen: source.chosen);
164 } 164 }
165 @nonnull List<@nonnull Gesture> gestures; 165 @nonnull List<@nonnull Gesture> gestures;
166 @nonnull bool chosen = false; 166 @nonnull bool chosen = false;
167 } 167 }
168 168
169 class GestureManager { 169 class GestureManager {
170 GestureManager(this.target) { 170 GestureManager(this.target) {
171 target.events.where((event) => event is PointerDownEvent).listen(_handler); 171 target.events.where((event) => event is PointerDownEvent).listen(_handler);
172 } 172 }
173 final @nonnull EventTarget target; // usually the ApplicationDocument object 173 final @nonnull EventTarget target; // usually the ApplicationRoot object
174 174
175 Map<@nonnull int, @nonnull PointerState> _pointers = new SplayTreeMap<int, Poi nterState>(); 175 Map<@nonnull int, @nonnull PointerState> _pointers = new SplayTreeMap<int, Poi nterState>();
176 176
177 void addGesture(@nonnull PointerEvent event, @nonnull Gesture gesture) { 177 void addGesture(@nonnull PointerEvent event, @nonnull Gesture gesture) {
178 assert(gesture.active); 178 assert(gesture.active);
179 var pointer = event.pointer; 179 var pointer = event.pointer;
180 if (_pointers.containsKey(pointer)) { 180 if (_pointers.containsKey(pointer)) {
181 assert(!_pointers[pointer].gestures.contains(gesture)); 181 assert(!_pointers[pointer].gestures.contains(gesture));
182 if (_pointers[pointer].chosen) 182 if (_pointers[pointer].chosen)
183 cancelGesture(gesture); 183 cancelGesture(gesture);
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 // fling-end: cancel(), or after fling or fling-cancel (prechoose) 421 // fling-end: cancel(), or after fling or fling-cancel (prechoose)
422 } 422 }
423 423
424 class FlingLeftGesture : FlingGesture { } 424 class FlingLeftGesture : FlingGesture { }
425 class FlingRightGesture : FlingGesture { } 425 class FlingRightGesture : FlingGesture { }
426 class FlingUpGesture : FlingGesture { } 426 class FlingUpGesture : FlingGesture { }
427 class FlingDownGesture : FlingGesture { } 427 class FlingDownGesture : FlingGesture { }
428 428
429 </script> 429 </script>
430 ``` 430 ```
OLDNEW
« no previous file with comments | « no previous file | sky/specs/markup.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698