From 8cbe8a81bf1da32b5c23c7e8fb17006b37ec35f2 Mon Sep 17 00:00:00 2001 From: Tyler Matteo Date: Sun, 21 Jul 2024 09:32:17 -0400 Subject: [PATCH] Add exceptions for street-centerlines layer group to logic for hiding all layers --- app/controllers/application.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/controllers/application.js b/app/controllers/application.js index d85a094b..e61ff811 100644 --- a/app/controllers/application.js +++ b/app/controllers/application.js @@ -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); @@ -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;