mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-28 13:15:30 +01:00
Make it so that blank label ("") on area marker disables popup on area
This commit is contained in:
parent
102012aa91
commit
708f0b3c80
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user