summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/blueprint/BlueprintScaler.js
blob: e11b61e29df4dd9cd64752cd79763100af675e1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
var BlueprintScaler = ModalView.extend({
	el: ".blueprintScaler",
	
	events: {
    "change [name=blueprint-dimensions]": "changeDimensions",
    "change [name=blueprint-units]": "changeUnits",
    "click #saveBlueprint": "save",
	},
	
	initialize: function(){
    this.$blueprintMap = this.$("#blueprintMap")
    this.$blueprintDimensionsRapper = this.$("#blueprintDimensions")
    this.$dimensions = this.$("[name=blueprint-dimensions]")
    this.$units = this.$("[name=blueprint-units]")
    this.$save = this.$("#saveBlueprint")

    this.map = map = new Map ({
      type: "ortho",
      el: this.$blueprintMap.get(0),
      width: window.innerWidth/2,
      height: window.innerHeight,
      zoom: -2,
      zoom_min: -6.2,
      zoom_max: 1,
    })
    map.ui.add_tool("arrow", new ArrowTool)
    map.ui.add_tool("position", new PositionTool)
    map.ui.set_tool("position")
	},
	
	pick: function(){
    
	},

	changeDimensions: function(){
	},
	changeUnits: function(){
	},
	save: function(){
	},

})