diff options
Diffstat (limited to 'public/assets/javascripts/ui/blueprint/BlueprintInfo.js')
| -rw-r--r-- | public/assets/javascripts/ui/blueprint/BlueprintInfo.js | 23 |
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() |
