Closed Pwntus closed 6 years ago
setTransform(_ref2)
gets a "wrong" width property on the _ref2
parameter.createStyle
method is using utils.setTransform
with a pos
argument, which in turn it gets as a parameter.styles
is using the createStyle
method, passing it the pos
argument created by another method called calcPosition
.calcPosition
takes a widget x, y, w, h
and returns a top, left, width, height
object used to transform the visible DOM-element. This is where it gets wrong. This method has a if-clause; if (this.resizing)
where it replaces the width & height by the this.resizing
variable. In this specific case, when resizing a widget, the this.resizing
value is a size value derived from an external package, also maintained by you @lrembacz called vue-resizable-core.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.
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.
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 :)
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:
This is also seen in the demos.