Skip to content

How to auto arrange nested items in grid after resizing the container of the nested items? #814

Closed

Description

@nissimpradhan

Type of Issue

[ ] Bug
[ ] Feature Request
[ X ] Question

Subject of the issue

Is it possible to manually trigger re calculation of item position? (similar to when dragging an item, and other items make way for the item being dragged)

I am working on nested grids and I have successfully managed to correct the number of columns in a nested grid, if the nested grid's container's size was changed. But then it leaves the nested items in a weird state. I was wondering if there was a way to trigger manual re positioning of items in the grid.

Your environment

GridStack 0.3.0
Google Chrome
Version 61.0.3163.100 (Official Build) (64-bit)

Steps to reproduce

Preview the issue at codepen.
https://codepen.io/nissim/pen/bYgjvb

Expected behaviour

I know that auto positioning is not the expected behavior but I would like to find out how tp.

Actual behaviour

  • Item disappears from visible area, if container resized to too small.
  • Item overlaps
  • If after resizing, item it moved then position is adjusted correctly.
  • If resized back to original size, all elements appear

Activity

  1. adumesny commented on Dec 21, 2019

    @adumesny
    Member

    I know this is late... but this should now be possible with the fix I made in #1098 (and following 3 checkins). you can now call setColumn(n) and have the children relayout correctly to a new number of columns.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions