summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/blueprint/BlueprintInfo.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-08-18 19:35:02 -0400
committerJules Laplace <jules@okfoc.us>2015-08-18 19:35:02 -0400
commit72afc148b11ac57c991d699c205675b4b0f1cf70 (patch)
treef749d93ea76ffea7310cc416d80f39bfae0827b8 /public/assets/javascripts/ui/blueprint/BlueprintInfo.js
parentb4c7b2126b384a61bb69b046d0620ac53dd063ec (diff)
set wall height
Diffstat (limited to 'public/assets/javascripts/ui/blueprint/BlueprintInfo.js')
-rw-r--r--public/assets/javascripts/ui/blueprint/BlueprintInfo.js23
1 files changed, 8 insertions, 15 deletions
diff --git a/public/assets/javascripts/ui/blueprint/BlueprintInfo.js b/public/assets/javascripts/ui/blueprint/BlueprintInfo.js
index ad462ae..6dd6a7d 100644
--- a/public/assets/javascripts/ui/blueprint/BlueprintInfo.js
+++ b/public/assets/javascripts/ui/blueprint/BlueprintInfo.js
@@ -5,15 +5,16 @@ var BlueprintInfo = View.extend({
events: {
"mousedown": "stopPropagation",
"keydown": 'stopPropagation',
+ "change [name=height]": 'changeHeight',
"keydown [name=height]": 'enterHeight',
"change [name=units]": 'changeUnits',
"keydown [name=viewHeight]": 'enterViewHeight',
"change [name=viewHeight]": 'changeViewHeight',
- "click [data-role=destroy-room]": 'destroy',
},
initialize: function(opt){
this.parent = opt.parent
+ this.$height = this.$("[name=height]")
this.$units = this.$("[name=units]")
this.$viewHeight = this.$("[name=viewHeight]")
this.$unitName = this.$(".unitName")
@@ -21,8 +22,10 @@ var BlueprintInfo = View.extend({
load: function(data){
this.$viewHeight.unitVal( window.viewHeight = data.viewHeight || app.defaults.viewHeight )
+ this.$height.unitVal( window.wallHeight = data.wallHeight || app.defaults.wallHeight )
this.$units.val( data.units )
this.$unitName.html( data.units )
+ this.show()
},
toggle: function(state){
@@ -35,17 +38,10 @@ var BlueprintInfo = View.extend({
},
hide: function(){
- this.room = null
this.toggle(false)
},
-
- room: null,
-
- pick: function(room){
- },
deselect: function(){
- this.room = null
this.toggle(true)
},
@@ -54,13 +50,10 @@ var BlueprintInfo = View.extend({
},
changeHeight: function(e){
e.stopPropagation()
- var height = this.room.height = this.$height.unitVal()
- if (window.heightIsGlobal) {
- Rooms.forEach(function(room){
- room.height = height
- })
- }
- Rooms.rebuild()
+ window.wallHeight = this.$height.unitVal()
+ shapes.forEach(function(line){
+ line.mx.set_height( window.wallHeight )
+ })
},
changeUnits: function(){
app.units = this.$units.val()