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);
19 var disabled = map.getZoom() < 12;
21 .toggleClass('disabled', disabled)
22 .attr('data-original-title', I18n.t(disabled ?
23 'javascripts.site.createnote_disabled_tooltip' :
24 'javascripts.site.createnote_tooltip'));