Skip to content

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

Merged
adumesny merged 2 commits into
gridstack:typescriptfrom
adumesny:typescript
Jul 27, 2020
Merged

adumesny merged 2 commits into
gridstack:typescriptfrom
adumesny:typescript

Conversation

@adumesny

Copy link
Copy Markdown
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

adumesny added 2 commits July 6, 2020 23:25
* 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