compassinformatics / cpsi-mapview

GNU General Public License v3.0
6 stars 14 forks source link

Layers with requiredRole turning off automatically #581

Closed geographika closed 2 years ago

geographika commented 2 years ago

@JakobMiksch - something that has come to light in testing #576 is that the filter function runs for all nodes in the tree and switches off layers unexpectedly. See example below, both layers have a requiredRole property set, but turning on the second layer turns off the first:

Pavement Management System (5)

Relevant code below. It looks like visibility gets set to its definition in the tree. Maybe simply checking if the layer is already visible, and not turning off it is the case is enough to fix it?

https://github.com/compassinformatics/cpsi-mapview/blob/e35955ab9857185e22aad52ab57bd1053beba3d6/app/controller/LayerTreeController.js#L228-L233

geographika commented 2 years ago

Can probably ignore now #583 is added?

geographika commented 2 years ago

@JakobMiksch - unless there is anything you have concerns about, I will close this.

JakobMiksch commented 2 years ago

@geographika from what I see do not have any concerns closing. However, I have not tested it again. Let me know if I shall test it locally again to confirm.

geographika commented 2 years ago

Tested in child applications and all is ok. Closing.