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

Side by Side Diff: client/touch/Scrollbar.dart

Issue 8404013: Add constructors to all the event classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Regenerate release/html. Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « client/touch/EventUtil.dart ('k') | client/touch/Scroller.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 /** 5 /**
6 * Implementation of a scrollbar for the custom scrolling behavior 6 * Implementation of a scrollbar for the custom scrolling behavior
7 * defined in [:Scroller:]. 7 * defined in [:Scroller:].
8 */ 8 */
9 class Scrollbar implements ScrollListener { 9 class Scrollbar implements ScrollListener {
10 /** 10 /**
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 } 213 }
214 _scroller.setPosition(x, y); 214 _scroller.setPosition(x, y);
215 } 215 }
216 _currentScrollStartMouse = coordinate; 216 _currentScrollStartMouse = coordinate;
217 } 217 }
218 218
219 void _onEnd(UIEvent e) { 219 void _onEnd(UIEvent e) {
220 _scrollBarDragInProgress = false; 220 _scrollBarDragInProgress = false;
221 // TODO(jacobr): make scrollbar less tightly coupled to the scroller. 221 // TODO(jacobr): make scrollbar less tightly coupled to the scroller.
222 _scroller.onScrollerDragEnd.dispatch( 222 _scroller.onScrollerDragEnd.dispatch(
223 EventUtil.createEvent(ScrollerEventType.DRAG_END)); 223 new Event(ScrollerEventType.DRAG_END));
224 } 224 }
225 225
226 226
227 /** 227 /**
228 * When scrolling ends, schedule a timeout to hide the scrollbars. 228 * When scrolling ends, schedule a timeout to hide the scrollbars.
229 */ 229 */
230 void _onScrollerEnd(Event e) { 230 void _onScrollerEnd(Event e) {
231 _cancelTimeout(); 231 _cancelTimeout();
232 _timerId = window.setTimeout(_boundHideFn, _DISPLAY_TIME); 232 _timerId = window.setTimeout(_boundHideFn, _DISPLAY_TIME);
233 _scrollInProgress = false; 233 _scrollInProgress = false;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 style.setProperty(cssPos, '${pos}px', ''); 341 style.setProperty(cssPos, '${pos}px', '');
342 if (_cachedSize[cssSize] != size) { 342 if (_cachedSize[cssSize] != size) {
343 _cachedSize[cssSize] = size; 343 _cachedSize[cssSize] = size;
344 style.setProperty(cssSize, '${size}px', ''); 344 style.setProperty(cssSize, '${size}px', '');
345 } 345 }
346 if (element.parent == null) { 346 if (element.parent == null) {
347 _frame.nodes.add(element); 347 _frame.nodes.add(element);
348 } 348 }
349 } 349 }
350 } 350 }
OLDNEW
« no previous file with comments | « client/touch/EventUtil.dart ('k') | client/touch/Scroller.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698