From e071c1557999227e285c9d2cb72afdad7ae55814 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Tue, 5 Mar 2013 16:29:23 -0500 Subject: [PATCH] Remove unused variables and arguments --- js/id/actions/connect.js | 2 +- js/id/actions/orthogonalize.js | 3 +-- js/id/behavior/lasso.js | 3 +-- js/id/renderer/background.js | 3 --- js/id/ui/notice.js | 1 - js/id/ui/radial_menu.js | 2 +- 6 files changed, 4 insertions(+), 10 deletions(-) diff --git a/js/id/actions/connect.js b/js/id/actions/connect.js index 3c69b8a0f..aed9882bc 100644 --- a/js/id/actions/connect.js +++ b/js/id/actions/connect.js @@ -36,7 +36,7 @@ iD.actions.Connect = function(nodeIds) { return graph; }; - action.enabled = function(graph) { + action.enabled = function() { return nodeIds.length > 1; }; diff --git a/js/id/actions/orthogonalize.js b/js/id/actions/orthogonalize.js index ada281a95..8b8244e9d 100644 --- a/js/id/actions/orthogonalize.js +++ b/js/id/actions/orthogonalize.js @@ -7,7 +7,6 @@ iD.actions.Orthogonalize = function(wayId, projection) { var way = graph.entity(wayId), nodes = graph.childNodes(way), points = nodes.map(function(n) { return projection(n.loc); }), - quad_nodes = [], best, i, j; var score = squareness(); @@ -79,7 +78,7 @@ iD.actions.Orthogonalize = function(wayId, projection) { } function subtractPoints(a, b) { - return [a[0] - b[0], a[1] - b[1]]; + return [a[0] - b[0], a[1] - b[1]]; } function addPoints(a, b) { diff --git a/js/id/behavior/lasso.js b/js/id/behavior/lasso.js index bc040fce4..dcf88a77c 100644 --- a/js/id/behavior/lasso.js +++ b/js/id/behavior/lasso.js @@ -2,8 +2,7 @@ iD.behavior.Lasso = function(context) { var behavior = function(selection) { - var timeout = null, - mouse = null, + var mouse = null, lasso; function mousedown() { diff --git a/js/id/renderer/background.js b/js/id/renderer/background.js index 2336ee0c0..53767e3da 100644 --- a/js/id/renderer/background.js +++ b/js/id/renderer/background.js @@ -1,8 +1,5 @@ iD.Background = function() { - var deviceRatio = (window.devicePixelRatio && - window.devicePixelRatio === 2) ? 0.5 : 1; - // tileSize = (deviceRatio === 0.5) ? [128,128] : [256,256]; var tileSize = [256, 256]; var tile = d3.geo.tile(), diff --git a/js/id/ui/notice.js b/js/id/ui/notice.js index 12b1a2c09..5cd7eabda 100644 --- a/js/id/ui/notice.js +++ b/js/id/ui/notice.js @@ -1,6 +1,5 @@ iD.ui.notice = function(selection) { var event = d3.dispatch('zoom'), - message = '', notice = {}; var div = selection.append('div') diff --git a/js/id/ui/radial_menu.js b/js/id/ui/radial_menu.js index 20c1f44f3..caf259bd4 100644 --- a/js/id/ui/radial_menu.js +++ b/js/id/ui/radial_menu.js @@ -92,7 +92,7 @@ iD.ui.RadialMenu = function(operations) { } }; - radialMenu.close = function(selection) { + radialMenu.close = function() { if (menu) { menu.transition() .attr('opacity', 0)