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

Unified Diff: samples/clock/numbers.dart

Issue 11367040: Removing Element.rect. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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
Index: samples/clock/numbers.dart
diff --git a/samples/clock/numbers.dart b/samples/clock/numbers.dart
index 19132478d3de596b4a9d08ce5071d5c17f3cc5fb..dda328f5a420222bffaed43f2ca3fa1b0f8eea75 100644
--- a/samples/clock/numbers.dart
+++ b/samples/clock/numbers.dart
@@ -43,9 +43,10 @@ class ClockNumber {
if (pixels != null) {
if ((pixels[y][x] != 0) && (px[y][x] == 0)) {
- img.rect.then((ElementRect r) {
- double absx = r.bounding.left;
- double absy = r.bounding.top;
+ window.requestLayoutFrame(() {
+ var r = img.getBoundingClientRect();
+ double absx = r.left;
+ double absy = r.top;
app.balls.add(absx, absy, ballColor);
});

Powered by Google App Engine
This is Rietveld 408576698