On Wednesday 05 October 2011 10:27:21 John Spackman wrote:
> I'm writing a custom widget to display a calendar (think Outlook or Google
> Calendar) and using drag & drop to rearrange the calendar entries; when
> dragging the entry, I want to give feedback saying what time the entry
> will be moved to.  I've created a widget to act as a "caret" to say what
> time you're hovering over and I want to update that every time the mouse
> moves during the drag.
Did you already took a look at the DragDropCursor class? This widget can be 
used for showing feedback during the drag session.

Another example is at the showcase application. Within the class 

        "showcase.page.dragdrop.Content"

a custom drag&drop cursor is implemented. Maybe this implementation can help 
you further.

> The problem is that the time of day that the event will be moved to must be
> calculated from the mouse offset but the "dragover" event is fired only
> once as you enter a new target widget, not every time the mouse moves; by
> contrast, the "drag" event is fired on the source widget every mouse move.
This problem is solved in the "showcase" application with the help of the 
"drag" event. At every "drag" event the position of the feedback widget is 
updated.

> It's difficult (or very inelegant) to provide fine-grained feedback based
> on the drop location – my solution so far is to pass the calendar entry's
> "drag" event to the target, but this is a problem when dragging between
> different targets so I'll also have to find the control currently under
> the mouse and find the "real" target.
> 
> Is there a better way?
Hope the example in the "showcase" application will help you. 

Regards,
  Alex

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to