lrembacz / vue-responsive-grid-layout

Vue Repsonsive Grid Layout
MIT License
83 stars 19 forks source link

Resizing start position incorrect in some cases #7

Closed Pwntus closed 6 years ago

Pwntus commented 6 years ago

At initial resize, everything is OK. If you drop the box so that it has to adjust its size to fit the grid, the next time you resize the box it will offset from the mouse the previous offset.

Demo:

demo

This is also seen in the demos.

Pwntus commented 6 years ago

I've tried to track down the origin of this bug.

Ultimately, I think there's something wrong in resizeHandler for the package vue-resizable-core here: vue-resizable-core/src/VueResizableCore.vue#L172.

Whether the old or the new width / height isn't updated properly I don't know.

lrembacz commented 6 years ago

Thanks for your help. Yes, I've found the reason for this problem is the resize package and its height / width from the previous size change. I will try to fix it and let you know.

lrembacz commented 6 years ago

Dev branch is making many changes and I'm about to finish this. There is Vuex + Typescript example and some fixes to the issues. Thanks :)