In my flex-based grid, there are 5x5 elements. The 3x3 grid in the center is clickable, where clicking on an element turns its background red and resizes its width and height. The other elements adjust their sizes accordingly.
You can view the codepen here.
Now, I am looking to zoom in on the central red element and its 8 surrounding elements only, so that only 9 elements are visible. When I change the center element, the view should adjust to show the clicked element and the 8 surrounding ones, making the other elements disappear. Ultimately, I want to focus on these 9 elements and be able to move around them effortlessly.
I have experimented with changing the display
and opacity
, but it affects the smoothness of the animation.
If anyone has a solution, idea, or knows of a tool/library that could help me achieve this, I would greatly appreciate your input.