Move string processing into background_source

This commit is contained in:
Bryan Housel
2017-09-12 17:02:17 -04:00
parent 75fcb892f8
commit 1fcceeb0e8
2 changed files with 24 additions and 19 deletions
+1 -11
View File
@@ -40,9 +40,7 @@ export function uiPanelBackground(context) {
.text(metadata[k]);
});
if (!metadata.zoom) {
debouncedGetMetadata(selection);
}
debouncedGetMetadata(selection);
var toggle = context.getDebug('tile') ? 'hide_tiles' : 'show_tiles';
@@ -94,14 +92,6 @@ export function uiPanelBackground(context) {
_.without(metadataKeys, 'zoom', 'vintage')
.forEach(function(k) {
var val = result[k];
// append units to numeric data
if (k === 'resolution' || k === 'accuracy') {
if (val && isFinite(val)) {
val += ' m';
}
}
metadata[k] = val;
selection.selectAll('.background-info-list-' + k)
.classed('hide', !val)