diff --git a/js/entities/operator.js b/js/entities/operator.js index b1cbd90..47fa9de 100644 --- a/js/entities/operator.js +++ b/js/entities/operator.js @@ -40,8 +40,6 @@ DeveloperPlayground.Operators = Backbone.Collection.extend({ visibleOperators: function() { return this.where({display: true}); } - - }); diff --git a/js/views/grid.js b/js/views/grid.js index 89056c3..d9687dd 100644 --- a/js/views/grid.js +++ b/js/views/grid.js @@ -12,12 +12,10 @@ DeveloperPlayground.GridView = Backbone.View.extend({ }, render: function(model){ - var columns; var grid; var $entitySelect = $('select.form-control#entity'); - if ($entitySelect.val() == "operators"){ columns = [{ @@ -110,16 +108,12 @@ DeveloperPlayground.GridView = Backbone.View.extend({ editable: false, cell: "string" }]; - grid = new Backgrid.Grid({ columns: columns, collection: this.collection }); $("#results").append(grid.render().$el); } - - - }, close: function() { diff --git a/js/views/map.js b/js/views/map.js index 353815c..5740afc 100644 --- a/js/views/map.js +++ b/js/views/map.js @@ -48,7 +48,7 @@ DeveloperPlayground.MapView = Backbone.View.extend({ if (feature.get('display') !== false) { var s = {}; - if (feature.attributes.name == feature.attributes.tags.route_long_name || feature.attributes.tags.route_long_name == undefined){ + if (feature.attributes.name == feature.attributes.tags.route_long_name || feature.attributes.tags.route_long_name === undefined){ s = { 'type': 'Feature', 'name': feature.attributes.name, @@ -74,7 +74,6 @@ DeveloperPlayground.MapView = Backbone.View.extend({ }, styleEachFeature: function(feature) { - var color; var r = Math.floor(Math.random() * 255); var g = Math.floor(Math.random() * 255); @@ -86,16 +85,16 @@ DeveloperPlayground.MapView = Backbone.View.extend({ fillColor: color, weight: 3, opacity: .6, - fillOpacity: .3, - className: 'blah' + fillOpacity: .3 + // className: 'blah' }; var routeStyle = { color: color, // color: "#"+feature.attributes.tags.route_color, weight: 4, - opacity: .3, - className: 'blah' + opacity: .3 + // className: 'blah' }; var geom_type = feature.geometry.type.toLowerCase(); @@ -111,7 +110,7 @@ DeveloperPlayground.MapView = Backbone.View.extend({ }, onEachFeature: function(feature, layer) { - + function highlightFeature(e) { var layer = e.target; layer.setStyle({ @@ -121,9 +120,8 @@ DeveloperPlayground.MapView = Backbone.View.extend({ } function resetFeatureStyle(e) { var layer = e.target; - layer.setStyle({ - opacity: .3, + opacity: .3 }); } @@ -163,7 +161,7 @@ DeveloperPlayground.MapView = Backbone.View.extend({ }else{ if($(".no-result").hasClass("hide")){ $(".no-result").removeClass("hide"); - } + } } }