OLD | NEW |
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="shadow.sky" as="shadow" /> | 6 <import src="shadow.sky" as="shadow" /> |
7 <import src="sky-element.sky" /> | 7 <import src="sky-element.sky" /> |
8 <import src="sky-scrollable.sky" /> | 8 <import src="sky-scrollable.sky" /> |
9 | 9 |
10 <sky-element attributes="level:number"> | 10 <sky-element attributes="level:number"> |
(...skipping 18 matching lines...) Expand all Loading... |
29 left: 0; | 29 left: 0; |
30 bottom: 0; | 30 bottom: 0; |
31 } | 31 } |
32 </style> | 32 </style> |
33 <div id="mask" /> | 33 <div id="mask" /> |
34 <div id="content"> | 34 <div id="content"> |
35 <content/> | 35 <content/> |
36 </div> | 36 </div> |
37 </template> | 37 </template> |
38 <script> | 38 <script> |
39 import "../animation/controller.dart"; | |
40 import "../animation/curves.dart"; | 39 import "../animation/curves.dart"; |
41 import "../animation/timer.dart"; | 40 import "../animation/timer.dart"; |
| 41 import "animation/controller.dart"; |
42 import "dart:math" as math; | 42 import "dart:math" as math; |
43 import "dart:sky"; | 43 import "dart:sky"; |
44 | 44 |
45 const double _kWidth = 256.0; | 45 const double _kWidth = 256.0; |
46 const double _kMinFlingVelocity = 0.4; | 46 const double _kMinFlingVelocity = 0.4; |
47 const double _kMinAnimationDurationMS = 246.0; | 47 const double _kMinAnimationDurationMS = 246.0; |
48 const double _kMaxAnimationDurationMS = 600.0; | 48 const double _kMaxAnimationDurationMS = 600.0; |
49 const Cubic _kAnimationCurve = easeOut; | 49 const Cubic _kAnimationCurve = easeOut; |
50 | 50 |
51 @Tagname('sky-drawer') | 51 @Tagname('sky-drawer') |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 begin: currentPosition, | 157 begin: currentPosition, |
158 end: targetPosition, | 158 end: targetPosition, |
159 duration: duration, | 159 duration: duration, |
160 curve: linear); | 160 curve: linear); |
161 } | 161 } |
162 } | 162 } |
163 | 163 |
164 _init(script) => register(script, SkyDrawer); | 164 _init(script) => register(script, SkyDrawer); |
165 </script> | 165 </script> |
166 </sky-element> | 166 </sky-element> |
OLD | NEW |