Make it so that blank label ("") on area marker disables popup on area

This commit is contained in:
Mike Primm 2011-12-15 23:48:11 +08:00 committed by mikeprimm
parent 102012aa91
commit 708f0b3c80

View File

@ -125,6 +125,7 @@ componentconstructors['markers'] = function(dynmap, configuration) {
} }
} }
area.timestamp = ts; area.timestamp = ts;
if(area.label != "") {
var popup = document.createElement('div'); var popup = document.createElement('div');
if(area.desc) { if(area.desc) {
$(popup).addClass('AreaPopup').append(area.desc); $(popup).addClass('AreaPopup').append(area.desc);
@ -136,7 +137,7 @@ componentconstructors['markers'] = function(dynmap, configuration) {
$(popup).text(area.label); $(popup).text(area.label);
} }
area.our_area.bindPopup(popup, {}); area.our_area.bindPopup(popup, {});
}
set.layergroup.addLayer(area.our_area); set.layergroup.addLayer(area.our_area);
} }