mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-17 22:24:49 +02:00
Snap to nope targets too (snapping is useful feedback)
Also remove "acting" cursor, which was overriding the no-action cursor in some situations.
This commit is contained in:
@@ -49,16 +49,6 @@
|
||||
cursor: url(img/cursor-select-remove.png), pointer; /* FF */
|
||||
}
|
||||
|
||||
#map .point:active,
|
||||
#map .vertex:active,
|
||||
#map .line:active,
|
||||
#map .area:active,
|
||||
#map .midpoint:active,
|
||||
#map .mode-select .selected {
|
||||
cursor: pointer; /* Opera */
|
||||
cursor: url(img/cursor-select-acting.png), pointer; /* FF */
|
||||
}
|
||||
|
||||
.mode-draw-line #map,
|
||||
.mode-draw-area #map,
|
||||
.mode-add-line #map,
|
||||
|
||||
@@ -41,7 +41,7 @@ export function behaviorDrawWay(context, wayId, index, mode, startGraph) {
|
||||
function move(datum) {
|
||||
var loc;
|
||||
var target = datum && datum.id && context.hasEntity(datum.id);
|
||||
if (target && target.type === 'node') { // snap to node
|
||||
if (datum.loc) { // snap to node/vertex - a real entity or a nope target with a `loc`
|
||||
loc = datum.loc;
|
||||
} else if (target && target.type === 'way') { // snap to way
|
||||
var choice = geoChooseEdge(
|
||||
|
||||
@@ -144,9 +144,9 @@ export function modeDragNode(context) {
|
||||
var d = datum();
|
||||
var target = d && d.id && context.hasEntity(d.id);
|
||||
|
||||
if (target && target.type === 'node') {
|
||||
loc = target.loc;
|
||||
} else if (target && target.type === 'way') {
|
||||
if (d.loc) { // snap to node/vertex - a real entity or a nope target with a `loc`
|
||||
loc = d.loc;
|
||||
} else if (target && target.type === 'way') { // snap to way
|
||||
var choice = geoChooseEdge(
|
||||
context.childNodes(target), context.mouse(), context.projection, entity.id
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user