mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
Fixes an issue where panel sections wouldn't render when toggled if hidden on page load (closes #5743)
This commit is contained in:
@@ -251,6 +251,8 @@ export function uiBackground(context) {
|
||||
.attr('href', 'https://github.com/openstreetmap/iD/blob/master/FAQ.md#how-can-i-report-an-issue-with-background-imagery')
|
||||
.append('span')
|
||||
.text(t('background.imagery_source_faq'));
|
||||
|
||||
updateBackgroundList();
|
||||
}
|
||||
|
||||
|
||||
@@ -263,15 +265,25 @@ export function uiBackground(context) {
|
||||
.attr('class', 'layer-list layer-overlay-list')
|
||||
.attr('dir', 'auto')
|
||||
.merge(container);
|
||||
|
||||
updateOverlayList();
|
||||
}
|
||||
|
||||
function updateBackgroundList() {
|
||||
_backgroundList
|
||||
.call(drawListItems, 'radio', chooseBackground, function(d) { return !d.isHidden() && !d.overlay; });
|
||||
}
|
||||
|
||||
function updateOverlayList() {
|
||||
_overlayList
|
||||
.call(drawListItems, 'checkbox', chooseOverlay, function(d) { return !d.isHidden() && d.overlay; });
|
||||
}
|
||||
|
||||
|
||||
function update() {
|
||||
_backgroundList
|
||||
.call(drawListItems, 'radio', chooseBackground, function(d) { return !d.isHidden() && !d.overlay; });
|
||||
|
||||
_overlayList
|
||||
.call(drawListItems, 'checkbox', chooseOverlay, function(d) { return !d.isHidden() && d.overlay; });
|
||||
updateBackgroundList();
|
||||
updateOverlayList();
|
||||
|
||||
_displayOptionsContainer
|
||||
.call(backgroundDisplayOptions);
|
||||
|
||||
+18
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user