Skip to content
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

Possible to designate a "handle" like .draggable() in other libraries? #202

Open
ScottBeeson opened this issue May 19, 2017 · 2 comments
Open

Comments

@ScottBeeson
Copy link

This would be super useful.

@seanCodes
Copy link
Collaborator

@ScottBeeson Can you describe what you have in mind in a little more detail? Would you be open to submitting a PR?

@ScottBeeson
Copy link
Author

I'll see if I can do a pull, but it may be a bit out of my league (and/or require more time than I have).

Basically, with JQuery.draggable you can pass handle: #element so that the entire thing is only dragged using the specified element. I did discover that I can sort of do the reverse with pep by using elementsWithInteraction.

<div id="draggable">
  <div id="handle">H</div>
  <div id="content">This is text, but you cannot use the mouse to drag it around</div>
</div>

So for JQuery you would use handle: #handle but I think for pep doing elementsWithInteraction: #content will have the same result.

It's not identical, but I think it works as a workaround in most situations.

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

No branches or pull requests

2 participants