diff options
| author | ryderr <r@okfoc.us> | 2014-10-16 10:43:17 -0400 |
|---|---|---|
| committer | ryderr <r@okfoc.us> | 2014-10-16 10:43:17 -0400 |
| commit | 5f91a568db7f69489851c373e54cf911d29e3054 (patch) | |
| tree | 3b92d3a0782353fefa8967c78762d324913df730 /public/assets/javascripts/rectangles/models/floor.js | |
| parent | 20f37d08394df097db45e0092e4420f31b5be161 (diff) | |
| parent | 1a15b32d8cc8fcf27861f94151ca63eb6d8736c2 (diff) | |
merge
Diffstat (limited to 'public/assets/javascripts/rectangles/models/floor.js')
| -rw-r--r-- | public/assets/javascripts/rectangles/models/floor.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/public/assets/javascripts/rectangles/models/floor.js b/public/assets/javascripts/rectangles/models/floor.js index 7ed52a1..9838232 100644 --- a/public/assets/javascripts/rectangles/models/floor.js +++ b/public/assets/javascripts/rectangles/models/floor.js @@ -15,6 +15,7 @@ var Floor = function(opt){ this.id = opt.id this.side = opt.side + this.ceiling = opt.side & CEILING this.mx = opt.mx } @@ -114,8 +115,6 @@ this.background.x = background.x || this.background.x this.background.y = background.y || this.background.y this.background.scale = background.scale || this.background.scale || 1 - - var shouldFlip = this.side & (CEILING) var mx, dx, dy var w = Math.round( this.backgroundImage.naturalWidth * this.background.scale ) @@ -125,7 +124,7 @@ var region = mx.rect - if (shouldFlip) { + if (this.ceiling) { dx = Math.round( this.background.x - region.x.a ) dy = Math.round( this.background.y - region.y.a ) } |
