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

Add drag binding #23

Closed
danielpost opened this issue Oct 14, 2017 · 5 comments · Fixed by #33
Closed

Add drag binding #23

danielpost opened this issue Oct 14, 2017 · 5 comments · Fixed by #33

Comments

@danielpost
Copy link

Would it be possible to add these functions?

https://codepen.io/desandro/pen/adYJEQ/

@drewjbartlett
Copy link
Owner

@danielpost Sorry, but which methods exactly?

@jkniest
Copy link

jkniest commented Apr 13, 2018

I guess he is talking about the javascript part to toggle draggable

@drewjbartlett
Copy link
Owner

@danielpost @jkniest ah alright. Well I won't have a ton of time soon but I just updated the component last week and it's a lot easier to add new methods. So please feel free to make a PR if you'd like - otherwise it may be a bit :)

@alexmccabe
Copy link
Contributor

alexmccabe commented Apr 30, 2018

@drewjbartlett Flickity recently updated to version 2.1.1, and with it came an update to the way enabling and disabling of drag works.

Previously instance.unbindDrag() and instance.bindDrag() were the methods for enabling and disabling dragging. This was accessible through your component by this.$refs.flickity.flickity.unbindDrag() and this.$refs.flickity.flickity.bindDrag(). This was a valid workaround, which has since stopped functioning.

The current method for toggling the ability to drag is first setting the draggable option instance.options.draggable = true|false, and then calling the updateDraggable method instance.updateDraggable();. This method is not available on your version of the plugin, either through your API or through the instance provided.

@alexmccabe
Copy link
Contributor

I have just created a pull request that resolves this issue. I've added two new methods (enableDrag() and disableDrag()), and updated Flickity to the latest version.

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 a pull request may close this issue.

4 participants