1 L.OSM.note = function (options) {
2 var control = L.control(options);
4 control.onAdd = function (map) {
5 var $container = $("<div>")
6 .attr("class", "control-note");
9 .attr("class", "control-button")
11 .html("<span class=\"icon note\"></span>")
12 .appendTo($container);
14 map.on("zoomend", update);
17 var disabled = OSM.STATUS === "database_offline" || map.getZoom() < 12;
19 .toggleClass("disabled", disabled)
20 .attr("data-bs-original-title", I18n.t(disabled ?
21 "javascripts.site.createnote_disabled_tooltip" :
22 "javascripts.site.createnote_tooltip"));