1 L.OSM.sidebarPane = function (options, uiClass, buttonTitle, paneTitle) {
2 const control = L.control(options);
4 control.onAdd = function (map) {
5 const $container = $("<div>")
6 .attr("class", "control-" + uiClass);
8 const button = $("<a>")
9 .attr("class", "control-button")
11 .html("<span class=\"icon " + uiClass + "\"></span>")
15 button.attr("title", I18n.t(buttonTitle));
18 button.appendTo($container);
20 const $ui = $("<div>")
21 .attr("class", `${uiClass}-ui position-relative z-n1`);
23 $("<h2 class='p-3 pb-0 pe-5 text-break'>")
24 .text(I18n.t(paneTitle))
27 options.sidebar.addPane($ui);
29 this.onAddPane(map, button, $ui, toggle);
34 if (!button.hasClass("disabled")) {
35 options.sidebar.togglePane($ui, button);
37 $(".leaflet-control .control-button").tooltip("hide");
43 // control.onAddPane = function (map, button, $ui, toggle) {