mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-25 13:30:20 +01:00
map controls and menus
This commit is contained in:
@@ -3537,6 +3537,10 @@ img.tile-removing {
|
||||
border-radius: 0 0 4px 0;
|
||||
}
|
||||
|
||||
[dir='rtl'] .geolocate-control button svg, [dir='rtl'] .list-item-gpx-browse svg {
|
||||
transform: rotateY(180deg);
|
||||
}
|
||||
|
||||
/* map control button overlays */
|
||||
[dir='rtl'] .map-overlay {
|
||||
padding: 20px 20px 20px 50px;
|
||||
|
||||
@@ -150,7 +150,7 @@ export function uiBackground(context) {
|
||||
.attr('class', 'best')
|
||||
.call(tooltip()
|
||||
.title(t('background.best_imagery'))
|
||||
.placement('left'))
|
||||
.placement((iD.detect().textDirection === 'rtl') ? 'right' : 'left'))
|
||||
.append('span')
|
||||
.html('★');
|
||||
|
||||
@@ -337,7 +337,7 @@ export function uiBackground(context) {
|
||||
var content = selection.append('div')
|
||||
.attr('class', 'fillL map-overlay col3 content hide'),
|
||||
tooltipBehavior = tooltip()
|
||||
.placement('left')
|
||||
.placement((iD.detect().textDirection === 'rtl') ? 'right' : 'left')
|
||||
.html(true)
|
||||
.title(uiTooltipHtml(t('background.description'), key)),
|
||||
button = selection.append('button')
|
||||
@@ -369,7 +369,7 @@ export function uiBackground(context) {
|
||||
.on('click.set-opacity', setOpacity)
|
||||
.html('<div class="select-box"></div>')
|
||||
.call(tooltip()
|
||||
.placement('left'))
|
||||
.placement((iD.detect().textDirection === 'rtl') ? 'right' : 'left'))
|
||||
.append('div')
|
||||
.attr('class', 'opacity')
|
||||
.style('opacity', function(d) { return 1.25 - d; });
|
||||
@@ -388,7 +388,7 @@ export function uiBackground(context) {
|
||||
.attr('class', 'layer-browse')
|
||||
.call(tooltip()
|
||||
.title(t('background.custom_button'))
|
||||
.placement('left'))
|
||||
.placement((iD.detect().textDirection === 'rtl') ? 'right' : 'left'))
|
||||
.on('click', editCustom)
|
||||
.call(svgIcon('#icon-search'));
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@ export function uiGeolocate(context) {
|
||||
.attr('title', t('geolocate.title'))
|
||||
.on('click', click)
|
||||
.call(svgIcon('#icon-geolocate', 'light'))
|
||||
.call(tooltip().placement('left'));
|
||||
.call(tooltip()
|
||||
.placement((iD.detect().textDirection === 'rtl') ? 'right' : 'left'));
|
||||
};
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ export function uiHelp(context) {
|
||||
var pane = selection.append('div')
|
||||
.attr('class', 'help-wrap map-overlay fillL col5 content hide'),
|
||||
tooltipBehavior = tooltip()
|
||||
.placement('left')
|
||||
.placement((iD.detect().textDirection === 'rtl') ? 'right' : 'left')
|
||||
.html(true)
|
||||
.title(uiTooltipHtml(t('help.title'), key)),
|
||||
button = selection.append('button')
|
||||
|
||||
@@ -216,7 +216,7 @@ export function uiMapData(context) {
|
||||
.attr('class', 'list-item-gpx-extent')
|
||||
.call(tooltip()
|
||||
.title(t('gpx.zoom'))
|
||||
.placement('left'))
|
||||
.placement((iD.detect().textDirection === 'rtl') ? 'right' : 'left'))
|
||||
.on('click', function() {
|
||||
d3.event.preventDefault();
|
||||
d3.event.stopPropagation();
|
||||
@@ -229,7 +229,7 @@ export function uiMapData(context) {
|
||||
.attr('class', 'list-item-gpx-browse')
|
||||
.call(tooltip()
|
||||
.title(t('gpx.browse'))
|
||||
.placement('left'))
|
||||
.placement((iD.detect().textDirection === 'rtl') ? 'right' : 'left'))
|
||||
.on('click', function() {
|
||||
d3.select(document.createElement('input'))
|
||||
.attr('type', 'file')
|
||||
@@ -388,7 +388,7 @@ export function uiMapData(context) {
|
||||
.append('div')
|
||||
.attr('class', 'fillL map-overlay col3 content hide'),
|
||||
tooltipBehavior = tooltip()
|
||||
.placement('left')
|
||||
.placement((iD.detect().textDirection === 'rtl') ? 'right' : 'left')
|
||||
.html(true)
|
||||
.title(uiTooltipHtml(t('map_data.description'), key)),
|
||||
button = selection
|
||||
|
||||
@@ -57,7 +57,7 @@ export function uiZoom(context) {
|
||||
.attr('class', function(d) { return d.id; })
|
||||
.on('click.editor', function(d) { d.action(); })
|
||||
.call(tooltip()
|
||||
.placement('left')
|
||||
.placement((iD.detect().textDirection === 'rtl') ? 'right' : 'left')
|
||||
.html(true)
|
||||
.title(function(d) {
|
||||
return uiTooltipHtml(d.title, d.key);
|
||||
|
||||
Reference in New Issue
Block a user