Skip to content

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

Closed
wants to merge 32 commits into from
Closed

feat(useResize): new function #708

wants to merge 32 commits into from

Conversation

sibbng
Copy link
Member

@sibbng sibbng commented Sep 1, 2021

Todos:

  • Options (disable edges, configurable window, max/min size)
  • Control (enable/disable resize functionality, let resizing part to events)
  • Events (emit onResizeStart, onResizeMove, onResizeEnd)
  • Edges have to be on foreground Document.elementFromPoint() and take border radius into account on corners
  • Refactor event listeners
  • Manual mode
  • Watch width and height refs to resize programmatically
  • position: absolute support
  • Clean code
  • Component version
  • Docs

Copy link
Member

@wheatjs wheatjs left a 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

@sibbng
Copy link
Member Author

sibbng commented Nov 30, 2021

@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.

@wheatjs
Copy link
Member

wheatjs commented Dec 1, 2021

Sounds good!

@CodyBontecou
Copy link

Any update on this?

@stale
Copy link

stale bot commented Sep 24, 2022

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.

@stale stale bot added the stale label Sep 24, 2022
@stale stale bot closed this Oct 1, 2022
@wheatjs wheatjs reopened this Oct 1, 2022
@stale stale bot removed the stale label Oct 2, 2022
@stale
Copy link

stale bot commented Dec 1, 2022

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.

@stale stale bot added the stale label Dec 1, 2022
@sibbng
Copy link
Member Author

sibbng commented Dec 1, 2022

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:

@sibbng sibbng closed this Dec 1, 2022
@sibbng sibbng deleted the feat/useResize branch December 1, 2022 02:35
@thedamon
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants