From: Tim L. <tim...@pr...> - 2004-08-11 23:18:41
|
I am trying to use the new DynAPI 3 code to see what is or isn't possible. The scenario that I'm testing is a drag/drop interface. I have a toolkit of "tools" and would like to be able to drag a tool onto the document body so I can apply that tool to a div container on the document. So far I can get the drag drop working using the drag example that came with DynAPI, but I cant figure out (mainly because the DynAPI documentation is so thin) how to detect if the user dropped the tool outside of the target region. For instance, you drag a tool onto the web page, and drop it onto a target area. As per the demo, this is fine, but if I drop the tool onto the area outside of the target area (eg. anywhere else), I want the tool to "return to home" (ie. back into the toolbox). I have tried the following an none of them seem to work: document.onDrop = function () {} dynapi.document.onDrop = function() {} The interface I am trying to create is similar to the forms designer in Visual Studio. I have been able to create the toolbox and the ghost image for dragging and even the drop detection for the form part, but I cant get the tool to home when you drop it outside of the form/target area Any ideas? Tim |