From ca9aac501b4af6584b52a7d5a288dc7282db8efc Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 9 Feb 2018 23:12:02 -0500 Subject: [PATCH] Adjust text hint colors, change "Continue" to "Straight on" --- css/80_app.css | 7 ++++--- modules/ui/fields/restrictions.js | 12 ++++-------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/css/80_app.css b/css/80_app.css index 7af6387bb..234a4c7f3 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -1841,6 +1841,7 @@ input[type=number] { } .restriction-detail input { + width: 60px; margin: 0px 10px; vertical-align: middle; } @@ -1876,13 +1877,13 @@ input[type=number] { font-weight: bold; } .restriction-help span.qualifier.allow { - color: #8cd05f; + color: #8b5; } .restriction-help span.qualifier.restrict { - color: #e06d5f; + color: #d76; } .restriction-help span.qualifier.only { - color: #7092ff; + color: #78f; } /* Changeset editor while comment text is empty */ diff --git a/modules/ui/fields/restrictions.js b/modules/ui/fields/restrictions.js index 5ce901041..c4b21f654 100644 --- a/modules/ui/fields/restrictions.js +++ b/modules/ui/fields/restrictions.js @@ -73,7 +73,7 @@ export function uiFieldRestrictions(field, context) { // for example, a vertex of two `highway=path` // In this case, hide the field. var isOK = (_intersection && _intersection.vertices.length && _intersection.ways.length); - d3_select(selection.node().parentNode).classed('hide', !isOK) + d3_select(selection.node().parentNode).classed('hide', !isOK); // if form field is hidden or has detached from dom, clean up. if (!isOK || @@ -85,12 +85,6 @@ export function uiFieldRestrictions(field, context) { } - - - var isComplex = (isOK && _intersection.vertices.length > 1); - - - var wrap = selection.selectAll('.preset-input-wrap') .data([0]); @@ -99,6 +93,8 @@ export function uiFieldRestrictions(field, context) { .attr('class', 'preset-input-wrap') .merge(wrap); + var isComplex = (isOK && _intersection.vertices.length > 1); + var detailControl = wrap.selectAll('.restriction-detail') .data(isComplex ? [0]: []); @@ -333,7 +329,7 @@ export function uiFieldRestrictions(field, context) { 'no_left_turn': 'Left Turn', 'no_right_turn': 'Right Turn', 'no_u_turn': 'U-Turn', - 'no_straight_on': 'Continuing' + 'no_straight_on': 'Straight On' }[osmInferRestriction(vgraph, datum.from, datum.to, projection)]; var restrictType = '';