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

Side by Side Diff: sky/framework/sky-drawer.sky

Issue 948073002: Fix typos in sky-drawer and sky-scrollable (Closed) Base URL: git@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 | « sky/framework/fling-curve.dart ('k') | sky/framework/sky-scrollable.sky » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <import src="sky-scrollable.sky" /> 7 <import src="sky-scrollable.sky" />
8 8
9 <sky-element> 9 <sky-element>
10 <template> 10 <template>
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 _animation = new AnimationController(this); 57 _animation = new AnimationController(this);
58 58
59 addEventListener('pointerdown', _handlePointerDown); 59 addEventListener('pointerdown', _handlePointerDown);
60 addEventListener('pointermove', _handlePointerMove); 60 addEventListener('pointermove', _handlePointerMove);
61 addEventListener('pointerup', _handlePointerUp); 61 addEventListener('pointerup', _handlePointerUp);
62 addEventListener('pointercancel', _handlePointerCancel); 62 addEventListener('pointercancel', _handlePointerCancel);
63 } 63 }
64 64
65 void shadowRootReady() { 65 void shadowRootReady() {
66 _mask = shadowRoot.getElementById('mask'); 66 _mask = shadowRoot.getElementById('mask');
67 _mask.addEventListener('click', _handleMaskClick); 67 _mask.addEventListener('gesturetap', _handleMaskTap);
68 _content = shadowRoot.getElementById('content'); 68 _content = shadowRoot.getElementById('content');
69 _content.addEventListener('gestureflingstart', _handleFlingStart); 69 _content.addEventListener('gestureflingstart', _handleFlingStart);
70 position = -_kWidth; 70 position = -_kWidth;
71 } 71 }
72 72
73 void toggle() { 73 void toggle() {
74 if (isMostlyClosed) 74 if (isMostlyClosed)
75 open(); 75 open();
76 else 76 else
77 close(); 77 close();
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 begin: currentPosition, 112 begin: currentPosition,
113 end: targetPosition, 113 end: targetPosition,
114 duration: math.max(_kMinAnimationDurationMS, duration), 114 duration: math.max(_kMinAnimationDurationMS, duration),
115 curve: _kAnimationCurve); 115 curve: _kAnimationCurve);
116 } 116 }
117 117
118 void updateAnimation(double p) { 118 void updateAnimation(double p) {
119 position = p; 119 position = p;
120 } 120 }
121 121
122 void _handleMaskClick(_) { 122 void _handleMaskTap(_) {
123 close(); 123 close();
124 } 124 }
125 125
126 void _handlePointerDown(_) { 126 void _handlePointerDown(_) {
127 _animation.stop(); 127 _animation.stop();
128 } 128 }
129 129
130 void _handlePointerMove(PointerEvent event) { 130 void _handlePointerMove(PointerEvent event) {
131 position += event.dx; 131 position += event.dx;
132 } 132 }
(...skipping 21 matching lines...) Expand all
154 begin: currentPosition, 154 begin: currentPosition,
155 end: targetPosition, 155 end: targetPosition,
156 duration: duration, 156 duration: duration,
157 curve: linear); 157 curve: linear);
158 } 158 }
159 } 159 }
160 160
161 _init(script) => register(script, SkyDrawer); 161 _init(script) => register(script, SkyDrawer);
162 </script> 162 </script>
163 </sky-element> 163 </sky-element>
OLDNEW
« no previous file with comments | « sky/framework/fling-curve.dart ('k') | sky/framework/sky-scrollable.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698