mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
accuracy-handle -> midpoint
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
})
|
||||
@@ -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);
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user