maxwell-ilai / Leaflet.SidePanel

Leaflet plugin
MIT License
36 stars 7 forks source link

Tab switch event #7

Open AppWerft opened 1 year ago

AppWerft commented 1 year ago

How can I listen tit tab switch event?

I guess this pattern:


const panelRight = L.control.sidepanel('panelID', {
  panelPosition: 'right',
  hasTabs: false,
  tabsPosition: 'top',
  pushControls: true,
  darkMode: true,
  startTab: 'tab-5',
  onTabclick : function(navelement) {
    // do something in tab click
}
}).addTo(map);```
cyclingbyte commented 2 months ago

Hello, I copied this project and implement this feature in my copy: https://github.com/cyclingbyte/Leaflet.SidePanel you can find my package also on npm: https://www.npmjs.com/package/leaflet.sidepanel