Closed cuire closed 1 year ago
@cuire @hearthole I've been examining various grid layout libraries, such as gridstack, react-grid-layout, and vue-grid-layout. Interestingly, I noticed that most of them apply compression only in the vertical direction, possibly because it's the most intuitive way? Considering this, perhaps it's not necessary to include a compress option for 'vertical', 'horizontal', or 'none'. Instead, could be a simpler compress: true | false
prop.
When set to false, items could freely move around the grid. If item A encounters a collision with item B during movement, item B would be relocated to the first available fitting space. Furthermore, if no space is available, the grid could dynamically increase along the y-axis to accommodate item B in a new position..
Сurrent version of collisions is experemental and forces vertical compression of items. I want to add new
compress: 'vertical' | 'horizontal | 'none'
prop, that used to determine how grid should resolve these conflicts. The tricky part is how to rearrange the elements when they shouldn't be compressed.