ducksboard / gridster.js

gridster.js is a jQuery plugin that makes building intuitive draggable layouts from elements spanning multiple columns
http://gridster.net/
MIT License
6.03k stars 1.2k forks source link

removing widget doesnt move left #338

Closed eperler123 closed 10 years ago

eperler123 commented 10 years ago

hello

when i call "gridster.remove_widget" and there is only 1 row .. the widgets do not "move_left"

i.e.. if i have 4 widgets in 1 row...

widget1 | widget2 | widget3 | widget4

and i remove widget2 ...

then i end up with ...

widget1 | | widget3 | widget4

and i was hoping to get ...

widget1 | widget3 | widget4

is this working as designed, or am i doing something wrong ?

please note that if i have more than 1 row, and i remove a widget from the first row... the widgets do "move up"...

i.e.. if i have 2 rows and 2 cols

widget1 | widget2 widget3 | widget4

and i remove widget 1.. widget 3 "moves up" and i end up with ..

widget3 | widget2

| widget4 which is what i expect.. thanks in advance
hrosenbauer commented 10 years ago

This is "works as designed". Widgets are only moved to the top but stay in their assigned column.

eperler123 commented 10 years ago

is there any code sample that could help me figure out how to move them left if there is an open cell ? I tried a few things and some work but after they run i get unexpected behavior while dragging

thx Date: Thu, 3 Apr 2014 01:17:19 -0700 From: notifications@github.com To: gridster.js@noreply.github.com CC: ericperler@hotmail.com Subject: Re: [gridster.js] removing widget doesnt move left (#338)

This is "works as designed". Widgets are only moved to the top but stay in their assigned column.

— Reply to this email directly or view it on GitHub.

vieron commented 10 years ago

This is how gridster works... Maybe you should check other libraries like Packery, grid or shapeshift

gjp151088 commented 8 years ago

I solved this issue http://stackoverflow.com/questions/36358231/how-to-position-the-jquery-gridster-after-remove-a-widget/36394886#36394886