How to prevent the retina from moving the widget element down

The entire board is filled with widgets, borderless. And when I try to move an element from one column (1) to another (2), the elements in column 2 just go down from the board, for example:

errormovewidget

I would like to prohibit the placement of a widget in a place if there is no place for widgets in the column.

My code is:

   gridster = $(".gridster > ul").gridster({

          widget_margins: [mySizeDetector.blockMargin, mySizeDetector.blockMargin], 
          widget_base_dimensions: [mySizeDetector.dx, mySizeDetector.dy], /*[width, height]*/
          min_cols: mySizeDetector.xCount,
          min_rows: mySizeDetector.yCount,
  }).data('gridster');

Thanks in advance!

+4
source share
2 answers

I think you can limit it in the x axis outside the container, but not in the y axis .

min_cols max_cols, x. min_rows , max_rows.

: http://gridster.net/#documentation

0

. .js .css.

:

() .

, , .

.

:

    $.gridster({
        shift_larger_widgets_down: false
    });
-1

Source: https://habr.com/ru/post/1530932/


All Articles