OpenWaterFoundation / owf-app-infomapper-ng

Open Water Foundation InfoMapper web application for menu-driven maps and visualizations, using Angular
GNU General Public License v3.0
1 stars 2 forks source link

Group with one raster that is unselected shows full legend #344

Closed smalers closed 3 years ago

smalers commented 3 years ago

See District Land Development layer, which has selectedInitial=False property set for the layer view. The legend should be compressed but is displayed.

Nightsphere commented 3 years ago

The check for this is done on a string only, and so has been updated with the latest push. It ignores case, and will not display in the legend if the layer is toggled off. Closing the issue.

smalers commented 3 years ago

I just pulled the most recent InfoMapper and this is still an issue. A raster layer that is initially not selected is showing its full legend. I'm reopening.

image

Nightsphere commented 3 years ago

I see where my issue was. I sincerely miss the ignoreCase( ) function in Java, but I'm learning to convert every applicable string to upper case to check between two. The irritating part is that I've already compared dozens of them already in the months past, so I'm slowly learning where there's issues as development goes on, and updating them accordingly. I'll wait to close again until Steve's is working as well.

smalers commented 3 years ago

It seems like the code would benefit from something like StringUtil where functions like equalsIgnoreCase method could be added. Over time, languages tend to add such things and the need for the utility code goes away.

smalers commented 3 years ago

I pulled the current InfoMapper. It still is not correct. In this case the layer is now showing up as selected but no legend. It should be not selected and no legend.

image

Nightsphere commented 3 years ago

I'm confused, as the code I changed only deals with showing and hiding the legend description and symbol, and checking and unchecking the toggle button. It has nothing to do with displaying the layer. I could reproduce the issue before, but can't now. I'll see what I can do to resolve this.

smalers commented 3 years ago

Sorry, my bad. I was in a hurry and confused the Colorado State Boundary on the bottom with the District Land Development layer. I'm closing the issue.