Skip to content

Automatic layout of a pixel placed screen for React-Grid-Layout#203

Open
GregJHarris wants to merge 6 commits into
masterfrom
RGL-auto-layout
Open

Automatic layout of a pixel placed screen for React-Grid-Layout#203
GregJHarris wants to merge 6 commits into
masterfrom
RGL-auto-layout

Conversation

@GregJHarris
Copy link
Copy Markdown
Collaborator

This adds the capability to automatically layout react grid layout displays using pixel placed displays.
At the heart of it is calculateDefaultLayout which takes a set of child items a screen width, columns and cell height and computes a first pass layout using the position and width of the child items. Child items are wrapped if the screen width is too narrow to accommodate them. The RGL verticalCompactor is then used to layout and resolve collisons in the y (columns). In addition for responsive screens the horizontalCompactor is also used.

Once a layout has been computed it is dispatched to update the file state, which causes a re-render using the new layout as the updated props are passed down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant