mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-30 17:00:35 +02:00
Show preset browser when adding generic point, line, or area
This commit is contained in:
@@ -330,7 +330,8 @@ export function behaviorDrawWay(context, wayID, index, mode, startGraph, baselin
|
||||
window.setTimeout(function() {
|
||||
context.map().dblclickEnable(true);
|
||||
}, 1000);
|
||||
var isNewFeature = !mode.isContinuing && mode.button.indexOf('add-preset-') === -1;
|
||||
|
||||
var isNewFeature = !mode.isContinuing && context.presets().match(origWay, context.graph()).isFallback();
|
||||
context.enter(modeSelect(context, [wayID]).newFeature(isNewFeature));
|
||||
if (isNewFeature) {
|
||||
context.validator().validate();
|
||||
|
||||
@@ -35,9 +35,7 @@ export function modeAddPoint(context, customMode) {
|
||||
t('operations.add.annotation.point')
|
||||
);
|
||||
|
||||
context.enter(
|
||||
modeSelect(context, [node.id]).newFeature(!mode.preset)
|
||||
);
|
||||
enterSelectMode(node);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,8 +47,12 @@ export function modeAddPoint(context, customMode) {
|
||||
t('operations.add.annotation.vertex')
|
||||
);
|
||||
|
||||
enterSelectMode(node);
|
||||
}
|
||||
|
||||
function enterSelectMode(node) {
|
||||
context.enter(
|
||||
modeSelect(context, [node.id]).newFeature(!mode.preset)
|
||||
modeSelect(context, [node.id]).newFeature(mode.preset.isFallback())
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user