Make sure nodes can be dragged too, not just vertices

(fixes bug introduced in 0440054)
This commit is contained in:
Bryan Housel
2017-01-29 17:23:34 -05:00
parent f93e57b97d
commit bc1193c347

View File

@@ -103,9 +103,10 @@ export function modeDragNode(context) {
// - children of selected ways or multipolygons
// - vertices sharing a way with selected vertices
var selection = d3.selectAll('g.' + entity.id),
isSibling = !selection.empty() && selection.classed('sibling');
isSelected = !selection.empty() &&
(selection.classed('selected') || selection.classed('sibling'));
isCancelled = d3.event.sourceEvent.shiftKey || !(wasMidpoint || isSibling) ||
isCancelled = d3.event.sourceEvent.shiftKey || !(wasMidpoint || isSelected) ||
context.features().hasHiddenConnections(entity, context.graph());
if (isCancelled) {