Open letmaik opened 9 years ago
You are right, we certainly need better docs. Unfortunately I haven't found the time yet to write them. Feel free to help me if you want to.
What is the correct way to programmatically open one of the sidebar tabs? I want to have an info tab that get populated via a click and ajax request and then open the that tab.
@woodbri most/all of the implementations have an open()
method with an ID parameter of the tab you want to open. e.g. https://github.com/Turbo87/sidebar-v2/blob/b906dd6885218a0b86fcecb4453e8a48dbe3cbf2/js/leaflet-sidebar.js#L131
I need to some events to trigger when the sidebar opens and collapses? How can I get these? I can add an onclick event to the the icon that opens a specific panel, but the panel can be close either by 1) clicking the same icon, 2) clicking another icon, 3) clicking the close button.
There should be some documentation.
One trivia I already found: The sidebar HTML has to come before the leaflet map div, otherwise it overlays the zoom buttons. Maybe that's also a bug?