Create pane button fn
This commit is contained in:
parent
8a02bd67d9
commit
71e7208a0a
4 changed files with 17 additions and 17 deletions
|
@ -1,6 +1,20 @@
|
|||
L.OSM.sidebarPane = function (options) {
|
||||
var control = L.control(options);
|
||||
|
||||
control.makeButton = function (buttonClass, buttonTitle, toggle) {
|
||||
var button = $("<a>")
|
||||
.attr("class", "control-button")
|
||||
.attr("href", "#")
|
||||
.html("<span class=\"icon " + buttonClass + "\"></span>")
|
||||
.on("click", toggle);
|
||||
|
||||
if (buttonTitle) {
|
||||
button.attr("title", I18n.t(buttonTitle))
|
||||
}
|
||||
|
||||
return button;
|
||||
};
|
||||
|
||||
control.makeUI = function (uiClass, paneTitle, toggle) {
|
||||
var $ui = $("<div>")
|
||||
.attr("class", uiClass);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue