Turbo87 / leaflet-sidebar

A responsive sidebar for Leaflet maps
http://turbo87.github.io/leaflet-sidebar/examples/
MIT License
489 stars 158 forks source link

show(), hide(), toggle() not working #52

Closed KellyBennett closed 7 years ago

KellyBennett commented 7 years ago

I'm trying to make

setTimeout(function () {
    sidebar.show();
}, 500);

work, but it has no effect.

I've set a breakpoint, and have verified that this gets called, and that sidebar object is initialized at this point.

any help would be appreciated.

adriennn commented 7 years ago

you must have a problem somewhere else because this works fine in leaflet 1.2.0 and with the little info you give we can't be of much help. Which leaflet version, which plugin version etc etc... if you care to post your code to jsbin that would also be useful.

zedd45 commented 7 years ago

Have you tried stepping into the function in the debugger?

Also, if you could post an example of the code in a REPL, that would be helpful.

KellyBennett commented 7 years ago

Sorry, I've been camping to see the eclipse 🌑 🌟 👀 .

Turns out I was using a strange version of leaflet… not sure where I got it 😬 Sorry for the troubles!