diff --git a/css/80_app.css b/css/80_app.css index aafb070df..040001c1f 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -2707,33 +2707,33 @@ img.tile-removing { position: relative; } +.panel-content .button { + display: inline-block; + background: #7092ff; + border-radius: 2px; + padding: 0 4px; + margin-top: 5px; + color: white; +} + .panel-content-history .links a { - padding-left: 10px; + margin-left: 10px; } [dir='rtl'] .panel-content-history .links a { - padding-left: auto; - padding-right: 10px; + margin-left: auto; + margin-right: 10px; } .panel-content-history .view-history-on-osm { display: block; - padding: 10px 0; + margin-top: 10px; } .panel-content-location .imagery-info, .panel-content-location .location-info { - padding-top: 10px; + margin-top: 10px; } -.panel-content-measurement .button { - position: absolute; - background: #7092ff; - border-radius: 2px; - padding: 0 4px; - color: white; - top: 6px; - right: 10px; -} /* About Section ------------------------------------------------------- */ diff --git a/data/core.yaml b/data/core.yaml index a46e6b760..6df29a85e 100644 --- a/data/core.yaml +++ b/data/core.yaml @@ -290,6 +290,8 @@ en: zoom: Zoom vintage: Vintage unknown: Unknown + show_tiles: Show Tiles + hide_tiles: Hide Tiles location: key: L title: Location diff --git a/dist/locales/en.json b/dist/locales/en.json index 3729d70db..3a7d6752b 100644 --- a/dist/locales/en.json +++ b/dist/locales/en.json @@ -366,7 +366,9 @@ "title": "Imagery", "zoom": "Zoom", "vintage": "Vintage", - "unknown": "Unknown" + "unknown": "Unknown", + "show_tiles": "Show Tiles", + "hide_tiles": "Hide Tiles" }, "location": { "key": "L", diff --git a/modules/ui/panels/imagery.js b/modules/ui/panels/imagery.js index 15b697268..3d57fa65f 100644 --- a/modules/ui/panels/imagery.js +++ b/modules/ui/panels/imagery.js @@ -46,6 +46,19 @@ export function uiPanelImagery(context) { if (!currVintage) { debouncedGetVintage(selection); } + + var toggle = context.getDebug('tile') ? 'hide_tiles' : 'show_tiles'; + + selection + .append('a') + .text(t('infobox.imagery.' + toggle)) + .attr('href', '#') + .attr('class', 'button button-toggle-tiles') + .on('click', function() { + d3.event.preventDefault(); + context.setDebug('tile', !context.getDebug('tile')); + selection.call(redraw); + }); } diff --git a/modules/ui/panels/measurement.js b/modules/ui/panels/measurement.js index 35afd1e6d..499ed29bf 100644 --- a/modules/ui/panels/measurement.js +++ b/modules/ui/panels/measurement.js @@ -188,7 +188,7 @@ export function uiPanelMeasurement(context) { .append('a') .text(t('infobox.measurement.' + toggle)) .attr('href', '#') - .attr('class', 'button') + .attr('class', 'button button-toggle-units') .on('click', function() { d3.event.preventDefault(); isImperial = !isImperial;