Opened 11 years ago

Closed 11 years ago

#5744 closed defect (fixed)

Tree: DnD checkItemAcceptance needs to trigger when mousing over tree

Reported by: guest Owned by:
Priority: high Milestone: 1.2
Component: Dijit Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

I created two trees, the second tree accepts drag and dropped items from the first one. The idea is is to be able to turn the mouseover icon red when the user is pointing at the tree without pointing at a node. Currently since checkItemAcceptance does not trigger on mouseover on the tree it DnD colors the icon green to show that dropping on the tree is allowable (which in my case it is not).

Currently when onDndDrop detects a drop on the tree it provides "null" as the target, which I use to cancel the drop. However, from the users point of view this should be an allowable drop because the icon was green while mousing over. They may even perceive this incorrectly because when you drop on an icon to the left of an item, it counts as dropping on the tree and not the item that the icon relates to.

NOTE: This ticket is not meant to append the enhancement of making the icon related to items in a tree count as part of the item, it aimed at fixing the problem of mousing out of an item and over the tree not triggering checkItemAcceptance. Another solution may be instead of triggering checkItemAcceptance, to allow us to return false for checkAcceptance and true for checkItemAcceptance and flag the icon green when checkAcceptance is false if checkItemAcceptance is true. However, I don't know if this idea follows your plans for the tree and DnD in general.

Attachments (1)

dndSource (618 bytes) - added by mrblakwell 11 years ago.
i came across this same problem, and this small change seemed to do the trick.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 11 years ago by bill

Component: DnDDijit
Milestone: 1.0.32.0
Owner: Eugene Lazutkin deleted
Summary: Tree DnD checkItemAcceptance needs to trigger when mousing over treeTree: DnD checkItemAcceptance needs to trigger when mousing over tree

comment:2 Changed 11 years ago by alex

Milestone: 2.01.3

Milestone 2.0 deleted

Changed 11 years ago by mrblakwell

Attachment: dndSource added

i came across this same problem, and this small change seemed to do the trick.

comment:3 Changed 11 years ago by mrblakwell

that said, i am using a single tree and drag/dropping within it to re-org. all re-org is handled by the server, not by the data store...

comment:4 Changed 11 years ago by bill

Description: modified (diff)

Are you sure this is still an issue in the latest code (post 1.1.1)? About a month ago I changed the tree code to only check item acceptance and otherwise be red. See http://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/tests/tree/test_Tree_DnD.html and how it only turns green when you are over an item.

comment:5 Changed 11 years ago by bill

Milestone: 1.31.2
Resolution: fixed
Status: newclosed

Looks like this is fixed in 1.2

Note: See TracTickets for help on using tickets.