Login Register

2D

[patch] DnD extension: 2D (i.e. non-linear) Container using absolute positioning

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.
I provide the diff below.

Syndicate content