Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow asset_group and asset_category to coexist in layer config #5335

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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