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 jQuery UI draggable support #16

Open
joshuahiggins opened this issue Feb 11, 2015 · 3 comments
Open

Add jQuery UI draggable support #16

joshuahiggins opened this issue Feb 11, 2015 · 3 comments
Milestone

Comments

@joshuahiggins
Copy link
Contributor

Packery accepts both Draggabilly and jQuery UI support. Currently, angular-packery only allows for Draggabilly support.

One thought is that the draggable attribute should be reworked to accept the following values: boolean jquery draggabilly as opposed to the current boolean only method. We'd need to take this into consideration when addressing issue #13.

I also think that the draggable option should default to false and Draggabilly should be removed from the Bower dependencies.

@joshuahiggins joshuahiggins added this to the 1.1 milestone Feb 11, 2015
@joshuahiggins
Copy link
Contributor Author

@edmundquintero, thoughts on the draggable changes for v1.1?

@edmundquintero
Copy link
Collaborator

I have jQueryUI running in my test env now but I have a few questions about implementation.

@ddoolin suggests using both a variable and a priority.
Draggabilly > jQueryUI > unsupported and
<packery-object dragLib='draggabilly'></packery-object>

This would mean draggable could have values of 'draggabilly', 'jqueryui', and 'unsupported'. Where 'unsupported' turns the draggable functionality off for that packery-object. The priority piece would allow for default to be 'unsupported' if the drag libraries are not included.

@joshuahiggins
Copy link
Contributor Author

@edmundquintero I think that the mark-up would become too verbose at that point. Draggable settings should be on the full set, not individual objects.

To play off your idea of disabling individual objects though, we could go this route:

<packery draggable="[dragabilly, jquery]">
   <packery-object no-drag></packery-object>
</packery>

draggable would take 2 options and have an empty default which will keep dragging disabled, in line with Packery. Meanwhile no-drag could be added to individual items that should only be packed, but not dragged. We'll need to add in classes for disabled items so that hover states for dragging and no-drag can be different. This will also tie in to issue #4, adding support for the "stamp" method, which should be included in v1.1 as well.

I think straying from Packery's default of no dragging was caused by us implementing our project's needs, where packed objects will rarely not be draggable. I think we should fall back to the core defaults and add enhancements where possible (such as individual "no-drag" objects).

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