naver / egjs-infinitegrid

A module used to arrange card elements including content infinitely on a grid layout.
https://naver.github.io/egjs-infinitegrid/
MIT License
2.23k stars 95 forks source link

Can PackingInfiniteGrid retrieve only squares? #570

Open Mirkadoi opened 7 months ago

Mirkadoi commented 7 months ago

Description

I am working with the PackingInfiniteGrid and need to configure it to retrieve only squares in two specific ways:

  1. All Squares: I want to get all square items without any exceptions.
  2. All Squares with Selective Dimension Assignment: I need to manually assign specific dimensions to certain squares, such as configuring some squares to have dimensions like 1x2, 2x2, 3x2, etc., based on my choice, rather than excluding them.

And Is it possible to configure the grid so that upon resizing, the cells adjust to occupy all available space without leaving any gaps?

Steps to check or reproduce

What I Achieved (Code): Link to codesandbox

  1. Desired Outcome 1 (Screenshot): image
  2. Desired Outcome 2 (Screenshot): image