Leaflet/Leaflet.fullscreen

Adding an interval between click and ...

mm108 opened this issue · 4 comments

mm108 commented

hi...thanks for the useful plugin. Is there any way to add a little interval between the time the button is clicked versus the fullscreen taking effect? I know this might not be as straightforward because actions such as fullscreen can only be invoked by user interaction. So timers and stuff are out. Any pointers? This is because I need to do a few things before going fullscreen ... and if there is no delay everything appears too abrupt. Thanks once again

There's no direct support for this, but you can implement it by creating your own button control that starts a timer when clicked, and calling map.toggleFullscreen() (as shown in the README) when you want to go fullscreen.

mm108 commented

Thanks but no timer event can trigger a fullscreen - It can be only initiated by a click on the button / element / object - from what I understand :) Anyways thanks, let me fiddle around with it.

Oh right, I forgot about that restriction. It was previously discussed in #28.

mm108 commented

👍 alrighty thanks