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

Unified Diff: samples/swipe/swipe.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/swipe/swipe.dart
diff --git a/samples/swipe/swipe.dart b/samples/swipe/swipe.dart
index 10e1cf82664b11f2b084b506e2331722560e39b5..c51c9b62049d5c803ac0c998383b16cc6f6d4351 100644
--- a/samples/swipe/swipe.dart
+++ b/samples/swipe/swipe.dart
@@ -73,8 +73,8 @@ void initialize3D() {
num childCount = target.elements.length;
- query("#target").rect.then((ElementRect r) {
- num width = r.client.width;
+ window.requestLayoutFrame(() {
+ num width = query("#target").clientWidth;
figureWidth = (width / 2) ~/ tan(PI / childCount);
target.style.transform = "translateZ(-${figureWidth}px)";

Powered by Google App Engine
This is Rietveld 408576698