Closed rodriguezrrp closed 10 months ago
I fixed where double-clicking on the left and right arrow buttons would cause double-click events to propagate down to the Leaflet map behind it, triggering an unintended zoom.
Nice! I couldn't figure out how to avoid this behaviour for some time.
I added a quick height animation upon expanding the Island Info box to give it a little more visual flair. Closing remains instant.
Looks great, UI design has never been my strong suite 😅
The yolky slime image has been placeholded with the question mark icon, pending the asset.
I won't be able to grab this until tuesday/wednesday, I'll approve the PR now with the temporary asset and will grab the new one when I can!
Thanks again for this man, killing it!
@rodriguezrrp after playing with it, can we also have the "Resources" and "Slimes" buttons, also not allow pass-through to the leaflet map, clicking those multiple times will also zoom in.
can we also have the "Resources" and "Slimes" buttons, also not allow pass-through to the leaflet map
Done!
I couldn't figure out how to avoid this behaviour for some time
My workaround solution is to toggle the leaflet map's doubleClickZoom property in an event handler. The only other way I found to prevent the pass-through was to move the IslandInfo component outside the MapContainer component, but then the entire island info box including its margins also blocked interaction, which didn't feel right.
Also I just changed the events to a debounced (delayed) toggling in the button's onclick, which should make my fix compatible with mobile devices and touch events. The old method of onmouseenter and onmouseleave didn't make sense for mobile devices.
UI design has never been my strong suite
Same here. but I try :)
@rodriguezrrp Looks great! Squerge when you can :)
Thanks, and I'm confused here, how do I squerge the PR instead of you?
Thanks, and I'm confused here, how do I squerge the PR instead of you?
oh! my bad. Thought you had permissions. Sorry about that,,,,
Thanks! No worries. Yeah I think I would need write permissions to this repo, all I can do myself is close the PR. All good, I appreciate it
This is mostly a QoL or UX improvement to the Island Info box, please suggest changes if you see fit. Main changes:
The yolky slime image has been placeholded with the question mark icon, pending the asset.