Skip to content
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #43 from transitland/meghan/playground-tuneups
Browse files Browse the repository at this point in the history
removing console logs, cleaning up code
  • Loading branch information
meghanhade committed Apr 3, 2015
2 parents ee68f46 + ff5dd6b commit 8d57362
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
2 changes: 0 additions & 2 deletions js/entities/operator.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ DeveloperPlayground.Operators = Backbone.Collection.extend({
visibleOperators: function() {
return this.where({display: true});
}


});


Expand Down
6 changes: 0 additions & 6 deletions js/views/grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [{
Expand Down Expand Up @@ -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() {
Expand Down
18 changes: 8 additions & 10 deletions js/views/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
Expand All @@ -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();
Expand All @@ -111,7 +110,7 @@ DeveloperPlayground.MapView = Backbone.View.extend({
},

onEachFeature: function(feature, layer) {

function highlightFeature(e) {
var layer = e.target;
layer.setStyle({
Expand All @@ -121,9 +120,8 @@ DeveloperPlayground.MapView = Backbone.View.extend({
}
function resetFeatureStyle(e) {
var layer = e.target;

layer.setStyle({
opacity: .3,
opacity: .3
});
}

Expand Down Expand Up @@ -163,7 +161,7 @@ DeveloperPlayground.MapView = Backbone.View.extend({
}else{
if($(".no-result").hasClass("hide")){
$(".no-result").removeClass("hide");
}
}
}
}

Expand Down

0 comments on commit 8d57362

Please sign in to comment.