EasyUI Forum
September 13, 2025, 09:00:14 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Disable drop on leaf nodes of tree  (Read 6099 times)
BCottle
Newbie
*
Posts: 17



View Profile
« on: July 28, 2016, 09:00:30 AM »

In this question, 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"
« Last Edit: July 28, 2016, 12:54:46 PM by BCottle » Logged
BCottle
Newbie
*
Posts: 17



View Profile
« Reply #1 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.
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!