0

sign drop-down now only shows rules that actually match something

This commit is contained in:
Aaron Griffith
2011-06-08 14:57:21 -04:00
parent c2bf7ff34e
commit 454c1537a6

View File

@@ -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) {