EasyUI Forum
March 28, 2024, 05:31:56 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: tree drop unexpected behaviour  (Read 3683 times)
gordis gmbh
Full Member
***
Posts: 103


View Profile Email
« 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/

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?
Logged
gordis gmbh
Full Member
***
Posts: 103


View Profile Email
« Reply #1 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/

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.



Logged
jarry
Administrator
Hero Member
*****
Posts: 2260


View Profile Email
« Reply #2 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/
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!