Make sure to select vertex-persistent when looking for siblings

(closes #3824)

When hovering, there is also a companion `vertex-hover` element that might
sometimes get selected, and doesn't have the sibling class that enables drag.
This commit is contained in:
Bryan Housel
2017-02-06 16:43:54 -05:00
parent 20b79940ae
commit 919234d2df

View File

@@ -102,7 +102,7 @@ export function modeDragNode(context) {
// vertices classed "sibling" include: (see svg/vertices.js) // vertices classed "sibling" include: (see svg/vertices.js)
// - children of selected ways or multipolygons // - children of selected ways or multipolygons
// - vertices sharing a way with selected vertices // - vertices sharing a way with selected vertices
var selection = d3.selectAll('g.' + entity.id), var selection = d3.selectAll('g.vertex-persistent.' + entity.id),
isSelected = !selection.empty() && isSelected = !selection.empty() &&
(selection.classed('selected') || selection.classed('sibling')); (selection.classed('selected') || selection.classed('sibling'));