EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: BCottle on July 28, 2016, 09:00:30 AM



Title: Disable drop on leaf nodes of tree
Post by: BCottle on July 28, 2016, 09:00:30 AM
In this question (http://www.jeasyui.com/forum/index.php?topic=551.0), the final suggestion was to find an individual node and prevent it from accepting drops.

Is that still the only way to do this? I would like to prevent any leaf nodes (existing and future) from being dropped on. Is there a property to set for this when we create the table?

[edit]

Additionally, it would be nice if we could catch an attempt to drop a tree node onto a leaf and instead insert it as a sibling.

I realize the two ideas may be mutually incompatible, so they could be separate ideas. In other words, maybe we could choose one of the following:
  • convert leaf to node when child dropped on it (default behavior)
  • make leafs "leaf only" and reject attempts to drop nodes on them
  • make leafs "leaf only" and interpret drop attempts as requests to "insert above" or "insert below"


Title: Re: Disable drop on leaf nodes of tree
Post by: BCottle on July 29, 2016, 05:41:06 AM
Another thing that would be kind of helpful: some way to prevent certain nodes from being dragged.

For example, I just dragged my root node to the other tree and lost the source tree. I'd like to be able to say that node cannot be moved at all.