From 335232556d74ec37774b504ad8c8af29c34788bb Mon Sep 17 00:00:00 2001 From: Julie Lala Date: Fri, 22 Aug 2014 13:57:23 -0400 Subject: switch wall --- public/assets/javascripts/rectangles/models/surface.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'public/assets/javascripts/rectangles/models') diff --git a/public/assets/javascripts/rectangles/models/surface.js b/public/assets/javascripts/rectangles/models/surface.js index 5b411c0..53977c8 100644 --- a/public/assets/javascripts/rectangles/models/surface.js +++ b/public/assets/javascripts/rectangles/models/surface.js @@ -25,6 +25,7 @@ this.bounds.y.b = rect.y.a } this.bounds.x.b += rect.width() + this.bounds.y.a = Math.min(this.bounds.y.a, rect.y.a) this.bounds.y.b = Math.max(this.bounds.y.b, rect.y.b) this.faces.push(rect) } @@ -90,7 +91,6 @@ if (right_edge > 0) { delta.a -= right_edge } - var bottom_edge = position.b + delta.b - bounds.y.a if (bottom_edge < 0) { delta.b -= bottom_edge @@ -105,7 +105,6 @@ } Surface.prototype.translate = function (old_bounds, dimension, position, delta) { - this.clamp_delta( this.bounds, dimension, position, delta ) var new_delta = delta.clone() -- cgit v1.2.3-70-g09d2