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

Unified Diff: sky/examples/game/lib/sprite_box.dart

Issue 1204783003: Adds basic sprite sheet support to sprites (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Adds basic sprite sheet support to sprites (fixed issues) Created 5 years, 6 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: sky/examples/game/lib/sprite_box.dart
diff --git a/sky/examples/game/lib/sprite_box.dart b/sky/examples/game/lib/sprite_box.dart
index 173b1d894de0eed2c9f5819812105858640e56e5..c93a362d5d43c990746df49301bfbae2b1129d5a 100644
--- a/sky/examples/game/lib/sprite_box.dart
+++ b/sky/examples/game/lib/sprite_box.dart
@@ -205,8 +205,7 @@ class SpriteBox extends RenderBox {
if (scaleX > scaleY) {
scaleY = scaleX;
offsetY = (size.height - scaleY * systemHeight)/2.0;
- }
- else {
+ } else {
scaleX = scaleY;
offsetX = (size.width - scaleX * systemWidth)/2.0;
}
@@ -217,8 +216,7 @@ class SpriteBox extends RenderBox {
if (scaleX < scaleY) {
scaleY = scaleX;
offsetY = (size.height - scaleY * systemHeight)/2.0;
- }
- else {
+ } else {
scaleX = scaleY;
offsetX = (size.width - scaleX * systemWidth)/2.0;
}

Powered by Google App Engine
This is Rietveld 408576698