daybrush / moveable

Moveable! Draggable! Resizable! Scalable! Rotatable! Warpable! Pinchable! Groupable! Snappable!
https://daybrush.com/moveable/
MIT License
10.12k stars 620 forks source link

Use moveable in Vue project, bind resize event param to moveable target, the effect is not normal #571

Open chenp1204 opened 2 years ago

chenp1204 commented 2 years ago

Environments

Description

Hi @daybrush , I find moveable in Vue, resize event param binding to target, resize effect is not normal,jitter and stutter and incorrect position here is my test demo,

https://codesandbox.io/s/red-http-s870w?file=/src/App.vue

Thank you very much for your help

daybrush commented 2 years ago

@chenp1204

I'm sorry. Unfortunately. Asynchronous is not yet supported in Moveable. Therefore, you have to specify the style directly.

e.target.style.cssText += `width: ${width}px; height: ${height}px; left: ${left}px; top: ${top}px`;