dropTarget: where is the right place to manipulate this object?

val.samonte's Avatar


20 Sep, 2011 12:10 PM

I have a drag and drop application. The idea is when the user selects and drags a thumbnail, the thumbnail's mediator dispatches an event (with thumbnail's id as payload) which is being controlled under the command named StartDragCommand. This command then dispatches an event which is being listened by a DragClip view's mediator. This mediator uses the DragClip's method to clone the thumbnail image, and at the same time executes the startDrag() method of the DragClip. This mediator also have the MOUSE_UP event, and dispatches another event that triggers another command. Now the problem is, I want to know where this DragClip object has been dropped using the dropTarget property. Is it ok for me to pass this object as a payload of the event and manipulate this dropTarget object to a command? Is there any better approach on how i can do this? Any help would be much appreciated!!

  1. Support Staff 1 Posted by creynders on 20 Sep, 2011 02:22 PM

    creynders's Avatar

    Personally I wouldn't involve the entire system into the drag-and-drop procedure, since it's pure view state and logic.

  2. 2 Posted by val.samonte on 20 Sep, 2011 02:27 PM

    val.samonte's Avatar

    Thanks for the reply. Makes sense, maybe its just me having a bad implementation of my view.

  3. Ondina D.F. closed this discussion on 01 Nov, 2011 04:31 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac