From 67fc051632fcc74ece2039c96c441a00631d6053 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Tue, 26 Mar 2019 16:34:23 -0400 Subject: [PATCH] Tweak newFeature in select mode --- modules/behavior/draw_way.js | 2 +- modules/modes/add_point.js | 2 +- modules/ui/inspector.js | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/behavior/draw_way.js b/modules/behavior/draw_way.js index 1574a35d9..11d5e652d 100644 --- a/modules/behavior/draw_way.js +++ b/modules/behavior/draw_way.js @@ -347,7 +347,7 @@ export function behaviorDrawWay(context, wayID, index, mode, startGraph, baselin context.map().dblclickEnable(true); }, 1000); - var isNewFeature = !mode.isContinuing && context.presets().match(origWay, context.graph()).isFallback(); + var isNewFeature = !mode.isContinuing; context.enter(modeSelect(context, [wayID]).newFeature(isNewFeature)); if (isNewFeature) { context.validator().validate(); diff --git a/modules/modes/add_point.js b/modules/modes/add_point.js index 071748aa1..e854e3392 100644 --- a/modules/modes/add_point.js +++ b/modules/modes/add_point.js @@ -47,7 +47,7 @@ export function modeAddPoint(context, mode) { function enterSelectMode(node) { context.enter( - modeSelect(context, [node.id]).newFeature(mode.preset.isFallback()) + modeSelect(context, [node.id]).newFeature(true) ); } diff --git a/modules/ui/inspector.js b/modules/ui/inspector.js index 6d4bca2a1..264b45380 100644 --- a/modules/ui/inspector.js +++ b/modules/ui/inspector.js @@ -49,10 +49,11 @@ export function uiInspector(context) { var entity = context.entity(_entityID); + var hasNonGeometryTags = entity.hasNonGeometryTags(); var isTaglessOrIntersectionVertex = entity.geometry(context.graph()) === 'vertex' && - (!entity.hasNonGeometryTags() && !entity.isHighwayIntersection(context.graph())); - // start with the preset list if the feature is new or is an uninteresting vertex - var showPresetList = newFeature || isTaglessOrIntersectionVertex; + (!hasNonGeometryTags && !entity.isHighwayIntersection(context.graph())); + // start with the preset list if the feature is new and untagged or is an uninteresting vertex + var showPresetList = (newFeature && !hasNonGeometryTags) || isTaglessOrIntersectionVertex; if (showPresetList) { wrap.style('right', '-100%');