Chromium Code Reviews| 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 |