summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/rectangles/models/floor.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-10-16 16:06:47 -0400
committerJules Laplace <jules@okfoc.us>2014-10-16 16:06:47 -0400
commit6842a993ac6aef50e79a08df9fcb0a1d769592a1 (patch)
treee210630d2d544eb6db5e6b8c46dfa86ed1192915 /public/assets/javascripts/rectangles/models/floor.js
parent6733c7626f109373bcd526a1e1707c9ccfee75a8 (diff)
parente25af0a7106c359faae2f73a7c2295ea93db8341 (diff)
merge
Diffstat (limited to 'public/assets/javascripts/rectangles/models/floor.js')
-rw-r--r--public/assets/javascripts/rectangles/models/floor.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/public/assets/javascripts/rectangles/models/floor.js b/public/assets/javascripts/rectangles/models/floor.js
index 7ed52a1..a144ecd 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
}
@@ -39,7 +40,7 @@
if (Scenery.nextWallpaper) {
var oldState = base.serialize()
base.wallpaper(Scenery.nextWallpaper)
- Scenery.nextWallpaper = null
+ // Scenery.nextWallpaper = null
UndoStack.push({
type: 'update-wallpaper',
@@ -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 )
}