Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS: #723 #726 margin to replace verticalMargin #1308

Merged
merged 2 commits into from
Jul 27, 2020

Conversation

adumesny
Copy link
Member

Description

  • complete re-write how we size/position items dealing with margin
  • we now have a single margin grid option which will set all 4 sides instead of one in code nad one in CSS
  • also have marginTop/Bottom/Left/Right if more precise setting is required
  • greatly reduced the layout code as margin are now inside the grid-item
    (affects content)
  • fixed code so cellHeight: 'auto' (now the default) will create real square cells
    (used to be off due to margin)
  • grid will now have consistent spacing (above/below first/last rows)

Checklist

  • Created tests which fail without the change (if possible)
  • All tests passing (yarn test)
  • Extended the README / documentation, if necessary

* complete re-write how we size/position items dealing with margin
* we now have a single `margin` grid option which will set all 4 sides instead of one in code nad one in CSS
* also have `marginTop/Bottom/Left/Right` if more precise setting is required
* greatly reduced the layout code as margin are now inside the grid-item
(affects content)
* fixed code so `cellHeight: 'auto'` (now the default) will create real square cells
(used to be off due to margin)
* grid will now have consistant spacing (above/below first/last rows)
* forgot to update the test case for gridstack#810 changes
* also found getCellFromPixel() was incorrect in rounding as well or delaing with margins
(which don't affect cell size, just content)
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