Fixes an issue where panel sections wouldn't render when toggled if hidden on page load (closes #5743)

This commit is contained in:
Quincy Morgan
2019-01-21 15:22:50 -05:00
parent 92f1c4964f
commit 35ac247ff0
2 changed files with 34 additions and 6 deletions
+18 -2
View File
@@ -542,6 +542,8 @@ export function uiMapData(context) {
.append('div')
.attr('class', 'data-layer-container')
.merge(container);
updateDataLayers();
}
@@ -553,6 +555,8 @@ export function uiMapData(context) {
.append('ul')
.attr('class', 'layer-list layer-fill-list')
.merge(container);
updateFillList();
}
@@ -564,22 +568,34 @@ export function uiMapData(context) {
.append('ul')
.attr('class', 'layer-list layer-feature-list')
.merge(container);
updateFeatureList();
}
function update() {
function updateDataLayers() {
_dataLayerContainer
.call(drawOsmItems)
.call(drawQAItems)
.call(drawPhotoItems)
.call(drawCustomDataItems)
.call(drawVectorItems); // Beta - Detroit mapping challenge
}
function updateFillList() {
_fillList
.call(drawListItems, fills, 'radio', 'area_fill', setFill, showsFill);
}
function updateFeatureList() {
_featureList
.call(drawListItems, features, 'checkbox', 'feature', clickFeature, showsFeature);
}
function update() {
updateDataLayers();
updateFillList();
updateFeatureList();
_QAList
.call(drawListItems, ['keep-right'], 'checkbox', 'QA', function(d) { toggleLayer(d); }, showsQA);