Skip to content

Commit 8e904d2

Browse files
authored
Merge pull request #1206 from NYCPlanning/tyler/dont-hide-streetnames
Add exceptions for street-centerlines layer group to logic for hiding all layers
2 parents 4694a4b + 8cbe8a8 commit 8e904d2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

app/controllers/application.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,11 @@ export default class ApplicationController extends Controller.extend(
135135

136136
this.model.layerGroups
137137
.filter(({ visible }) => visible)
138-
.forEach((model) => this.toggleLayerVisibilityToFalse(model));
138+
.forEach(
139+
(model) =>
140+
model.id !== 'street-centerlines' &&
141+
this.toggleLayerVisibilityToFalse(model)
142+
);
139143
this.handleLayerGroupChange();
140144

141145
this.set('layerGroupsStorage', tempStorage);
@@ -185,7 +189,9 @@ export default class ApplicationController extends Controller.extend(
185189
@computed('layerGroupsStorage', 'model.layerGroups')
186190
get showToggleLayersBackOn() {
187191
if (
188-
this.model.layerGroups.filter(({ visible }) => visible).length === 0 &&
192+
this.model.layerGroups.filter(
193+
({ id, visible }) => visible && id !== 'street-centerlines'
194+
).length === 0 &&
189195
this.layerGroupsStorage
190196
) {
191197
return true;

0 commit comments

Comments
 (0)