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

Side by Side Diff: samples/word-finder/web/word_finder_element.dart

Issue 27618002: package:observe fix various api issues (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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/tracker/web/tracker_app.dart ('k') | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library word_finder.web.word_finder_element; 5 library word_finder.web.word_finder_element;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'dart:async'; 8 import 'dart:async';
9 import 'package:polymer/polymer.dart'; 9 import 'package:polymer/polymer.dart';
10 10
11 @CustomTag('word-finder-element') 11 @CustomTag('word-finder-element')
12 class WordFinderElement extends PolymerElement with ObservableMixin { 12 class WordFinderElement extends PolymerElement with Observable {
13 bool get applyAuthorStyles => true; 13 bool get applyAuthorStyles => true;
14 14
15 @observable List<String> charsList = toObservable( 15 @observable List<String> charsList = toObservable(
16 ['A', 'E', 'L', 'S', 'T', '']); 16 ['A', 'E', 'L', 'S', 'T', '']);
17 17
18 List<String> possibleWords = toObservable([ 18 List<String> possibleWords = toObservable([
19 'LEAST', 'SETAL', 'SLATE', 'STALE', 'STEAL', 'STELA', 'TAELS', 'TALES', 19 'LEAST', 'SETAL', 'SLATE', 'STALE', 'STEAL', 'STELA', 'TAELS', 'TALES',
20 'TEALS', 'TESLA', 'AE', 'AL', 'AS', 'AT', 'EL', 'ES', 'ET', 'LA', 'TA', 20 'TEALS', 'TESLA', 'AE', 'AL', 'AS', 'AT', 'EL', 'ES', 'ET', 'LA', 'TA',
21 'ALE', 'ALS', 'ALT', 'ATE', 'EAT', 'ELS', 'ETA', 'LAS', 'LAT', 'LEA', 21 'ALE', 'ALS', 'ALT', 'ATE', 'EAT', 'ELS', 'ETA', 'LAS', 'LAT', 'LEA',
22 'LES', 'LET', 'SAE', 'SAL', 'SAT', 'SEA', 'SEL', 'SET', 'TAE', 'TAS', 22 'LES', 'LET', 'SAE', 'SAL', 'SAT', 'SEA', 'SEL', 'SET', 'TAE', 'TAS',
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 104 }
105 } 105 }
106 } 106 }
107 107
108 void _swapChars() { 108 void _swapChars() {
109 var temp = charsList[sourceElementIndex]; 109 var temp = charsList[sourceElementIndex];
110 charsList[sourceElementIndex] = charsList[targetElementIndex]; 110 charsList[sourceElementIndex] = charsList[targetElementIndex];
111 charsList[targetElementIndex] = temp; 111 charsList[targetElementIndex] = temp;
112 } 112 }
113 } 113 }
OLDNEW
« no previous file with comments | « samples/tracker/web/tracker_app.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698