walkermatt / ol-layerswitcher

Layer control for OpenLayers
MIT License
384 stars 176 forks source link

Add "disabled" class for out-of-zoom-range groups #493

Closed gmerciel closed 1 year ago

gmerciel commented 1 year ago

Fix for issue #488

walkermatt commented 1 year ago

@gmerciel thanks for looking at this. Could you please move the logic into a static function that returns a boolean to indicate if a given layer is within zoom threshold. If you could also add some tests that would be fantastic.