PDA

View Full Version : Drag and Drop



4myGod
27 Sep 2009, 9:18 AM
I recently tested this DragSource thing:

var drag = new Ext.dd.DragSource('message');

However, it constantly drops back to where it was and the whole div lights up with light blue and then white. My background is a dark color...

All I want is to move the div, where I drop it, it stays. I don't want to have any magnet like dropping into certain areas. I just want someone to move it out of their view, no matter what they are looking at on my page. When they move it, it just drops, no lights or anything. It's kinda like moving an msn chat window around the screen. What I have is a message to the user that they need to keep open, however my message might be blocking their view of the gaming board, so I need them to be able to move it out of their way if it is.

What is the best way for doing this?

aconran
27 Sep 2009, 9:40 AM
Ext.get('message').initDD();

4myGod
27 Sep 2009, 9:46 AM
Holy crap that is awesome. So simple... Thank you.