You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding an option to recompute the bounds when the bounding element is resized would be helpful for keeping draggable's in-frame when the browser window is resized.
I tried to implement this feature myself but couldn't figure it out (the box just kind of bugs out no matter what I try). Maybe someone more familiar with the library can give it a shot.
I got around this by recomputing the position of the element myself. When the window is resized, check if the x position of the element plus its pixel width is greater than the viewport width. If it is, set the elements position.x -= the pixel count that is out of bounds.
For example:
windowWidth = 1000px;
element.posX = 950px;
element.boundingClientRect().offsetWidth = 100px;
(Out of bounds by 50px)
Adding an option to recompute the bounds when the bounding element is resized would be helpful for keeping draggable's in-frame when the browser window is resized.
I tried to implement this feature myself but couldn't figure it out (the box just kind of bugs out no matter what I try). Maybe someone more familiar with the library can give it a shot.
https://github.com/PuruVJ/neodrag/compare/6965d57..aspiringLich:main
The text was updated successfully, but these errors were encountered: