Hello!
I’m trying to solve the following topic. I have a tree that has the following structure
1-0
1-1
2-1
3-1
1-2
2-2
3-2
Where the first number is just a counter and the second number is the level of the item in the tree.
An item should now only be draggable at a defined level of the tree. For example: The item 1-2 should only be draggable at level 1 so the allowed targets can only be the items 1-1, 2-1, 3-1, no other.
I’ve tried it via doing some action at the dragstart-event. I disabled all items on level 0 and on level 2. They were, it was visible at the tree as the items were greyed out. But it was still possible to drop items on them.
I then tried to do some action at the drag-event. I checked if the element the dragged element was dropped on, was at the allowed level. If the item was not on the allowed level, the dragged item was put back to the old position. But in that case, the dragged item disappeared.
So, has anybody on idea how to solve this problem.
Thanks und regards
Chris