Tweak newFeature in select mode

This commit is contained in:
Quincy Morgan
2019-03-26 16:34:23 -04:00
parent 4821bf0a68
commit 67fc051632
3 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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)
);
}
+4 -3
View File
@@ -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%');