Add button to toggle the location panel (re: #6397)

This commit is contained in:
Quincy Morgan
2020-06-24 14:19:52 -04:00
parent d3bb3debba
commit 9041ce3d9b
3 changed files with 31 additions and 2 deletions
+4 -1
View File
@@ -676,8 +676,11 @@ en:
tooltip: Show a zoomed out map to help locate the area currently displayed.
key: '/'
panel:
description: Show Detail Panel
description: Show Background Panel
tooltip: Show advanced background information.
location_panel:
description: Show Location Panel
tooltip: Show coordinates and regional details.
fix_misalignment: Imagery Offset
offset: "Drag anywhere in the gray area below to adjust the imagery offset, or enter the offset values in meters."
map_data:
+5 -1
View File
@@ -845,9 +845,13 @@
"key": "/"
},
"panel": {
"description": "Show Detail Panel",
"description": "Show Background Panel",
"tooltip": "Show advanced background information."
},
"location_panel": {
"description": "Show Location Panel",
"tooltip": "Show coordinate and regional details."
},
"fix_misalignment": "Imagery Offset",
"offset": "Drag anywhere in the gray area below to adjust the imagery offset, or enter the offset values in meters."
},
+22
View File
@@ -96,6 +96,28 @@ export function uiSectionBackgroundList(context) {
.append('span')
.text(t('background.panel.description'));
var locPanelLabelEnter = bgExtrasListEnter
.append('li')
.attr('class', 'location-panel-toggle-item')
.append('label')
.call(uiTooltip()
.title(t('background.location_panel.tooltip'))
.keys([uiCmd('⌘⇧' + t('info_panels.location.key'))])
.placement('top')
);
locPanelLabelEnter
.append('input')
.attr('type', 'checkbox')
.on('change', function() {
d3_event.preventDefault();
context.ui().info.toggle('location');
});
locPanelLabelEnter
.append('span')
.text(t('background.location_panel.description'));
// "Info / Report a Problem" link
selection.selectAll('.imagery-faq')