From e71381ed458a72590d30d43bf1dc963fd2deb3fe Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 14 Jul 2017 00:45:20 -0400 Subject: [PATCH] Adjust street sign image dimensions to try to make them less blurry (still kinda blurry but closes #4145 anyway) --- css/60_mapillary.css | 23 +++++++---------------- modules/svg/mapillary_signs.js | 8 ++++---- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/css/60_mapillary.css b/css/60_mapillary.css index 578e96a9b..a248a1ac2 100644 --- a/css/60_mapillary.css +++ b/css/60_mapillary.css @@ -46,9 +46,9 @@ .layer-mapillary-signs .icon-sign .icon-sign-body { min-width: 20px; - height: 28px; - width: 28px; - border: 2px solid transparent; + height: 24px; + width: 24px; + outline: 2px solid transparent; pointer-events: visible; cursor: pointer; /* Opera */ cursor: url(img/cursor-select-mapillary.png) 6 1, pointer; /* FF */ @@ -57,21 +57,12 @@ } .layer-mapillary-signs .icon-sign:hover .icon-sign-body { - border: 2px solid rgba(255,198,0,0.8); + outline: 2px solid rgba(255,198,0,0.8); z-index: 80; - } +} .layer-mapillary-signs .icon-sign.selected .icon-sign-body { - border: 2px solid rgba(255,0,0,0.8); - z-index: 80; - } - -.layer-mapillary-signs .icon-sign .t { - font-size: 28px; - z-index: 70; -} - -.layer-mapillary-signs .icon-sign:hover .t, -.layer-mapillary-signs .icon-sign.selected .t { + outline: 2px solid rgba(255,0,0,0.8); z-index: 80; } + diff --git a/modules/svg/mapillary_signs.js b/modules/svg/mapillary_signs.js index 36897a735..77b1b1ef2 100644 --- a/modules/svg/mapillary_signs.js +++ b/modules/svg/mapillary_signs.js @@ -88,8 +88,8 @@ export function svgMapillarySigns(projection, context, dispatch) { var enter = signs.enter() .append('foreignObject') .attr('class', 'icon-sign') - .attr('width', '32px') // for Firefox - .attr('height', '32px') // for Firefox + .attr('width', '24px') // for Firefox + .attr('height', '24px') // for Firefox .classed('selected', function(d) { return _.some(d.detections, function(detection) { return detection.image_key === imageKey; @@ -104,8 +104,8 @@ export function svgMapillarySigns(projection, context, dispatch) { signs .merge(enter) - .attr('x', function(d) { return projection(d.loc)[0] - 16; }) // offset by -16px to - .attr('y', function(d) { return projection(d.loc)[1] - 16; }); // center signs on loc + .attr('x', function(d) { return projection(d.loc)[0] - 12; }) // offset by -12px to + .attr('y', function(d) { return projection(d.loc)[1] - 12; }); // center signs on loc }