Map Data and Background panes no longer reload hidden sections

This commit is contained in:
Quincy Morgan
2019-01-21 15:52:58 -05:00
parent 35ac247ff0
commit 1323ec3d5a
2 changed files with 22 additions and 7 deletions

View File

@@ -28,6 +28,8 @@ import { tooltip } from '../util/tooltip';
export function uiBackground(context) {
var key = t('background.key');
var pane = d3_select(null);
var _customSource = context.background().findSource('custom');
var _previousBackground = context.background().findSource(context.storage('background-last-used-toggle'));
var _shown = false;
@@ -282,8 +284,13 @@ export function uiBackground(context) {
function update() {
updateBackgroundList();
updateOverlayList();
if (!pane.select('.disclosure-wrap-background_list').classed('hide')) {
updateBackgroundList();
}
if (!pane.select('.disclosure-wrap-overlay_list').classed('hide')) {
updateOverlayList();
}
_displayOptionsContainer
.call(backgroundDisplayOptions);
@@ -348,7 +355,7 @@ export function uiBackground(context) {
}
var pane = selection
pane = selection
.append('div')
.attr('class', 'fillL map-pane hide');

View File

@@ -24,6 +24,8 @@ export function uiMapData(context) {
var settingsCustomData = uiSettingsCustomData(context)
.on('change', customChanged);
var pane = d3_select(null);
var _fillSelected = context.storage('area-fill') || 'partial';
var _shown = false;
var _dataLayerContainer = d3_select(null);
@@ -593,9 +595,15 @@ export function uiMapData(context) {
function update() {
updateDataLayers();
updateFillList();
updateFeatureList();
if (!pane.select('.disclosure-wrap-data_layers').classed('hide')) {
updateDataLayers();
}
if (!pane.select('.disclosure-wrap-fill_area').classed('hide')) {
updateFillList();
}
if (!pane.select('.disclosure-wrap-map_features').classed('hide')) {
updateFeatureList();
}
_QAList
.call(drawListItems, ['keep-right'], 'checkbox', 'QA', function(d) { toggleLayer(d); }, showsQA);
@@ -663,7 +671,7 @@ export function uiMapData(context) {
}
var pane = selection
pane = selection
.append('div')
.attr('class', 'fillL map-pane hide');