I have a droppable and draggable implementation. works pretty much well except when my droppables are on a scrollbar (created via overflow:auto) since my droppables are on a list. seems that the droppables aren''t working well with scrollbars and overflow. please help! thanks! _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Actually, it''s working just like the CSS standard says it''s supposed to. This problem can be a pain. This has been addressed on this list several times; here are some possible solutions. (This assumes you wish to drag the item outside of your scrolled list.) 1. Move the droppable outside (make it a sibling of) its original container. 2. On start drag, set the list style to overflow:visible TAG On Aug 7, 2006, at 1:22 AM, Brian Feliciano wrote:> I have a droppable and draggable implementation. works pretty much > well except when my droppables are on a scrollbar (created via > overflow:auto) since my droppables are on a list. > seems that the droppables aren''t working well with scrollbars and > overflow. > > please help! > > thanks! > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
A 3rd option, which is what I use, is on drag start create a clone of the draggable item (just like if you use the ghosting option), and attach the cloned element at the _document_ level. This doesn''t require you to break your design by showing overflow for items you want to keep the overflow hidden.. although it is slightly trickier to implement. On 8/7/06, Tom Gregory <tomg-PGZyUNKar/Q@public.gmane.org> wrote:> > Actually, it''s working just like the CSS standard says it''s supposed > to. This problem can be a pain. > > This has been addressed on this list several times; here are some > possible solutions. (This assumes you wish to drag the item outside > of your scrolled list.) > 1. Move the droppable outside (make it a sibling of) its original > container. > 2. On start drag, set the list style to overflow:visible > > > TAG > > On Aug 7, 2006, at 1:22 AM, Brian Feliciano wrote: > > > I have a droppable and draggable implementation. works pretty much > > well except when my droppables are on a scrollbar (created via > > overflow:auto) since my droppables are on a list. > > seems that the droppables aren''t working well with scrollbars and > > overflow. > > > > please help! > > > > thanks! > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
I''ve also done this. (In #1, I meant move the "Draggable" to a different DOM position, not the "Droppable", which is the same intent as Ryan''s solution.) It certainly is tricky to implement. To save me the trouble of trying to move around the "ghost," I created one at the "onclick", made it a Draggable, then manually kicked off the drag sequence. TAG On Aug 7, 2006, at 10:21 AM, Ryan Gahl wrote:> A 3rd option, which is what I use, is on drag start create a clone > of the draggable item (just like if you use the ghosting option), > and attach the cloned element at the _document_ level. This doesn''t > require you to break your design by showing overflow for items you > want to keep the overflow hidden.. although it is slightly trickier > to implement. > > > > On 8/7/06, Tom Gregory <tomg-PGZyUNKar/Q@public.gmane.org> wrote: > Actually, it''s working just like the CSS standard says it''s supposed > to. This problem can be a pain. > > This has been addressed on this list several times; here are some > possible solutions. (This assumes you wish to drag the item outside > of your scrolled list.) > 1. Move the droppable outside (make it a sibling of) its original > container. > 2. On start drag, set the list style to overflow:visible > > > TAG > > On Aug 7, 2006, at 1:22 AM, Brian Feliciano wrote: > > > I have a droppable and draggable implementation. works pretty much > > well except when my droppables are on a scrollbar (created via > > overflow:auto) since my droppables are on a list. > > seems that the droppables aren''t working well with scrollbars and > > overflow. > > > > please help! > > > > thanks! > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
I am running into the same issue (as apparently most people)... Anyone have a working example of this? -Greg On Aug 7, 2006, at 12:31 PM, Tom Gregory wrote:> I''ve also done this. (In #1, I meant move the "Draggable" to a > different DOM position, not the "Droppable", which is the same > intent as Ryan''s solution.) > > It certainly is tricky to implement. To save me the trouble of > trying to move around the "ghost," I created one at the "onclick", > made it a Draggable, then manually kicked off the drag sequence. > > > TAG > > On Aug 7, 2006, at 10:21 AM, Ryan Gahl wrote: > >> A 3rd option, which is what I use, is on drag start create a clone >> of the draggable item (just like if you use the ghosting option), >> and attach the cloned element at the _document_ level. This >> doesn''t require you to break your design by showing overflow for >> items you want to keep the overflow hidden.. although it is >> slightly trickier to implement. >> >> >> >> On 8/7/06, Tom Gregory <tomg-PGZyUNKar/Q@public.gmane.org> wrote: >> Actually, it''s working just like the CSS standard says it''s supposed >> to. This problem can be a pain. >> >> This has been addressed on this list several times; here are some >> possible solutions. (This assumes you wish to drag the item outside >> of your scrolled list.) >> 1. Move the droppable outside (make it a sibling of) its original >> container. >> 2. On start drag, set the list style to overflow:visible >> >> >> TAG >> >> On Aug 7, 2006, at 1:22 AM, Brian Feliciano wrote: >> >> > I have a droppable and draggable implementation. works pretty much >> > well except when my droppables are on a scrollbar (created via >> > overflow:auto) since my droppables are on a list. >> > seems that the droppables aren''t working well with scrollbars and >> > overflow. >> > >> > please help! >> > >> > thanks! >> > _______________________________________________ >> > Rails-spinoffs mailing list >> > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Ryan, Since this is a very obvious problem and seeing your passionate responses to Drag/Drop over all these months :), why don''t you submit a patch for this? It will make everyone''s life easier :) -Mandy. _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
The short version: // 1. Create the copy. For this example in a variable called ''div'', set your options // 2. Inside your mousedown handler, create your Draggable var d = new Draggable(div, {revert: false, ghosting: false }); // 3. Pass the current event to Draggable.init() and Draggable.updateDrag() d.initDrag(event); Draggables.updateDrag(event); The long version: (I''ve removed some application specific code here, so this may not work bug free, but the concept is there.) var LongListItem = Class.create(); LongListItem.prototype = { // <snip> onMouseDown: function (event) { if (!Event.isLeftClick(event)) {return;} Draggables.clear(); var div = document.createElement("div"); div.style.position = "absolute"; div.id = "draggable"; div.sourceItem = this; //set Position var offsets = Position.page(this.element); //Wrapper margin being counted twice? In Moz, what about others? var correction = Position.page($("wrapper")); div.style.left = (offsets[0] - correction[0]) + ''px''; div.style.top = (offsets[1] - correction[1]) + ''px''; var countPos = Position.page(this._getCountElement()); div.style.width = (countPos[0] - offsets[0] - correction[0]) + ''px''; var parent = $("wrapper"); parent.insertBefore(div, parent.firstChild); var d = new Draggable(div, {revert: false, ghosting: false, endeffect: function (element) { element._opacity = Element.getOpacity(element); new Effect.Opacity(element, {duration:0.5, from:element._opacity, to:0.0, afterFinish: function(obj) {Draggables.clear();} }); }, scroll: "rightContainers" }); d.initDrag(event); Draggables.updateDrag(event); } } Draggables.clear = function (event) { while (Draggables.drags.length) { var d = Draggables.drags.pop(); var e = d.element; d.stopScrolling(); d.destroy(); d.element = null; if (e.parentNode) {e.parentNode.removeChild(e)}; } } On Aug 7, 2006, at 2:21 PM, Greg Militello wrote:> I am running into the same issue (as apparently most people)... > > Anyone have a working example of this? > > -Greg > > On Aug 7, 2006, at 12:31 PM, Tom Gregory wrote: > >> I''ve also done this. (In #1, I meant move the "Draggable" to a >> different DOM position, not the "Droppable", which is the same >> intent as Ryan''s solution.) >> >> It certainly is tricky to implement. To save me the trouble of >> trying to move around the "ghost," I created one at the "onclick", >> made it a Draggable, then manually kicked off the drag sequence. >> >> >> TAG >> >> On Aug 7, 2006, at 10:21 AM, Ryan Gahl wrote: >> >>> A 3rd option, which is what I use, is on drag start create a >>> clone of the draggable item (just like if you use the ghosting >>> option), and attach the cloned element at the _document_ level. >>> This doesn''t require you to break your design by showing overflow >>> for items you want to keep the overflow hidden.. although it is >>> slightly trickier to implement. >>> >>> >>> >>> On 8/7/06, Tom Gregory <tomg-PGZyUNKar/Q@public.gmane.org> wrote: >>> Actually, it''s working just like the CSS standard says it''s supposed >>> to. This problem can be a pain. >>> >>> This has been addressed on this list several times; here are some >>> possible solutions. (This assumes you wish to drag the item outside >>> of your scrolled list.) >>> 1. Move the droppable outside (make it a sibling of) its original >>> container. >>> 2. On start drag, set the list style to overflow:visible >>> >>> >>> TAG >>> >>> On Aug 7, 2006, at 1:22 AM, Brian Feliciano wrote: >>> >>> > I have a droppable and draggable implementation. works pretty much >>> > well except when my droppables are on a scrollbar (created via >>> > overflow:auto) since my droppables are on a list. >>> > seems that the droppables aren''t working well with scrollbars and >>> > overflow. >>> > >>> > please help! >>> > >>> > thanks! >>> > _______________________________________________ >>> > Rails-spinoffs mailing list >>> > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >>> >>> _______________________________________________ >>> Rails-spinoffs mailing list >>> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >>> >>> _______________________________________________ >>> Rails-spinoffs mailing list >>> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Mandy, I am so sorry I haven''t done anything like that yet. I''ll get there. I''ve just been so busy. One of my big projects is getting close to coming to fruition (well relatively close anyway), at which time a lot of my (and my team''s) works will be released (some open source and patch-type stuff like the drag drop enhancements, and some commercial (but extremely cheap)). ...I do want to contribute, I just haven''t been able to spend time factoring out patch material and making it proper for the community at large. On 8/8/06, Maninder, Singh <mandiv-W2hqgAdRMsX2eFz/2MeuCQ@public.gmane.org> wrote:> > Ryan, > > Since this is a very obvious problem and seeing your passionate responses > to Drag/Drop over all these months :), why don''t you submit a patch for > this? > > It will make everyone''s life easier :) > > -Mandy. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Ryan, If you need incentive, I''d be willing to donate. :) Something that will save me hours is worth something to me. -Greg On Aug 8, 2006, at 10:16 AM, Ryan Gahl wrote:> Mandy, I am so sorry I haven''t done anything like that yet. I''ll > get there. I''ve just been so busy. One of my big projects is > getting close to coming to fruition (well relatively close anyway), > at which time a lot of my (and my team''s) works will be released > (some open source and patch-type stuff like the drag drop > enhancements, and some commercial (but extremely cheap)). > > ...I do want to contribute, I just haven''t been able to spend time > factoring out patch material and making it proper for the community > at large. > > > > On 8/8/06, Maninder, Singh <mandiv-W2hqgAdRMsX2eFz/2MeuCQ@public.gmane.org> wrote: > Ryan, > > Since this is a very obvious problem and seeing your passionate > responses to Drag/Drop over all these months :), why don''t you > submit a patch for this? > > It will make everyone''s life easier :) > > -Mandy. > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs