gwinnem/vue-responsive-grid-layout

dynamic change columns, item will overlap

Closed this issue · 12 comments

Expected Behavior

dynamic change columns and it should calculate new item's position correctly.

Current Behavior

item will overlap

Steps to Reproduce

  1. dynamic change columns
  2. the item which is overflow will change to position 1 and overlap the first item

wcvb9-ws07f

I will try to fix it, plz let me know if the overflow item is static, how would you want it to behave

Hi, @UTing1119 did you manage to make a fix for this ?

yes, I was tryna find the reason why the resize event will be triggered when col number is set by user.(edit: yes it needs to be resized, but I'm trying to fix the calculate function)

do you have any plans to refactor?

Hi @UTing1119
I am doing some work on the component right now, and will look into this issue to. Just wanted to check up on your progress on this issue.

@UTing1119 may I ask what you are using the component for ?

Btw I just released version 1.2.2

Regards

Geirr

@gwinnem if you're referring to dragging items, that's because I'm tryna set up a template item that will be added to the GridLayout correctly.
and maybe provide slots for users to customize its appearance.

but unfortunately I have no time to fix it or refactor it.
if any idea, plz let me know

still not work in version 1.2.2/1.2.4/1.2.5

@UTing1119
I'll try to fix this asap.
Currently working on the Resize enhancement issue
But will pause this and start working on this issue.

Hi @UTing1119
If im correct, it is alway the top left GridItem which have this issue ?

I think it's more like the item overflows right side of the layout.

I guess it's because in src/core/helpers/responsiveUtils.ts, both moveToCorrectPlace and correctBounds function only consider about whether to collide with static items or not.

I think it's more like the item overflows right side of the layout.

I guess it's because in src/core/helpers/responsiveUtils.ts, both moveToCorrectPlace and correctBounds function only consider about whether to collide with static items or not.

It is strange the behavior, but with multiple statics the result is a lot of overflows when dynamically changes the max col value.

I am looking into it now and will release a new version asap.

Should be fixed in 1.2.9