Add tooltip to minimap toggle control

This commit is contained in:
Bryan Housel
2015-06-15 22:28:40 -04:00
parent 26ca610d0d
commit 641cf98e70
3 changed files with 17 additions and 6 deletions
+3 -1
View File
@@ -267,8 +267,10 @@ en:
custom_button: Edit custom background
custom_prompt: "Enter a tile URL template. Valid tokens are {z}, {x}, {y} for Z/X/Y scheme and {u} for quadtile scheme."
fix_misalignment: Fix alignment
toggle_minimap: Minimap
reset: reset
minimap:
description: Minimap
tooltip: Show a zoomed out map to help locate the area currently displayed.
map_data:
title: Map Data
description: Map Data
+5 -2
View File
@@ -323,8 +323,11 @@
"custom_button": "Edit custom background",
"custom_prompt": "Enter a tile URL template. Valid tokens are {z}, {x}, {y} for Z/X/Y scheme and {u} for quadtile scheme.",
"fix_misalignment": "Fix alignment",
"toggle_minimap": "Minimap",
"reset": "reset"
"reset": "reset",
"minimap": {
"description": "Minimap",
"tooltip": "Show a zoomed out map to help locate the area currently displayed."
}
},
"map_data": {
"title": "Map Data",
+9 -3
View File
@@ -255,7 +255,13 @@ iD.ui.Background = function(context) {
var controls = content.append('div')
.attr('class', 'controls-list');
var minimapLabel = controls.append('label');
var minimapLabel = controls
.append('label')
.call(bootstrap.tooltip()
.html(true)
.title(iD.ui.tooltipHtml(t('background.minimap.tooltip'), '/'))
.placement('top')
);
minimapLabel.classed('minimap-toggle', true)
.append('input')
@@ -263,10 +269,10 @@ iD.ui.Background = function(context) {
.on('change', function() {
iD.ui.MapInMap.toggle();
d3.event.preventDefault();
});
})
minimapLabel.append('span')
.text(t('background.toggle_minimap'));
.text(t('background.minimap.description'));
var adjustments = content.append('div')
.attr('class', 'adjustments');