|
Re: Drag & Scroll: msg#00095lang.ruby.rails.spinoffs
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 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Drag & Scroll: 00095, Martin Scheffler |
|---|---|
| Next by Date: | Passing "accept" option through a Sortable: 00095, Peter Wagener |
| Previous by Thread: | Re: Drag & Scrolli: 00095, Martin Scheffler |
| Next by Thread: | How to cancel an effect: 00095, David Teare |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |