mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-23 01:54:18 -08:00
- Basic animation (standard ball bounce) was placed on the parent of the map - A state MapBoundReached tracks which bound (N, S, W or E) was reached - This state variable was then used to conditionally apply the CSS animation - How could we detect the end of the animation to remove it from the DOM after the animation played once? - try and add an eventListener on the parent of the map using ref and useEffect ❌ - try and use the onAnimationEnd prop the territory shortcuts seem to trigger this animationEnd event ❌ - try and differentiate between territory shortcut animation and map bound animation using use isPanning ❌ - use isDragging ✅ - Now that the animation end event is being detected properly and its not interfering with the territory shortcuts, moving back to - Getting the bounds to work for all directions (N, S, W, E) - clunky feel and can’t get it to trigger accurately - Making the animation feel real (right not it’s just a random bounce) - Decided to attempt to use the transition built-into the ReactMapGL API, this was also not leading to reliable results. |
||
---|---|---|
.. | ||
components | ||
contexts | ||
data | ||
images | ||
intl | ||
pages | ||
styles | ||
test |