Hi,
I’m trying to cancel o approve a drop action based on the resulting level of the node I’m dragging.
Say for example I have a node in the first level (1), I want to allow dragging but only if it stays in that level, I want to disallow dragging this item so it ends up being a child of another node in the first level for example:
root (a)
– first (b)
— first child of first (c)
– second (d)
— first child of second (e)
— second child of second (f)
I would allow dragging (b) after (d), but nos as a child of (d)
I would allow dragging (c) between (e) and (f) but not as a child of (a)
Makes sense?
So how would I go about accomplishing this?
Using the dragEnd property I get the dragItem and dropItem, but sometimes the dropItem doesn’t correspond to the level the dragItem will end up with.
Before I go into much trouble or maybe trying another widget (I really like this one) I’d like to know how I’d go about this?