I'm trying to use OAT for the first time, and I've created a little drag-and-drop demo similar to the OAT example. My HTML page has a script at the bottom that runs when the page loads. Similar to the demo, I loop through a set of elements and add each as a drag "source" to a ghostdrag object I've created (see attached html file). Also on the page is an input text field that I use for testing. I wrote a simple "process" function that I thought was supposed to run when I began to drag one of the sources. This "process" function is supposed to just set the value of the text field to the text value of what I'm dragging. However, it looks like the "process" function runs for each element as it is added to the ghostdrag object as a drag source, which is totally undesireable, useless, and is not consistent with the docs. Maybe I'm doing something wrong. Any help would be appreciated.
Notice when the page loads, the text field displays a value of "26". Testing will show that when the page loads, the text field value cycles through the array of procIds and of course stops at "26". I think the value should be blank, and then should change to display the number corresponding to whatever is being dragged from the green box to the orange box.
In summary, when looping through the elements that are to be drag sources, I believe I'm just registering each element as a drag source with the ghostdrag object. Part of the registering is defining the "process" function to be run when the source is dragged. But I'm confused because it looks like the "process" function runs when I add its element as a drag source, instead of waiting until the element is actually dragged.
Thanks for any help.