vue-grid-layout icon indicating copy to clipboard operation
vue-grid-layout copied to clipboard

Overlap issue of responsive layout

Open yzhang921 opened this issue 5 years ago • 12 comments

Hey, looks like there is an issue of responsive layout feature. "vue-grid-layout": "^2.3.1", Version 69.0.3497 os: macOS High Sierra Look forward to your reply

overlap

yzhang921 avatar Jan 07 '19 02:01 yzhang921

There are all sorts of issues with the responsive layout. Resizing grid items is very laggy and items will sometimes get wrong size when the mouse is released.

Pwntus avatar Jan 07 '19 19:01 Pwntus

make sure that the layout property is synched, i.e.:

    <grid-layout
      :layout.sync="widgets"
      ...
    >

adding .sync fixed the overlapping issues for me

Endebert avatar Jan 11 '19 10:01 Endebert

I am also facing the same issue. Can anyone please look into it.

Mayank-jain34 avatar Apr 27 '19 08:04 Mayank-jain34

Responsive layout has big issues :

ezgif-4-c5075d05b433

Safirion avatar Oct 16 '19 10:10 Safirion

Seems to be caused by layouts not clear in GridLayout ;)

Fixed by reset lastBreakpoint and layouts on change responsive mode or adding items : lastBreakpoint = null; layouts = {};

Safirion avatar Oct 18 '19 14:10 Safirion

Seems to be caused by layouts not clear in GridLayout ;)

Fixed by reset lastBreakpoint and layouts on change responsive mode or adding items : lastBreakpoint = null; layouts = {};

Can you show demo example?

sogehige avatar Nov 06 '19 09:11 sogehige

Hi @Safirion,

Yes please, do you have an example of this?

Thanks!

Ed

edouardgab avatar Nov 18 '19 17:11 edouardgab

Seems to be caused by layouts not clear in GridLayout ;) Fixed by reset lastBreakpoint and layouts on change responsive mode or adding items : lastBreakpoint = null; layouts = {};

Can you show demo example?

I fixed doing the same thing he mentioned, getting this properties fetching the grid-layout with ref

<grid-layout ref="gridLayout"> </grid-layout>

and on mounted event I called this method

resetGridLayout() { this.$refs.gridLayout.lastBreakpoint = null this.$refs.gridLayout.layouts = {} }

mathewsjts avatar Feb 27 '20 14:02 mathewsjts

I was having this issue due to externally updating layout multiple times when mouted. See here https://github.com/jbaysolutions/vue-grid-layout/issues/269#issuecomment-617639202

mattgreenfield avatar Apr 22 '20 08:04 mattgreenfield

I was having this issue due to externally updating layout multiple times when mouted. See here #269 (comment)

Did you manage to find a workaround?

shaks786 avatar Nov 18 '20 01:11 shaks786

So this seems to be a very old issue but the problem is still not solved in the current version. The method described by mathewsjts doesn't work. Setting layout.sync works neither.

any ideas?

nise avatar Mar 12 '24 15:03 nise

BTW https://github.com/gridstack/ have solved the issue.

nise avatar Mar 12 '24 21:03 nise