Skip to content

Commit

Permalink
Merge pull request #1206 from NYCPlanning/tyler/dont-hide-streetnames
Browse files Browse the repository at this point in the history
Add exceptions for street-centerlines layer group to logic for hiding all layers
  • Loading branch information
TylerMatteo authored Jul 21, 2024
2 parents 4694a4b + 8cbe8a8 commit 8e904d2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions app/controllers/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ export default class ApplicationController extends Controller.extend(

this.model.layerGroups
.filter(({ visible }) => visible)
.forEach((model) => this.toggleLayerVisibilityToFalse(model));
.forEach(
(model) =>
model.id !== 'street-centerlines' &&
this.toggleLayerVisibilityToFalse(model)
);
this.handleLayerGroupChange();

this.set('layerGroupsStorage', tempStorage);
Expand Down Expand Up @@ -185,7 +189,9 @@ export default class ApplicationController extends Controller.extend(
@computed('layerGroupsStorage', 'model.layerGroups')
get showToggleLayersBackOn() {
if (
this.model.layerGroups.filter(({ visible }) => visible).length === 0 &&
this.model.layerGroups.filter(
({ id, visible }) => visible && id !== 'street-centerlines'
).length === 0 &&
this.layerGroupsStorage
) {
return true;
Expand Down

0 comments on commit 8e904d2

Please sign in to comment.