-
- var controlContainer = $('.leaflet-control-container .leaflet-top.leaflet-right');
-
- if ($ui.is(':visible')) {
- $(options.uiPane).hide();
- controlContainer.css({paddingRight: '0'});
- map.off("zoomend baselayerchange", update);
- } else {
- $(options.uiPane).show();
- controlContainer.css({paddingRight: '200px'});
- map.on("zoomend baselayerchange", update);
- $section.load('/key', update);
+ if (!button.hasClass('disabled')) {
+ options.sidebar.togglePane($ui, button);