EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: gordis gmbh on March 16, 2017, 07:45:34 AM



Title: tree drop unexpected behaviour
Post by: gordis gmbh on March 16, 2017, 07:45:34 AM
Drop doesn't work when we try to drop a dropable node after trying to drop a non-dropable node.

Please see a demo here: http://jsfiddle.net/0hk1twng/140/ (http://jsfiddle.net/0hk1twng/140/)

In the above example the node 'S1' is the only node which is not dropable.


To experience the problem please try to:
- Step1: drag S2 and try to drop it on any node of Target tree (drop will be allowed)
- Step2: drag S1 and try to drop it on all nodes of Target tree (drop will not be allowed)
- Step3: now drag S2 and try to drop it on any node of Target tree (drop is not not allowed)

Why is the dropable node S2 not allowed to be dropped in step 3?


Title: Re: tree drop unexpected behaviour
Post by: gordis gmbh on March 18, 2017, 04:14:02 AM
Can anybody please look into this?

One temporary work around to this problem would be  to deny the dragging of node 'S1':
http://jsfiddle.net/0hk1twng/141/ (http://jsfiddle.net/0hk1twng/141/)

But this is not a fully acceptable solution because in this case the user may get the impression that 'S1' doesn't get dragged due to some unknown error.

One may come with an idea to use diffrent styles for draggable and non-draggable nodes but then the user has to learn / remember which style means what.





Title: Re: tree drop unexpected behaviour
Post by: jarry on March 18, 2017, 05:05:29 PM
You can define the formatter function to display the undraggable node with different style. Please try this example:
http://jsfiddle.net/0hk1twng/142/