summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/rectangles/models/wall.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-08-14 17:45:08 -0400
committerJules Laplace <jules@okfoc.us>2014-08-14 17:45:08 -0400
commit8ed5bf2ceba8e85be9c911f8b33483242e979ab7 (patch)
treefc03b904a1bdd8bd4bffaf097cb8000374041750 /public/assets/javascripts/rectangles/models/wall.js
parent31907c69cc192a23bb409adf5c438ed708db0842 (diff)
fix last wrinkle in grouper
Diffstat (limited to 'public/assets/javascripts/rectangles/models/wall.js')
-rw-r--r--public/assets/javascripts/rectangles/models/wall.js19
1 files changed, 8 insertions, 11 deletions
diff --git a/public/assets/javascripts/rectangles/models/wall.js b/public/assets/javascripts/rectangles/models/wall.js
index b66d5f5..460963b 100644
--- a/public/assets/javascripts/rectangles/models/wall.js
+++ b/public/assets/javascripts/rectangles/models/wall.js
@@ -144,18 +144,15 @@
Wall.prototype.wallpaper = function(){
var useX = this.side & FRONT_BACK
var shouldFlip = this.side & (LEFT | BACK)
- this.siblings().forEach(function(w){
- w.mx.forEach(function(mx){
-
- var partitionOffset = useX ? mx.x : mx.z
- if (shouldFlip) partitionOffset *= -1
- partitionOffset += mx.width/2
- var floorOffset = mx.y + mx.height/2
+ this.mx.forEach(function(mx){
+ var partitionOffset = useX ? mx.x : mx.z
+ if (shouldFlip) partitionOffset *= -1
+ partitionOffset += mx.width/2
+ var floorOffset = mx.y + mx.height/2
- mx.el.style.backgroundImage = Scenery.nextWallpaper
- mx.el.style.backgroundPosition = (~~partitionOffset) + "px " + (~~floorOffset) + "px"
- })
- })
+ mx.el.style.backgroundImage = Scenery.nextWallpaper
+ mx.el.style.backgroundPosition = (~~partitionOffset) + "px " + (~~floorOffset) + "px"
+ })
}
Wall.prototype.outline = function(){