Skip to content

Allow handle to be an array of HTMLElement#166

Closed
kftang wants to merge 1 commit intodesandro:masterfrom
kftang:master
Closed

Allow handle to be an array of HTMLElement#166
kftang wants to merge 1 commit intodesandro:masterfrom
kftang:master

Conversation

@kftang
Copy link
Copy Markdown

@kftang kftang commented Jul 27, 2017

I'm using Vue.js and found it to be quite difficult to get a selector string from an HTMLElement so something like this could make it much easier.

@desandro
Copy link
Copy Markdown
Owner

Thank you for this contribution! I like how this is a nice improvement. I like the feature, but I might implement differently to match Draggabilly's code style. I'll follow up in a subsequent release.

@desandro desandro closed this Dec 28, 2021
desandro added a commit that referenced this pull request Dec 29, 2021
- remove RequireJS docs
- version bump in README
@desandro
Copy link
Copy Markdown
Owner

Draggabilly v3 has been released, now with updated handle behavior. You can set it to a single element or a Array or NodeList of elements

// select all .handle children with selector string
handle: '.handle'

// set as element
handle: element.querySelector('.handle')

// set as array or NodeList
handle: [ element.querySelector('.handle1'), element.querySelector('.handle2') ]

Please try it out and report back with any issues!

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.

2 participants