From cff4cde6825a1af9c36fda1467cd118bbdc231eb Mon Sep 17 00:00:00 2001 From: Julie Lala Date: Wed, 23 Apr 2014 11:10:14 -0400 Subject: clamping --- assets/javascripts/rectangles/map/ui.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'assets/javascripts/rectangles') diff --git a/assets/javascripts/rectangles/map/ui.js b/assets/javascripts/rectangles/map/ui.js index 4e03125..caa2a81 100644 --- a/assets/javascripts/rectangles/map/ui.js +++ b/assets/javascripts/rectangles/map/ui.js @@ -2,6 +2,8 @@ map.ui = new function(){ var base = this + var height_min = 200, + height_max = 2000 base.creating = base.dragging = false @@ -96,7 +98,7 @@ map.ui = new function(){ }) if (intersects.length) { - intersects[0].height = clamp( ~~(intersects[0].height - delta), 200, 800 ) + intersects[0].height = clamp( ~~(intersects[0].height - delta), height_min, height_max ) clipper.update() } else { -- cgit v1.2.3-70-g09d2