developergovindgupta / move-rotate-resizer

MIT License
16 stars 4 forks source link

Fix possible containment issue on resize #4

Open raziel057 opened 4 months ago

raziel057 commented 4 months ago

Fix issue https://github.com/developergovindgupta/move-rotate-resizer/issues/3

When the div is rotated, we need to reinitialize the prevSize.left and prevSize.top to match the target.style.left and target.style.top as it's used to constraint the div in the container in handleMousemove:

https://github.com/developergovindgupta/move-rotate-resizer/blob/master/resizer.js?plain=1#L818-L819