Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(map-layers): stop layers shown even if disabled #884

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions app/util/mapLayerUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,17 +146,7 @@ export const getMapLayerOptions = (options = {}) => {
...options,
};
lockedMapLayers.forEach(key => {
// Stop keyword locks every mode
if (key === 'stop') {
Object.keys(layerOptions[key]).forEach(subKey => {
if (layerOptions[key][subKey]) {
layerOptions[key][subKey].isLocked = true;
layerOptions[key][subKey].isSelected =
selectedMapLayers.includes(subKey) ||
selectedMapLayers.includes(key);
}
});
} else if (layerOptions.stop[key] && allModes.includes(key)) {
if (layerOptions.stop[key] && allModes.includes(key)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure whether the lockedMapLayers are needed for StadtNavi at all or if the could removed from code completely.

layerOptions.stop[key].isLocked = lockedMapLayers.includes(key);
layerOptions.stop[key].isSelected = selectedMapLayers.includes(key);
} else if (layerOptions[key]) {
Expand Down
Loading