center-out layout algorithm
- Dominant language
- JavaScript
- Stars
- 4.3k
- Forks
- 324
- PR merge metrics
- No merged PRs in 30d
Description
> @metafizzyco would packery work placing items outwards from the centre rather than from the top left? have you tried it (or seen it tried)?
[– @noii](https://twitter.com/noii/status/349827521996521472)
I've been thinking about this and I think I can pull it off.
Currently the algorithm works by sorting the available spaces by the closest to the top left corner. Switching corners is easy enough.
In order to support a layout where there's is a fixed point, and stuff is laid-out around it would work by sorting spaces based on their distance from the 'center point'.
Contributor guide
Research direction
Start by reviewing the current layout algorithm, especially how available spaces are sorted by distance from the top-left corner, and read the issue discussion for prior context. Done means the layout can use a fixed center point and place items outward by sorting spaces according to their distance from that point.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100