mirror of
https://github.com/FoggedLens/iD.git
synced 2026-04-22 11:46:11 +02:00
Don't show radial menu after dragging node (fixes #1385)
This commit is contained in:
@@ -174,7 +174,10 @@ iD.behavior.DrawWay = function(context, wayId, index, mode, baseGraph) {
|
||||
}, 1000);
|
||||
|
||||
if (context.hasEntity(wayId)) {
|
||||
context.enter(iD.modes.Select(context, [wayId]).newFeature(true));
|
||||
context.enter(
|
||||
iD.modes.Select(context, [wayId])
|
||||
.suppressMenu(true)
|
||||
.newFeature(true));
|
||||
} else {
|
||||
context.enter(iD.modes.Browse(context));
|
||||
}
|
||||
|
||||
@@ -20,7 +20,10 @@ iD.modes.AddPoint = function(context) {
|
||||
iD.actions.AddEntity(node),
|
||||
t('operations.add.annotation.point'));
|
||||
|
||||
context.enter(iD.modes.Select(context, [node.id]).newFeature(true));
|
||||
context.enter(
|
||||
iD.modes.Select(context, [node.id])
|
||||
.suppressMenu(true)
|
||||
.newFeature(true));
|
||||
}
|
||||
|
||||
function addWay(loc, edge) {
|
||||
|
||||
@@ -138,7 +138,9 @@ iD.modes.DragNode = function(context) {
|
||||
|
||||
var parentWays = _.pluck(context.graph().parentWays(entity), 'id');
|
||||
|
||||
context.enter(iD.modes.Select(context, parentWays));
|
||||
context.enter(
|
||||
iD.modes.Select(context, parentWays)
|
||||
.suppressMenu(true));
|
||||
}
|
||||
|
||||
function cancel() {
|
||||
|
||||
@@ -13,7 +13,8 @@ iD.modes.Select = function(context, selection) {
|
||||
iD.modes.DragNode(context).behavior],
|
||||
inspector,
|
||||
radialMenu,
|
||||
newFeature = false;
|
||||
newFeature = false,
|
||||
suppressMenu = false;
|
||||
|
||||
var wrap = context.container()
|
||||
.select('.inspector-wrap');
|
||||
@@ -60,6 +61,12 @@ iD.modes.Select = function(context, selection) {
|
||||
return mode;
|
||||
};
|
||||
|
||||
mode.suppressMenu = function(_) {
|
||||
if (!arguments.length) return suppressMenu;
|
||||
suppressMenu = _;
|
||||
return mode;
|
||||
};
|
||||
|
||||
mode.enter = function() {
|
||||
behaviors.forEach(function(behavior) {
|
||||
context.install(behavior);
|
||||
@@ -162,7 +169,7 @@ iD.modes.Select = function(context, selection) {
|
||||
selectElements();
|
||||
|
||||
radialMenu = iD.ui.RadialMenu(operations);
|
||||
var show = d3.event && !newFeature;
|
||||
var show = d3.event && !suppressMenu;
|
||||
|
||||
if (show) {
|
||||
positionMenu();
|
||||
|
||||
Reference in New Issue
Block a user