Is there a way to set a boundary for dragging element only inside gridster?

670 views Asked by At

Is there a way to set boundaries on the Gridster? Right now I have a behavior, that the gridster item moves halfway out of the grid. I would like that there is a boundary, and drag stops/doesn't allow to drag it more, immediately when you hit the end of Gridster div. So that item is always fully visible. And inside gridster.

In the screenshot below is wrong behavior, this item should be allowed to drag only down, left and right, and not up, as it hits the end of Gridster.

The wrong behavior.

1

There are 1 answers

0
dogukan On BEST ANSWER

I implemented this feature (boundary check) two weeks ago. As you can see here https://github.com/tiberiuzuld/angular-gridster2/issues/448, you can make use of enableBoundaryControl option. It is released in v13.3.0.