From e5ad28feb75e79173892b1f54208851deea2f2cc Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Mon, 4 Feb 2013 12:10:23 -0500 Subject: [PATCH] JShint fixups --- js/id/actions/split.js | 2 +- js/id/behavior/draw_way.js | 2 +- js/id/graph/history.js | 2 +- js/id/graph/node.js | 2 +- js/id/operations.js | 2 +- js/id/services/taginfo.js | 2 +- js/id/svg.js | 18 ++++++++++-------- js/id/ui/splash.js | 13 +++++++++---- 8 files changed, 25 insertions(+), 18 deletions(-) diff --git a/js/id/actions/split.js b/js/id/actions/split.js index 19a71c619..24f2b4318 100644 --- a/js/id/actions/split.js +++ b/js/id/actions/split.js @@ -17,7 +17,7 @@ iD.actions.Split = function(nodeId, newWayId) { return parents.filter(function (parent) { return parent.first() !== nodeId && parent.last() !== nodeId; - }) + }); } var action = function(graph) { diff --git a/js/id/behavior/draw_way.js b/js/id/behavior/draw_way.js index 3089bd6ee..1cc52ab1f 100644 --- a/js/id/behavior/draw_way.js +++ b/js/id/behavior/draw_way.js @@ -82,7 +82,7 @@ iD.behavior.DrawWay = function(context, wayId, index, mode, baseGraph) { return graph .replace(way.removeNode(nodeId).addNode(newNode.id, index)) .remove(node); - } + }; } // Accept the current position of the temporary node and continue drawing. diff --git a/js/id/graph/history.js b/js/id/graph/history.js index 3cc1ace01..7d1098027 100644 --- a/js/id/graph/history.js +++ b/js/id/graph/history.js @@ -127,7 +127,7 @@ iD.History = function() { modified: difference.modified(), created: difference.created(), deleted: difference.deleted() - } + }; }, hasChanges: function() { diff --git a/js/id/graph/node.js b/js/id/graph/node.js index b9a171752..56fc14eab 100644 --- a/js/id/graph/node.js +++ b/js/id/graph/node.js @@ -47,6 +47,6 @@ _.extend(iD.Node.prototype, { type: 'Point', coordinates: this.loc } - } + }; } }); diff --git a/js/id/operations.js b/js/id/operations.js index 2786d046f..a72fe1d82 100644 --- a/js/id/operations.js +++ b/js/id/operations.js @@ -1 +1 @@ -iD.operations = {} +iD.operations = {}; diff --git a/js/id/services/taginfo.js b/js/id/services/taginfo.js index aa89a37fa..fc4e72542 100644 --- a/js/id/services/taginfo.js +++ b/js/id/services/taginfo.js @@ -40,7 +40,7 @@ iD.taginfo = function() { } function popularValues(parameters) { - return function(d) { return parseFloat(d['fraction']) > 0.01; }; + return function(d) { return parseFloat(d.fraction) > 0.01; }; } function valKey(d) { return { value: d.key }; } diff --git a/js/id/svg.js b/js/id/svg.js index 5b07b3a53..aadb6b830 100644 --- a/js/id/svg.js +++ b/js/id/svg.js @@ -1,19 +1,19 @@ iD.svg = { - RoundProjection: function (projection) { - return function (d) { + RoundProjection: function(projection) { + return function(d) { return iD.geo.roundCoords(projection(d)); }; }, - PointTransform: function (projection) { - return function (entity) { + PointTransform: function(projection) { + return function(entity) { return 'translate(' + projection(entity.loc) + ')'; }; }, - LineString: function (projection, graph) { + LineString: function(projection, graph) { var cache = {}; - return function (entity) { + return function(entity) { if (cache[entity.id] !== undefined) { return cache[entity.id]; } @@ -23,7 +23,9 @@ iD.svg = { } return (cache[entity.id] = - 'M' + graph.childNodes(entity).map(function (n) { return projection(n.loc); }).join('L')); - } + 'M' + graph.childNodes(entity).map(function(n) { + return projection(n.loc); + }).join('L')); + }; } }; diff --git a/js/id/ui/splash.js b/js/id/ui/splash.js index 43489fab1..a4d2a915e 100644 --- a/js/id/ui/splash.js +++ b/js/id/ui/splash.js @@ -2,15 +2,20 @@ iD.ui.splash = function() { var modal = iD.ui.modal(); modal.select('.modal') - .attr('class', 'modal-splash modal') + .attr('class', 'modal-splash modal'); var introModal = modal.select('.content') .append('div') .attr('class', 'modal-section fillL'); - introModal.append('div').attr('class','logo'); + introModal.append('div') + .attr('class','logo'); - introModal.append('div').html("

Welcome to the iD OpenStreetMap editor

This is development version 0.0.0-alpha1. For more information see ideditor.com and report bugs at github.com.systemed/iD.

"); + introModal.append('div') + .html("

Welcome to the iD OpenStreetMap editor

" + + "This is development version 0.0.0-alpha1. " + + "For more information see ideditor.com" + + " and report bugs at github.com.systemed/iD.

"); return modal; -}; \ No newline at end of file +};