Index: samples/solar/solar.dart |
diff --git a/samples/solar/solar.dart b/samples/solar/solar.dart |
index 36bf1d6a22b71a21eff339f887a6a78bf6616c12..59a490d7fa031ffb84298156b3461dc420b68525 100644 |
--- a/samples/solar/solar.dart |
+++ b/samples/solar/solar.dart |
@@ -69,9 +69,9 @@ class SolarSystem { |
start() { |
// Measure the canvas element. |
- canvas.parent.rect.then((ElementRect rect) { |
- _width = rect.client.width; |
- _height = rect.client.height; |
+ window.requestLayoutFrame(() { |
+ _width = canvas.parent.clientWidth; |
+ _height = canvas.parent.clientHeight; |
canvas.width = _width; |