mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-16 05:49:16 +02:00
Do not attach dragNode behavior in browse mode
This commit is contained in:
@@ -7,8 +7,6 @@ import {
|
||||
behaviorSelect
|
||||
} from '../behavior/index';
|
||||
|
||||
import { modeDragNode } from './index';
|
||||
|
||||
|
||||
export function modeBrowse(context) {
|
||||
var mode = {
|
||||
@@ -22,8 +20,7 @@ export function modeBrowse(context) {
|
||||
behaviorPaste(context),
|
||||
behaviorHover(context).on('hover', context.ui().sidebar.hover),
|
||||
behaviorSelect(context),
|
||||
behaviorLasso(context),
|
||||
modeDragNode(context).behavior
|
||||
behaviorLasso(context)
|
||||
];
|
||||
|
||||
|
||||
|
||||
@@ -79,12 +79,16 @@ export function modeDragNode(context) {
|
||||
|
||||
|
||||
function start(entity) {
|
||||
activeIDs = _.map(context.graph().parentWays(entity), 'id');
|
||||
activeIDs.push(entity.id);
|
||||
wasMidpoint = entity.type === 'midpoint';
|
||||
|
||||
isCancelled = d3.event.sourceEvent.shiftKey ||
|
||||
!(wasMidpoint || _.some(activeIDs, function (activeID) { return selectedIDs.indexOf(activeID) !== -1; })) ||
|
||||
context.features().hasHiddenConnections(entity, context.graph());
|
||||
|
||||
if (isCancelled) return behavior.cancel();
|
||||
|
||||
wasMidpoint = entity.type === 'midpoint';
|
||||
if (wasMidpoint) {
|
||||
var midpoint = entity;
|
||||
entity = osmNode();
|
||||
@@ -97,8 +101,6 @@ export function modeDragNode(context) {
|
||||
context.perform(actionNoop());
|
||||
}
|
||||
|
||||
activeIDs = _.map(context.graph().parentWays(entity), 'id');
|
||||
activeIDs.push(entity.id);
|
||||
context.enter(mode);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user