Position Leaflet sidebar close buttons with flex
This commit is contained in:
parent
9acde429bf
commit
4ef55ac3aa
1 changed files with 7 additions and 8 deletions
|
@ -20,16 +20,15 @@ L.OSM.sidebarPane = function (options, uiClass, buttonTitle, paneTitle) {
|
||||||
var $ui = $("<div>")
|
var $ui = $("<div>")
|
||||||
.attr("class", uiClass + "-ui");
|
.attr("class", uiClass + "-ui");
|
||||||
|
|
||||||
$("<div>")
|
$("<div class='sidebar_heading d-flex'>")
|
||||||
.attr("class", "sidebar_heading")
|
|
||||||
.appendTo($ui)
|
.appendTo($ui)
|
||||||
.append(
|
.append($("<div class='flex-grow-1 text-break'>")
|
||||||
$("<button type='button' class='btn-close float-end mt-1'>")
|
.append($("<h4>")
|
||||||
|
.text(I18n.t(paneTitle))))
|
||||||
|
.append($("<div>")
|
||||||
|
.append($("<button type='button' class='btn-close mt-1'>")
|
||||||
.attr("aria-label", I18n.t("javascripts.close"))
|
.attr("aria-label", I18n.t("javascripts.close"))
|
||||||
.bind("click", toggle))
|
.bind("click", toggle)));
|
||||||
.append(
|
|
||||||
$("<h4>")
|
|
||||||
.text(I18n.t(paneTitle)));
|
|
||||||
|
|
||||||
options.sidebar.addPane($ui);
|
options.sidebar.addPane($ui);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue