mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-20 23:44:47 +02:00
Show turn restriction editor for any intersection
This commit is contained in:
@@ -4245,9 +4245,6 @@
|
||||
"tags": {
|
||||
"highway": "traffic_signals"
|
||||
},
|
||||
"fields": [
|
||||
"restrictions"
|
||||
],
|
||||
"terms": [
|
||||
"light",
|
||||
"stoplight",
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
"tags": {
|
||||
"highway": "traffic_signals"
|
||||
},
|
||||
"fields": [
|
||||
"restrictions"
|
||||
],
|
||||
"terms": [
|
||||
"light",
|
||||
"stoplight",
|
||||
|
||||
@@ -31,7 +31,12 @@ iD.ui.Inspector = function(context) {
|
||||
var $presetPane = $wrap.select('.preset-list-pane');
|
||||
var $editorPane = $wrap.select('.entity-editor-pane');
|
||||
|
||||
var showEditor = state === 'hover' || context.entity(entityID).isUsed(context.graph());
|
||||
var graph = context.graph(),
|
||||
entity = context.entity(entityID),
|
||||
showEditor = state === 'hover' ||
|
||||
entity.isUsed(graph) ||
|
||||
entity.isIntersection(graph);
|
||||
|
||||
if (showEditor) {
|
||||
$wrap.style('right', '0%');
|
||||
$editorPane.call(entityEditor);
|
||||
|
||||
+5
-1
@@ -72,6 +72,10 @@ iD.ui.preset = function(context) {
|
||||
}
|
||||
});
|
||||
|
||||
if (geometry === 'vertex' && entity.isIntersection(context.graph())) {
|
||||
fields.push(UIField(context.presets().field('restrictions'), entity, true));
|
||||
}
|
||||
|
||||
context.presets().universal().forEach(function(field) {
|
||||
if (preset.fields.indexOf(field) < 0) {
|
||||
fields.push(UIField(field, entity));
|
||||
@@ -177,7 +181,7 @@ iD.ui.preset = function(context) {
|
||||
|
||||
function show(field) {
|
||||
field.show = true;
|
||||
presets(selection);
|
||||
context.presets()(selection);
|
||||
field.input.focus();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user