Rename panel Imagery -> Background, change key G -> B

This commit is contained in:
Bryan Housel
2017-07-04 01:15:36 -04:00
parent 448b71cbce
commit cb249cc28b
6 changed files with 23 additions and 25 deletions

View File

@@ -2732,7 +2732,6 @@ img.tile-removing {
margin-top: 10px;
}
.panel-content-location .imagery-info,
.panel-content-location .location-info {
margin-top: 10px;
}

View File

@@ -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

View File

@@ -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",

View File

@@ -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')
);
});
});

View File

@@ -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;

View File

@@ -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,
};