mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-07 20:01:33 +00:00
Merge pull request #5413 from quincylvania/add-point-on-way-as-vertex
Adding a new point on a way will add a vertex, not a standalone point
This commit is contained in:
@@ -3,6 +3,8 @@ import { actionAddEntity } from '../actions';
|
||||
import { behaviorDraw } from '../behavior';
|
||||
import { modeBrowse, modeSelect } from './index';
|
||||
import { osmNode } from '../osm';
|
||||
import { geoChooseEdge } from '../geo';
|
||||
import { actionAddMidpoint } from '../actions';
|
||||
|
||||
|
||||
export function modeAddPoint(context) {
|
||||
@@ -37,8 +39,17 @@ export function modeAddPoint(context) {
|
||||
}
|
||||
|
||||
|
||||
function addWay(loc) {
|
||||
add(loc);
|
||||
function addWay(loc, edge, d) {
|
||||
var node = osmNode();
|
||||
|
||||
context.perform(
|
||||
actionAddMidpoint({loc: loc, edge: edge}, node),
|
||||
t('operations.add.annotation.vertex')
|
||||
);
|
||||
|
||||
context.enter(
|
||||
modeSelect(context, [node.id]).newFeature(true)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user