var addOverlay = function (layer, name, maxArea) {
var item = $("<li>")
- .tooltip({
- placement: "top"
- })
.appendTo(overlays);
+ if (name === "notes" || name === "data") {
+ item
+ .attr("title", I18n.t("javascripts.site.map_" + name + "_zoom_in_tooltip"))
+ .tooltip("disable");
+ }
+
var label = $("<label>")
.attr("class", "form-check-label")
.appendTo(item);
.trigger("change");
}
- $(item).attr("class", disabled ? "disabled" : "");
- item.attr("data-bs-original-title", disabled ? // has additional bug when zooming out from enabled state
- I18n.t("javascripts.site.map_" + name + "_zoom_in_tooltip") : "");
+ $(item)
+ .attr("class", disabled ? "disabled" : "")
+ .tooltip(disabled ? "enable" : "disable");
});
};