hootsuite / grid

Drag and drop library for two-dimensional, resizable and responsive lists
http://hootsuite.github.io/grid/
Apache License 2.0
3.57k stars 279 forks source link

Initial render when x and y attributes are not provided works for horizontal direction but in vertical direction it just stacks one under the other. #106

Open RonakKhandelwal opened 7 years ago

RonakKhandelwal commented 7 years ago

resizeGrid was used, in the horizontal direction it works fine but in the vertical one no proper arrangement

vbgm commented 7 years ago

I have the same issue in both vertical and horizontal direction (osx chrome and safari). Even in the demo, if to turn off assigning the data-x and data-y attributes. As a workaround, managed to get the items positioned when specifically calling resize function right after initialization:

  $('#grid').gridList({
    lanes: 8,
    direction: 'vertical',
  });
  $('#grid').gridList('resize');
vbgm commented 7 years ago

:-) Just read the docs one more time.. so it is not a workaround but an expected behaviour.