naver / egjs-grid

A component that can arrange items according to the type of grids
https://naver.github.io/egjs-grid/
Other
274 stars 17 forks source link

FrameGrid: relationship of frame property to resulting layout is not obvious #86

Open airtonix opened 1 year ago

airtonix commented 1 year ago

Description

Trying to work this out through playing with it.

https://naver.github.io/egjs-grid/storybook/?path=/story/examples-framegrid--frame-grid-template image

Looking at the resulting output image

edit it just dawned on my that you're using frame to define named grid slots:

https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template


Steps to check or reproduce

malangfox commented 1 year ago

Hello @airtonix.

In [[1,1,2,2,3,3],[2,2,4,4,4,5]] you gave as an example, it seems that the frames with index 2 are not adjacent to each other. We recommend using it with [[1,1,2,2,3,3],[4,4,5,5,5,6]]. If you do, the items will be in the correct order.

The demo you left as a link shows 10 items. After 6 items are displayed according to the rules, only 4 items below will be displayed according to the rules. There seems to be no problem with this behavior. How about setting the non-adjacent frame indexes differently?