Hi,

I have a fairly big amount of draggable items that I've placed into a
fixe sized div with "overflow: auto" style.
I was hoping being able to scroll in that div until I found the item I
want to drag and then drag it outside of the div.

Of course, when I try to drag the object out of the div, it disapears
and the div's scrollbars shows that it is still in the div.

Here is what I tried first :

http://jsbin.com/ubodi4

I thought that using ghosting would help, but if I can now drag the
items out of the div, they disappear from it (according to the doc, it
should create a copy of the item and drag the copy, not removing the
item...):
To be accurate, the item disappears on chromium 6, but is moved on
window pos 0,0 (top left) on Firefox 3.5.5

http://jsbin.com/ubodi4/2

Using both ghosting and revert didn't help (only difference is that
now chromium act like FF):

http://jsbin.com/ubodi4/3

Worst: If the div has style "position: absolute", it is again not
possible to drag items out of the div :o(

http://jsbin.com/ubodi4/4

Until now, I was using my own drag'n drop lib that handled this
correctly, but I am trying to migrate toward prototype/scripty and I
would really would like to achieve the same result with scripty's
drag'n drop.

Not sure it would help, but what my lib was doing is creating a
"ghost" from the dragged object which was a direct child of the body.
Is it possible to override the "ghosting" step in scriptaculous's
drag'n drop?

I've spend more than 3 hours trying exotic ways of fixing it, and
there isn't much I can think of.
Any hint/idea is welcome :o)

Eric

PS: Here is the code I use in case you don't want to go on jsbin:
var list = $('list');
var i;
for(i=1;i<20;++i)
{
  var elt = new Element('span').update('item '+i);
  new Draggable(elt,{ghosting:true});
  list.insert(elt);
}

PS2: sadly, jsbin's edit preview still doesn't work on Firefox, so
you'll need another browser if you want to interactively edit/test the
code...

-- 
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to