My favorites | Sign in
Project Home Downloads
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 324: Drag and drop example bug: onDragOver doesn't allow return "after"
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Oct 2012


 
Reported by paulo.si...@gmail.com, Jun 22, 2012
In this example:
http://wwwendt.de/tech/dynatree/doc/sample-dnd2.html

There is this source code:
onDragOver: function(node, sourceNode, hitMode) {
        /** Return false to disallow dropping this node.
         *
         */
        logMsg("tree.onDragOver(%o, %o, %o)", node, sourceNode, hitMode);
        // Prevent dropping a parent below it's own child
        if(node.isDescendantOf(sourceNode)){
          return false;
        }
        // Prohibit creating childs in non-folders (only sorting allowed)
//        if( !node.isFolder && hitMode == "over" )
//          return "after";
      },


My problem is that the return "after"; doesn't seem to work and I can't find any documentation about what values onDragOver can return. If I change to return false it works but it would be interesting to have the return "after" option available.

So, is it supposed to work or the example is wrong?

In any case I leave my comment to improve the documentation in the Tree Options, onDragOver.
Jun 22, 2012
#1 paulo.si...@gmail.com
Also, 
if( !node.isFolder && hitMode == "over" ) 
doesn't work. 

It should be "node.data.isFolder"
Jun 23, 2012
Project Member #2 moo...@wwwendt.de
(No comment was entered for this change.)
Status: Accepted
Labels: Milestone-Release1.2.2
Oct 6, 2012
Project Member #3 moo...@wwwendt.de
This issue was closed by revision r625.
Status: Fixed

Powered by Google Project Hosting