accuracy-handle -> midpoint

This commit is contained in:
John Firebaugh
2013-01-11 12:44:19 -08:00
parent c894ad26f2
commit 7dc1945ee3
9 changed files with 17 additions and 17 deletions

View File

@@ -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;
}

View File

@@ -80,7 +80,7 @@
<script src='js/id/behavior.js'></script>
<script src='js/id/behavior/drag.js'></script>
<script src='js/id/behavior/drag_accuracy_handle.js'></script>
<script src='js/id/behavior/drag_midpoint.js'></script>
<script src='js/id/behavior/drag_node.js'></script>
<script src='js/id/behavior/drag_way.js'></script>
<script src='js/id/behavior/hover.js'></script>

View File

@@ -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);
})

View File

@@ -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);

View File

@@ -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 {

View File

@@ -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);

View File

@@ -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) {

View File

@@ -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));

View File

@@ -71,7 +71,7 @@
<script src='../js/id/behavior.js'></script>
<script src='../js/id/behavior/drag.js'></script>
<script src='../js/id/behavior/drag_accuracy_handle.js'></script>
<script src='../js/id/behavior/drag_midpoint.js'></script>
<script src='../js/id/behavior/drag_node.js'></script>
<script src='../js/id/behavior/drag_way.js'></script>
<script src='../js/id/behavior/hover.js'></script>