Ticket #5744 (closed defect: fixed)

Opened 10 months ago

Last modified 27 hours ago

Tree: DnD checkItemAcceptance needs to trigger when mousing over tree

Reported by: guest Owned by:
Priority: normal Milestone: 1.2
Component: Dijit Version: 1.0
Severity: normal Keywords:
Cc:

Description (last modified by bill) (diff)

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

dndSource (0.6 kB) - added by mrblakwell 4 months ago.
i came across this same problem, and this small change seemed to do the trick.

Change History

Changed 10 months ago by bill

  • owner deleted
  • summary changed from Tree DnD checkItemAcceptance needs to trigger when mousing over tree to Tree: DnD checkItemAcceptance needs to trigger when mousing over tree
  • component changed from DnD to Dijit
  • milestone changed from 1.0.3 to 2.0

Changed 9 months ago by alex

  • milestone changed from 2.0 to 1.3

Milestone 2.0 deleted

Changed 4 months ago by mrblakwell

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

Changed 4 months 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...

Changed 4 months 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.

Changed 27 hours ago by bill

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from 1.3 to 1.2

Looks like this is fixed in 1.2

Note: See TracTickets for help on using tickets.