tiberiuzuld / angular-gridster2

Angular gridster 2
https://tiberiuzuld.github.io/angular-gridster2
MIT License
1.28k stars 376 forks source link

Items overlap when pushItems and swap are both set to true #145

Closed anatel closed 7 years ago

anatel commented 7 years ago

Hi, I created a dashboard with the following settings:

        this.options = {
            maxCols: 16,
            maxRows: 16,
            draggable: {
                enabled: true
            },
            resizable: {
                enabled: true
            },
            pushResizeItems: true,
            displayGrid: 'none',
            swap: true,
            outerMargin: false,
            pushItems: true
        };
        this.dashboard = [
            {cols: 6, rows: 8, y: 0, x: 0, minItemCols: 2, minItemRows: 2},
            {cols: 6, rows: 8, y: 0, x: 6, minItemCols: 2, minItemRows: 2},
            {cols: 6, rows: 8, y: 8, x: 0, minItemCols: 2, minItemRows: 2},
            {cols: 6, rows: 8, y: 8, x: 6, minItemCols: 2, minItemRows: 2},
            {cols: 4, rows: 16, y: 0, x: 12, minItemCols: 2, minItemRows: 2}
        ];

But when dragging the right block to the leftmost side and then move it a little to the right without releasing the mouse (as you can see in the below gif), the block is ending up overlapping blocks under it.

I also reproduced it in the gridster demo: awesomescreenshot-2017-10-19t13-28-00-051z 1

Using the following settings: gridster settings

Thanks!

tiberiuzuld commented 7 years ago

Hi @anatel , Will check it out and will try to fix it as soon as possible.

Thanks,

tiberiuzuld commented 7 years ago

Hi @anatel ,

Fixed in v3.15.2.

Thanks,

anatel commented 7 years ago

@tiberiuzuld Thanks!

yvahava commented 6 years ago

is there a way to force overlapping to happen ?