Ticket #7164 (assigned enhancement)
[CLA][Patch] DnD extension: 2D (i.e. non-linear) Container using absolute positioning
| Reported by: | chucky | Owned by: | elazutkin |
|---|---|---|---|
| Priority: | normal | Milestone: | future |
| Component: | DnD | Version: | 1.1.1 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Following description is copied from the forum (http://dojotoolkit.org/forum/dojo-core-dojo-0-9/dojo-core-development-discussion/patch-dnd-extension-2d-i-e-non-linear-cont)
I extended the DnD module to support inserting items at the position where they are dropped. It is done by absolute positioning within the Container. I created a simple demo at http://mikula.ic.cz/dnddemo/ Basically, when Manager publishes the "/dnd/drop" topic, it passes an additional argument -- mouse event that caused the drop. Container constructor accepts an additional Boolean parameter absolutePositioning -- when true, the items are positioned absolutely within the container at the position calculated from the passed mouse event.
There is still an odd behavior when dragging more items at once -- they are all placed at the same position. Still I would rather have 2D positioning work fine for single items only than not have 2D positioning at all.
I attach the patch.