mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-25 06:55:46 +00:00
Merge branch 'midpoints' of https://github.com/edpop/iD into edpop-midpoints
This commit is contained in:
@@ -27,7 +27,9 @@ export function behaviorSelect(context) {
|
||||
lasso = d3.select('#surface .lasso').node(),
|
||||
mode = context.mode();
|
||||
|
||||
if (!(datum instanceof osmEntity)) {
|
||||
if (datum.type === 'midpoint') {
|
||||
// do nothing
|
||||
} else if (!(datum instanceof osmEntity)) {
|
||||
if (!d3.event.shiftKey && !lasso && mode.id !== 'browse')
|
||||
context.enter(modeBrowse(context));
|
||||
|
||||
|
||||
@@ -245,6 +245,15 @@ export function modeSelect(context, selectedIDs) {
|
||||
t('operations.add.annotation.vertex')
|
||||
);
|
||||
|
||||
d3.event.preventDefault();
|
||||
d3.event.stopPropagation();
|
||||
} else if (datum.type === 'midpoint') {
|
||||
var node = osmNode();
|
||||
|
||||
context.perform(
|
||||
actionAddMidpoint({loc: datum.loc, edge: datum.edge}, node),
|
||||
t('operations.add.annotation.vertex'));
|
||||
|
||||
d3.event.preventDefault();
|
||||
d3.event.stopPropagation();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user