0

fixed bug in sign groups js, for checked: true

related to issue #321
<https://github.com/brownan/Minecraft-Overviewer/issues/321>
This commit is contained in:
Aaron Griffith
2011-04-10 03:21:55 -04:00
parent 38deb98d5a
commit cb8a17c448

View File

@@ -153,7 +153,12 @@ function initMarkers() {
if (markersInit) { return; } if (markersInit) { return; }
markersInit = true; markersInit = true;
// first, give all collections an empty array to work with
for (i in signGroups) {
markerCollection[signGroups[i].label] = [];
}
for (i in markerData) { for (i in markerData) {
var item = markerData[i]; var item = markerData[i];
@@ -195,11 +200,8 @@ function initMarkers() {
icon: iconURL, icon: iconURL,
visible: false visible: false
}); });
if (markerCollection[label]) {
markerCollection[label].push(marker); markerCollection[label].push(marker);
} else {
markerCollection[label] = [marker];
}
if (item.type == 'sign') { if (item.type == 'sign') {
prepareSignMarker(marker, item); prepareSignMarker(marker, item);