.attr("class", "section base-layers")
.appendTo($ui);
- var baseLayers = $("<ul class='list-unstyled'>")
+ var baseLayers = $("<ul class='list-unstyled mb-0'>")
.appendTo(baseSection);
layers.forEach(function (layer) {
var item = $("<li>")
+ .attr("class", "rounded-3")
.appendTo(baseLayers);
if (map.hasLayer(layer)) {
var item = $("<li>")
.appendTo(overlays);
- var tooltip;
if (name === "notes" || name === "data") {
- item.attr("title", I18n.t("javascripts.site.map_" + name + "_zoom_in_tooltip"));
- tooltip = new bootstrap.Tooltip(item[0]);
- tooltip.disable();
+ item
+ .attr("title", I18n.t("javascripts.site.map_" + name + "_zoom_in_tooltip"))
+ .tooltip("disable");
}
var label = $("<label>")
.trigger("change");
}
- $(item).attr("class", disabled ? "disabled" : "");
- if (tooltip) {
- if (disabled) {
- tooltip.enable();
- } else {
- tooltip.disable();
- }
- }
+ $(item)
+ .attr("class", disabled ? "disabled" : "")
+ .tooltip(disabled ? "enable" : "disable");
});
};