mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-24 09:04:02 +02:00
refactor isOneWay to properly support bidirectional ways (#10730)
This commit is contained in:
@@ -7,7 +7,6 @@ import {
|
||||
import { utilRebind } from '../../util/rebind';
|
||||
import { t } from '../../core/localizer';
|
||||
import { actionReverse } from '../../actions/reverse';
|
||||
import { osmOneWayTags } from '../../osm';
|
||||
import { svgIcon } from '../../svg/icon';
|
||||
|
||||
export { uiFieldCheck as uiFieldDefaultCheck };
|
||||
@@ -61,12 +60,9 @@ export function uiFieldCheck(field, context) {
|
||||
// where implied oneway tag exists (e.g. `junction=roundabout`) #2220, #1841
|
||||
if (field.id === 'oneway') {
|
||||
var entity = context.entity(_entityIDs[0]);
|
||||
for (var key in entity.tags) {
|
||||
if (key in osmOneWayTags && (entity.tags[key] in osmOneWayTags[key])) {
|
||||
_impliedYes = true;
|
||||
texts[0] = t.html('_tagging.presets.fields.oneway_yes.options.undefined');
|
||||
break;
|
||||
}
|
||||
if (entity.type === 'way' && entity.isOneWay()) {
|
||||
_impliedYes = true;
|
||||
texts[0] = t.html('_tagging.presets.fields.oneway_yes.options.undefined');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user