From 7dc1945ee3e45df19ded6592d96790f0ad61df41 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 11 Jan 2013 12:44:19 -0800 Subject: [PATCH] accuracy-handle -> midpoint --- css/map.css | 8 ++++---- index.html | 2 +- .../{drag_accuracy_handle.js => drag_midpoint.js} | 4 ++-- js/id/modes/browse.js | 2 +- js/id/modes/draw_line.js | 6 +++--- js/id/modes/select.js | 2 +- js/id/renderer/map.js | 2 +- js/id/svg/midpoints.js | 6 +++--- test/index.html | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) rename js/id/behavior/{drag_accuracy_handle.js => drag_midpoint.js} (89%) diff --git a/css/map.css b/css/map.css index ba96b32ee..7b1d02845 100644 --- a/css/map.css +++ b/css/map.css @@ -85,7 +85,7 @@ g.vertex circle.selected { fill: #ffff00; } -circle.accuracy-handle { +circle.midpoint { fill:#aaa; stroke:#333; fill-opacity:1; @@ -311,8 +311,8 @@ text.tag-oneway { cursor: url(../img/cursor-select-area.png), pointer; } -.mode-select .accuracy-handle, -.mode-browse .accuracy-handle { +.mode-select .midpoint, +.mode-browse .midpoint { cursor: url(../img/cursor-select-split.png), pointer; } @@ -320,7 +320,7 @@ text.tag-oneway { .vertex:active, .line:active, .area:active, -.accuracy-handle:active, +.midpoint:active, .mode-select .selected { cursor: url(../img/cursor-select-acting.png), pointer; } diff --git a/index.html b/index.html index 5c2624e5b..684a1021c 100644 --- a/index.html +++ b/index.html @@ -80,7 +80,7 @@ - + diff --git a/js/id/behavior/drag_accuracy_handle.js b/js/id/behavior/drag_midpoint.js similarity index 89% rename from js/id/behavior/drag_accuracy_handle.js rename to js/id/behavior/drag_midpoint.js index 5700f0d04..2e128537f 100644 --- a/js/id/behavior/drag_accuracy_handle.js +++ b/js/id/behavior/drag_midpoint.js @@ -1,9 +1,9 @@ -iD.behavior.DragAccuracyHandle = function(mode) { +iD.behavior.DragMidpoint = function(mode) { var history = mode.history, projection = mode.map.projection; return iD.behavior.drag() - .delegate(".accuracy-handle") + .delegate(".midpoint") .origin(function(d) { return projection(d.loc); }) diff --git a/js/id/modes/browse.js b/js/id/modes/browse.js index 60b08889f..c57b503f5 100644 --- a/js/id/modes/browse.js +++ b/js/id/modes/browse.js @@ -14,7 +14,7 @@ iD.modes.Browse = function() { behaviors = [ iD.behavior.Hover(), iD.behavior.DragNode(mode), - iD.behavior.DragAccuracyHandle(mode)]; + iD.behavior.DragMidpoint(mode)]; behaviors.forEach(function(behavior) { behavior(surface); diff --git a/js/id/modes/draw_line.js b/js/id/modes/draw_line.js index e55474270..caee8b3ac 100644 --- a/js/id/modes/draw_line.js +++ b/js/id/modes/draw_line.js @@ -64,10 +64,10 @@ iD.modes.DrawLine = function(wayId, direction) { controller.enter(iD.modes.DrawLine(wayId, direction)); - } else if (datum.type === 'way' || datum.accuracy) { + } else if (datum.type === 'way' || datum.midpoint) { // connect the way to an existing way - if (datum.accuracy) { - // if clicked on accuracy handle + if (datum.midpoint) { + // if clicked on midpoint datum.id = datum.way; choice = datum; } else { diff --git a/js/id/modes/select.js b/js/id/modes/select.js index 6a60cffa2..d28d6d03d 100644 --- a/js/id/modes/select.js +++ b/js/id/modes/select.js @@ -33,7 +33,7 @@ iD.modes.Select = function (entity) { iD.behavior.Hover(), iD.behavior.DragNode(mode), iD.behavior.DragWay(mode), - iD.behavior.DragAccuracyHandle(mode)]; + iD.behavior.DragMidpoint(mode)]; behaviors.forEach(function(behavior) { behavior(surface); diff --git a/js/id/renderer/map.js b/js/id/renderer/map.js index 8404a52d8..8f7dabf2b 100644 --- a/js/id/renderer/map.js +++ b/js/id/renderer/map.js @@ -92,7 +92,7 @@ iD.Map = function() { } } all = _.compact(_.values(only)); - filter = function(d) { return d.accuracy ? d.way in only : d.id in only; }; + filter = function(d) { return d.midpoint ? d.way in only : d.id in only; }; } if (all.length > 10000) { diff --git a/js/id/svg/midpoints.js b/js/id/svg/midpoints.js index 77bcaa264..f04e14ba8 100644 --- a/js/id/svg/midpoints.js +++ b/js/id/svg/midpoints.js @@ -14,19 +14,19 @@ iD.svg.Midpoints = function() { loc: iD.util.geo.interp(entity.nodes[j].loc, entity.nodes[j + 1].loc, 0.5), way: entity.id, index: j + 1, - accuracy: true + midpoint: true }); } } } - var handles = surface.select('.layer-hit').selectAll('circle.accuracy-handle') + var handles = surface.select('.layer-hit').selectAll('circle.midpoint') .filter(filter) .data(midpoints, function (d) { return [d.way, d.index].join(","); }); handles.enter() .append('circle') - .attr({ r: 3, 'class': 'accuracy-handle' }); + .attr({ r: 3, 'class': 'midpoint' }); handles.attr('transform', iD.svg.PointTransform(projection)); diff --git a/test/index.html b/test/index.html index 6d46e4607..a9a5878cb 100644 --- a/test/index.html +++ b/test/index.html @@ -71,7 +71,7 @@ - +