mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-16 05:49:16 +02:00
Add tooltip to minimap toggle control
This commit is contained in:
+3
-1
@@ -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
|
||||
|
||||
Vendored
+5
-2
@@ -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",
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user