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

Unified Diff: sdk/lib/_internal/compiler/samples/leap/leap_leg.dart

Issue 11748016: Make ~/, round, ceil, floor, truncate return ints. Remove toInt. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Checked mode fixes. Created 7 years, 12 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
Index: sdk/lib/_internal/compiler/samples/leap/leap_leg.dart
diff --git a/sdk/lib/_internal/compiler/samples/leap/leap_leg.dart b/sdk/lib/_internal/compiler/samples/leap/leap_leg.dart
index c04f674e6e373f77fde2d7f8bbe544b675f9ef9f..f03a131e8f54bfdb67f532306192f5de29d3c55f 100644
--- a/sdk/lib/_internal/compiler/samples/leap/leap_leg.dart
+++ b/sdk/lib/_internal/compiler/samples/leap/leap_leg.dart
@@ -76,14 +76,14 @@ main() {
return;
}
html.ClientRect rect = rects.item(rects.length - 1);
- if (rect.width.toInt() != 0) {
+ if (rect.width.truncate() != 0) {
Lasse Reichstein Nielsen 2013/01/04 10:29:42 Thast's silly. Just use: rect.width >= 1
// This is a selection of multiple characters, not a single
// point of insertion.
hide(popup);
return;
}
- popup.style.top = "${rect.bottom.toInt()}px";
- popup.style.left = "${rect.right.toInt()}px";
+ popup.style.top = "${rect.bottom.truncate()}px";
+ popup.style.left = "${rect.right.truncate()}px";
// Instead of displaying this immediately, we could set up a timer
// event and display it later. This is a matter of getting the UX
// just right, for now it simply demonstrates that we know where

Powered by Google App Engine
This is Rietveld 408576698