summaryrefslogtreecommitdiff
path: root/assets/javascripts/rectangles
diff options
context:
space:
mode:
authorJulie Lala <jules@okfoc.us>2014-04-23 11:10:14 -0400
committerJulie Lala <jules@okfoc.us>2014-04-23 11:10:14 -0400
commitcff4cde6825a1af9c36fda1467cd118bbdc231eb (patch)
treeb8898f3f28dd0d2175a3b8be411a5a082b95efc3 /assets/javascripts/rectangles
parentf94cf0d133a5d426a20cb5ac7eeb60f72b690119 (diff)
clamping
Diffstat (limited to 'assets/javascripts/rectangles')
-rw-r--r--assets/javascripts/rectangles/map/ui.js4
1 files changed, 3 insertions, 1 deletions
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 {