mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-25 23:13:42 +00:00
Better way to prevent snapping to area fill
This also prevents are hover behavior during node dragging, while allowing snapping to vertex fill.
This commit is contained in:
13
css/map.css
13
css/map.css
@@ -940,10 +940,11 @@ text.point {
|
||||
}
|
||||
|
||||
/* Ensure drawing doesn't interact with area fills. */
|
||||
.mode-add-point .area,
|
||||
.mode-draw-line .area,
|
||||
.mode-draw-area .area,
|
||||
.mode-add-line .area,
|
||||
.mode-add-area .area {
|
||||
pointer-events: visibleStroke;
|
||||
.mode-add-point .area.fill,
|
||||
.mode-draw-line .area.fill,
|
||||
.mode-draw-area .area.fill,
|
||||
.mode-add-line .area.fill,
|
||||
.mode-add-area .area.fill,
|
||||
.behavior-drag-node .area.fill {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@@ -74,14 +74,7 @@ iD.behavior.DragNode = function(context) {
|
||||
return {};
|
||||
}
|
||||
|
||||
var datum = d3.event.sourceEvent.target.__data__,
|
||||
target = d3.select(d3.event.sourceEvent.target);
|
||||
|
||||
if (datum && !target.classed('fill')) {
|
||||
return datum;
|
||||
}
|
||||
|
||||
return {};
|
||||
return d3.event.sourceEvent.target.__data__ || {};
|
||||
}
|
||||
|
||||
function move(entity) {
|
||||
|
||||
Reference in New Issue
Block a user