mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 05:30:35 +02:00
Tweak newFeature in select mode
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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%');
|
||||
|
||||
Reference in New Issue
Block a user