Skip to content

Commit

Permalink
Allow asset_group and asset_category to coexist in layer config
Browse files Browse the repository at this point in the history
  • Loading branch information
davea committed Jan 20, 2025
1 parent 4a3c3d9 commit 4b16c3a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web/cobrands/fixmystreet/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ OpenLayers.Layer.VectorBase = OpenLayers.Class(OpenLayers.Layer.Vector, {
// layers attached with groups that should also apply to categories
// with the same name
relevant = (OpenLayers.Util.indexOf(layer.asset_group, group) != -1 || OpenLayers.Util.indexOf(layer.asset_group, category) != -1);
} else {
}
// if not already relevant, check asset_category next. Doing this independently
// of asset_group allows config to specific both asset_group and asset_category
// and layer will be relevant if either match.
if (!relevant && layer.asset_category) {
relevant = (OpenLayers.Util.indexOf(layer.asset_category, category) != -1);
}
return relevant &&
Expand Down

0 comments on commit 4b16c3a

Please sign in to comment.