sign drop-down now only shows rules that actually match something
This commit is contained in:
@@ -598,6 +598,11 @@ var overviewer = {
|
||||
var items = [];
|
||||
for (i in overviewerConfig.objectGroups.signs) {
|
||||
var signGroup = overviewerConfig.objectGroups.signs[i];
|
||||
// don't create an option for this group if empty
|
||||
if (overviewer.collections.markers[signGroup.label].length == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var iconURL = signGroup.icon;
|
||||
if(!iconURL) {
|
||||
iconURL = overviewerConfig.CONST.image.defaultMarker;
|
||||
@@ -616,8 +621,12 @@ var overviewer = {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// only create drop down if there's used options
|
||||
if (items.length > 0) {
|
||||
overviewer.util.createDropDown('Signposts', items);
|
||||
}
|
||||
}
|
||||
|
||||
// if there are any regions data, lets show the option to hide/show them.
|
||||
if (overviewerConfig.objectGroups.regions.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user