You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, first of thanks for this module, it's really useful to me.
Anyway I was wondering if the attribute draggable is meant to be used ?
It isn't mentioned in the ReadMe however I looked at the source and found that a draggable attribute is provided for the directive. I tried to set it to false but nothing happened.
I would like to do something like this: <packery draggable="{{isDrag}}"> with isDrag being a variable in my controller.
Basically I just want to enable and disable drag and drop with a click of a button.
Yes, draggable is meant to be used. This actually mimics an issue, #7, that was discovered earlier but I missed that draggable had the same problem.
As for disabling Draggabilly on the fly, I don't think the library should be responsible for this functionality since Draggabilly offers destroy, disable, and enable methods already. Instead of building that functionality into angular-packery, I think exposing the Draggabilly object to the user would be a better method. Then you can build in a function to toggle the enable and disable methods that are already available.
I've created the following issues to address both of the above: #12 - Fix issue with draggable #13 - Expose Draggabilly object
I'm going to close this issue. Please reference the new issue for the individual workstreams.
Hi, first of thanks for this module, it's really useful to me.
Anyway I was wondering if the attribute
draggable
is meant to be used ?It isn't mentioned in the ReadMe however I looked at the source and found that a
draggable
attribute is provided for the directive. I tried to set it to false but nothing happened.I would like to do something like this:
<packery draggable="{{isDrag}}">
withisDrag
being a variable in my controller.Basically I just want to enable and disable drag and drop with a click of a button.
Then I found this line: https://github.com/SunGard-Labs/angular-packery/blob/master/src/packery.js#L195
The problem is that scope.draggable will always be true either because of the config boolean or because any variable set in scope.draggable will be a string therefore true.
Anyway after doing a little type check:
I managed to disable drag at launch. But if I change
isDrag
later for example with a click of a button, of course the draggability won't update.Is it possible to add this behaviour ? There is a method to enable/disable drag in the Draggabillly module.
The text was updated successfully, but these errors were encountered: