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

Unified Diff: samples/calculator/calculator.dart

Issue 10399010: Fixed breakage in template utility now that statics aren't inherited. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix to calculator and template UI tests. Created 8 years, 7 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 | « no previous file | utils/template/codegen.dart » ('j') | utils/template/uitest.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/calculator/calculator.dart
diff --git a/samples/calculator/calculator.dart b/samples/calculator/calculator.dart
index 65bdbdc344335fb9239e1bf69d079befd23e4a73..bc83e2ff427f5aab9c89a99a31e32474714d1887 100644
--- a/samples/calculator/calculator.dart
+++ b/samples/calculator/calculator.dart
@@ -71,13 +71,18 @@ void setupEvents() {
document.on.keyUp.add((e) {
processKeyEvent(e);
});
-
+
document.on.click.add((MouseEvent e) {
+ bool wasOpened = mySettings.isOpen;
+
// If settings dialog is open close it.
mySettings.close(e);
renderPad(document.body.elements.last());
- addPadEvents();
+ if (wasOpened) {
+ removePadEvents();
+ addPadEvents();
+ }
});
}
@@ -362,7 +367,7 @@ void main() {
// Create our Tape UI.
tapeUI = new TapeUI();
element.elements.add(tapeUI.root);
-
+
// Create our tape controller.
tape = new Tape();
« no previous file with comments | « no previous file | utils/template/codegen.dart » ('j') | utils/template/uitest.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698