mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
Rename panel Imagery -> Background, change key G -> B
This commit is contained in:
@@ -2732,7 +2732,6 @@ img.tile-removing {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.panel-content-location .imagery-info,
|
||||
.panel-content-location .location-info {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
@@ -284,9 +284,9 @@ en:
|
||||
changeset: Changeset
|
||||
unknown: Unknown
|
||||
link_text: History on openstreetmap.org
|
||||
imagery:
|
||||
key: G
|
||||
title: Imagery
|
||||
background:
|
||||
key: B
|
||||
title: Background
|
||||
zoom: Zoom
|
||||
vintage: Vintage
|
||||
unknown: Unknown
|
||||
|
||||
6
dist/locales/en.json
vendored
6
dist/locales/en.json
vendored
@@ -361,9 +361,9 @@
|
||||
"unknown": "Unknown",
|
||||
"link_text": "History on openstreetmap.org"
|
||||
},
|
||||
"imagery": {
|
||||
"key": "G",
|
||||
"title": "Imagery",
|
||||
"background": {
|
||||
"key": "B",
|
||||
"title": "Background",
|
||||
"zoom": "Zoom",
|
||||
"vintage": "Vintage",
|
||||
"unknown": "Unknown",
|
||||
|
||||
@@ -150,7 +150,6 @@ export function rendererTileLayer(context) {
|
||||
|
||||
function tileCenter(d) {
|
||||
var _ts = tileSize * Math.pow(2, z - d[2]);
|
||||
var scale = tileSizeAtZoom(d, z);
|
||||
return [
|
||||
((d[0] * _ts) - tileOrigin[0] + pixelOffset[0] + (_ts / 2)),
|
||||
((d[1] * _ts) - tileOrigin[1] + pixelOffset[1] + (_ts / 2))
|
||||
@@ -245,7 +244,7 @@ export function rendererTileLayer(context) {
|
||||
var center = context.projection.invert(tileCenter(d));
|
||||
source.getVintage(center, d, function(err, result) {
|
||||
span.text((result && result.range) ||
|
||||
t('infobox.imagery.vintage') + ': ' + t('infobox.imagery.unknown')
|
||||
t('infobox.background.vintage') + ': ' + t('infobox.background.unknown')
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@ import _ from 'lodash';
|
||||
import { t } from '../../util/locale';
|
||||
|
||||
|
||||
export function uiPanelImagery(context) {
|
||||
export function uiPanelBackground(context) {
|
||||
var background = context.background();
|
||||
var currSource = null;
|
||||
var currZoom = '';
|
||||
@@ -23,7 +23,7 @@ export function uiPanelImagery(context) {
|
||||
|
||||
var list = selection
|
||||
.append('ul')
|
||||
.attr('class', 'imagery-info');
|
||||
.attr('class', 'background-info');
|
||||
|
||||
list
|
||||
.append('li')
|
||||
@@ -31,14 +31,14 @@ export function uiPanelImagery(context) {
|
||||
|
||||
list
|
||||
.append('li')
|
||||
.text(t('infobox.imagery.zoom') + ': ')
|
||||
.text(t('infobox.background.zoom') + ': ')
|
||||
.append('span')
|
||||
.attr('class', 'zoom')
|
||||
.text(currZoom);
|
||||
|
||||
list
|
||||
.append('li')
|
||||
.text(t('infobox.imagery.vintage') + ': ')
|
||||
.text(t('infobox.background.vintage') + ': ')
|
||||
.append('span')
|
||||
.attr('class', 'vintage')
|
||||
.text(currVintage);
|
||||
@@ -51,7 +51,7 @@ export function uiPanelImagery(context) {
|
||||
|
||||
selection
|
||||
.append('a')
|
||||
.text(t('infobox.imagery.' + toggle))
|
||||
.text(t('infobox.background.' + toggle))
|
||||
.attr('href', '#')
|
||||
.attr('class', 'button button-toggle-tiles')
|
||||
.on('click', function() {
|
||||
@@ -77,7 +77,7 @@ export function uiPanelImagery(context) {
|
||||
|
||||
if (!d || !d.length >= 3) return;
|
||||
background.baseLayerSource().getVintage(center, d, function(err, result) {
|
||||
currVintage = (result && result.range) || t('infobox.imagery.unknown');
|
||||
currVintage = (result && result.range) || t('infobox.background.unknown');
|
||||
selection.selectAll('.vintage')
|
||||
.text(currVintage);
|
||||
});
|
||||
@@ -88,10 +88,10 @@ export function uiPanelImagery(context) {
|
||||
selection.call(redraw);
|
||||
|
||||
context.map()
|
||||
.on('drawn.info-imagery', function() {
|
||||
.on('drawn.info-background', function() {
|
||||
selection.call(redraw);
|
||||
})
|
||||
.on('move.info-imagery', function() {
|
||||
.on('move.info-background', function() {
|
||||
selection.call(debouncedGetVintage);
|
||||
});
|
||||
|
||||
@@ -99,13 +99,13 @@ export function uiPanelImagery(context) {
|
||||
|
||||
panel.off = function() {
|
||||
context.map()
|
||||
.on('drawn.info-imagery', null)
|
||||
.on('move.info-imagery', null);
|
||||
.on('drawn.info-background', null)
|
||||
.on('move.info-background', null);
|
||||
};
|
||||
|
||||
panel.id = 'imagery';
|
||||
panel.title = t('infobox.imagery.title');
|
||||
panel.key = t('infobox.imagery.key');
|
||||
panel.id = 'background';
|
||||
panel.title = t('infobox.background.title');
|
||||
panel.key = t('infobox.background.key');
|
||||
|
||||
|
||||
return panel;
|
||||
@@ -1,16 +1,16 @@
|
||||
export * from './background';
|
||||
export * from './history';
|
||||
export * from './imagery';
|
||||
export * from './location';
|
||||
export * from './measurement';
|
||||
|
||||
import { uiPanelBackground } from './background';
|
||||
import { uiPanelHistory } from './history';
|
||||
import { uiPanelImagery } from './imagery';
|
||||
import { uiPanelLocation } from './location';
|
||||
import { uiPanelMeasurement } from './measurement';
|
||||
|
||||
export var uiInfoPanels = {
|
||||
background: uiPanelBackground,
|
||||
history: uiPanelHistory,
|
||||
imagery: uiPanelImagery,
|
||||
location: uiPanelLocation,
|
||||
measurement: uiPanelMeasurement,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user