         $("#map_holder").html('')
         $scope.drawMap()
 
-
-
     $scope.defaultFocus()
 
     $scope.$watch('state_district', (newVals, oldVals) ->

        bbox = d3.select("#map_with_districts").node().getBBox()
        o_x = bbox.x + bbox.width/2
        o_y = bbox.y + bbox.height/2
        # scale = 100/Math.sqrt(Math.pow(bbox.width, 2) + Math.pow(bbox.height,2))
        scale = 1
        $scope.usMap.attr("transform", "translate(" + 220 / 2 + "," + 220 / 2 + ")scale(" + scale + ")translate(" + -o_x + "," + -o_y + ")").style "stroke-width", 1.5

      $scope.map_width = 220
      height = 220

      queue().defer(d3.json, "data/us.json").defer(d3.json, "data/us-congress-113.json").await ready

    $scope.changeMapSize = (windowSize) ->
      if windowSize <= 600 and $scope.map_width is 0
        unless $scope.state_district.state
          $scope.drawMapByState("6")
