diff options
| author | Julie Lala <jules@okfoc.us> | 2014-10-16 03:09:22 -0400 |
|---|---|---|
| committer | Julie Lala <jules@okfoc.us> | 2014-10-16 03:09:22 -0400 |
| commit | 37851cbd12dcb17be77265164876184019d34602 (patch) | |
| tree | 41d9ac3a02c62ca9421c86649672cbf19720afcd /public/assets/javascripts/rectangles/models | |
| parent | c13532ec95c2d410354f7d342df70fd68dd78272 (diff) | |
.. and floor and ceiling
Diffstat (limited to 'public/assets/javascripts/rectangles/models')
| -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 ) } |
