-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
feat(useResize): new function #708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sibbng Used this composable recently and have some suggestions based upon my experience using it
@wheatjs Thanks for your feedback. I pushed my latest "dirty updates". I use this function actively on my Tailwind playground. Soon I will update demo.vue with all intended use cases. Then we can make some cleanups and bug fixes. |
Sounds good! |
Any update on this? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi, I've decided not to work on this function. The initial goal was to make an element resizable without the resize handlers in DOM. It worked, however, for such a utility the range of use cases is really big. That means it may not satisfy most people's needs in its current form and I don't have time to work on that. Even if we cover all the use cases, I don't think massive utilities are in the scope of VueUse. It's better for them to be a standalone library. So, I'm closing this PR now. If you are thinking to use this function in your projects, check out my implementation at UnoCSS Playground: |
Totally came to vueuse thinking this might be a thing they'd have as a beautiful complement to useDraggable. Looking at the code it is less straightforward than i might have thought! appreciate you looking into this. |
Todos:
onResizeStart
,onResizeMove
,onResizeEnd
)Document.elementFromPoint()
and take border radius into account on cornerswidth
andheight
refs to resize programmaticallyposition: absolute
support