Search and Top Navigation
#7167 closed feature (wontfix)
Opened March 19, 2011 10:48AM UTC
Closed March 01, 2013 01:24PM UTC
Draggable: dropOnEmpty option or Sortable: repurpose same
Reported by: | Altreus | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 2.0.0 |
Component: | ui.draggable | Version: | 1.8.11 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I found a (brief!) discussion on whether dropOnEmpty should exist on Sortable. The answer was no.
It is useful; but it's the wrong way around. Currently in order to prevent a connected Draggable from being dropped on an empty sortable you have to disable the sortable whenever it becomes empty and re-enable it if it gains content (on the theory that drag+drop is not the only way of creating DOM content).
I would propose that dropOnEmpty should apply to the sortable itself, as to whether it will accept a droppable if it is empty; rather than whether its own items can be dropped onto empty others.
Alternatively, the options to Draggable should have a dropOnEmpty that does the same thing as Sortable's; i.e. prevents this draggable being dropped on an empty sortable.
The former, while preferable in my mind, has the disadvantage of not being backward-compatible.
Attachments (0)
Change History (4)
Changed June 26, 2012 01:22AM UTC by comment:1
type: | enhancement → feature |
---|
Changed October 11, 2012 02:49PM UTC by comment:2
milestone: | 1.9.0 → 2.0.0 |
---|
Changed November 04, 2012 05:47PM UTC by comment:3
status: | new → open |
---|
Should take this usecase into account for 2.0.0, even though the APIs for interacting with draggable and sortable are likely to change a lot.
Changed March 01, 2013 01:24PM UTC by comment:4
resolution: | → wontfix |
---|---|
status: | open → closed |
We're not going to add any drop on empty logic in the rewrite. This will need to be implemented in your app-specific logic using the provided APIs for connecting, e.g., by toggling a class when the sortable is empty.