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

Side by Side Diff: samples/swarm/SwarmViews.dart

Issue 12253011: Reapply remove setInterval. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « samples/swarm/App.dart ('k') | samples/swarm/Views.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 part of swarmlib; 5 part of swarmlib;
6 6
7 // TODO(jacobr): there is a lot of dead code in this class. Checking is as is 7 // TODO(jacobr): there is a lot of dead code in this class. Checking is as is
8 // and then doing a large pass to remove functionality that doesn't make sense 8 // and then doing a large pass to remove functionality that doesn't make sense
9 // given the UI layout. 9 // given the UI layout.
10 10
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 currentSection.dataSourceView.detachSubview(view.source); 162 currentSection.dataSourceView.detachSubview(view.source);
163 detachedView = view; 163 detachedView = view;
164 164
165 FxUtil.setPosition(view.node, newPosition); 165 FxUtil.setPosition(view.node, newPosition);
166 bottomView.addChild(view); 166 bottomView.addChild(view);
167 view.addClass('sel'); 167 view.addClass('sel');
168 currentSection.storyMode = true; 168 currentSection.storyMode = true;
169 169
170 // Create the new story view. 170 // Create the new story view.
171 storyView = new StoryContentView(swarm, item); 171 storyView = new StoryContentView(swarm, item);
172 window.setTimeout(() { 172 Timer.run(() {
173 _animateDataSourceToMinimized(); 173 _animateDataSourceToMinimized();
174 174
175 sliderMenu.addClass('hidden'); 175 sliderMenu.addClass('hidden');
176 // Make the fancy sliding into the window animation. 176 // Make the fancy sliding into the window animation.
177 window.setTimeout(() { 177 Timer.run(() {
178 storyView.addClass('hidden-story'); 178 storyView.addClass('hidden-story');
179 addChild(storyView); 179 addChild(storyView);
180 window.setTimeout(() { 180 Timer.run(() {
181 storyView.removeClass('hidden-story'); 181 storyView.removeClass('hidden-story');
182 }, 0); 182 });
183 headerView.endTransitionToStoryView(); 183 headerView.endTransitionToStoryView();
184 }, 0); 184 });
185 }, 0); 185 });
186 } 186 }
187 } 187 }
188 188
189 void _refreshMaximized() { 189 void _refreshMaximized() {
190 if (swarm.state.storyMaximized.value) { 190 if (swarm.state.storyMaximized.value) {
191 _animateDataSourceToMaximized(); 191 _animateDataSourceToMaximized();
192 } else { 192 } else {
193 _animateDataSourceToMinimized(); 193 _animateDataSourceToMinimized();
194 } 194 }
195 } 195 }
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 * [Feed]. 963 * [Feed].
964 */ 964 */
965 DataSourceView findView(Feed dataSource) { 965 DataSourceView findView(Feed dataSource) {
966 return dataSourceView.getSubview(dataSourceView.findIndex(dataSource)); 966 return dataSourceView.getSubview(dataSourceView.findIndex(dataSource));
967 } 967 }
968 968
969 bool inCurrentView(Article article) { 969 bool inCurrentView(Article article) {
970 return dataSourceView.findIndex(article.dataSource) != null; 970 return dataSourceView.findIndex(article.dataSource) != null;
971 } 971 }
972 } 972 }
OLDNEW
« no previous file with comments | « samples/swarm/App.dart ('k') | samples/swarm/Views.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698