I solved that one myself
set option bringtofront to true.
When draggable is dragged, it gets detached from its parent node and attached
to the body node. On end of revert, it gets reattached.
Works only with ghosting and revert=on, because that is all i need at the
moment.
Diff Patch for dragdrop.js:
128c128
< reverteffect: (function(element, top_offset, left_offset) {
---
> reverteffect: function(element, top_offset, left_offset) {
130,157c130,131
< new Effect.MoveBy(element, -top_offset, -left_offset,
< {duration:dur,
< afterFinish:(function(){
<
< if(this.onFront) {
< this.onFront=false;
<
< this.element.style.left=this._clone.offsetLeft+"px";
< this.element.style.top=this._clone.offsetTop+"px";
<
this._clone.parentNode.insertBefore(this.element,this._clone);
< Position.relativize(this.element);
<
< if(this.options.ghosting) {
<
< Element.remove(this._clone);
< this._clone = null;
< }
<
< }
<
< }).bind(this)
< });
<
<
<
<
<
< }).bind(this),
---
> new Effect.MoveBy(element, -top_offset, -left_offset, {duration:dur});
> },
217,218c191
< if( this.onFront)
< return;
---
>
226c199
<
---
>
241,245c214,216
<
<
<
< if(this.options.ghosting && !this.options.bringtofront) {
< //Position.relativize(this.element);
---
>
> if(this.options.ghosting) {
> Position.relativize(this.element);
249,250d219
<
<
318c287
< if(this.options.ghosting && !this.onFront) {
---
> if(this.options.ghosting) {
323,331c292
< if(this.options.bringtofront && !this.onFront) {
< this.onFront=true;
< pos=Position.page(this.element);
< this.originalLeft = pos[0];
< this.originalTop = pos[1];
< this.originalZ=1000;
< document.body.appendChild(this.element);
<
< }
---
>
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
_______________________________________________
Rails-spinoffs mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs