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

Unified Diff: samples/swarm/SwarmViews.dart

Issue 10544076: Changes to run Swarm from the Editor and to suppress warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean up a constructor Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/swarm/DataSource.dart ('k') | samples/swarm/UIState.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/swarm/SwarmViews.dart
diff --git a/samples/swarm/SwarmViews.dart b/samples/swarm/SwarmViews.dart
index 1ec0522f22385aaa0a1692ec7583c3314a6371a2..5840b3234bad68722cb4670d31f5e239d62d56a3 100644
--- a/samples/swarm/SwarmViews.dart
+++ b/samples/swarm/SwarmViews.dart
@@ -235,7 +235,7 @@ class FrontView extends CompositeView {
void _onSectionSelected(String sectionTitle) {
final section = swarm.sections.findSection(sectionTitle);
// Find the view for this section.
- for (final view in sections.childViews) {
+ for (SectionView view in sections.childViews) {
if (view.section == section) {
// Have the conveyor show it.
sections.selectView(view);
@@ -810,10 +810,10 @@ class ArticleView extends View {
String getDataUriForImage(final img) {
// TODO(hiltonc,jimhug) eval perf of this vs. reusing one canvas element
- final canvas = new Element.html(
- '<canvas width="${img.width}" height="${img.height}"></canvas>');
+ final CanvasElement canvas = new CanvasElement(
+ height: img.height, width: img.width);
- final ctx = canvas.getContext("2d");
+ final CanvasRenderingContext2D ctx = canvas.getContext("2d");
ctx.drawImage(img, 0, 0, img.width, img.height);
return canvas.toDataURL("image/png");
@@ -862,7 +862,7 @@ class StoryContentView extends View {
// Modify all links to open in new windows....
// TODO(jacobr): would it be better to add an event listener on click that
// intercepts these instead?
- for (final anchor in storyContent.queryAll('a')) {
+ for (AnchorElement anchor in storyContent.queryAll('a')) {
anchor.target = '_blank';
}
« no previous file with comments | « samples/swarm/DataSource.dart ('k') | samples/swarm/UIState.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698