Your real slowdown is probably from the number of Droppables which
must be checked on each mousemove. Various solutions (Peter will
point out he "doughnut" concept) have been proposed, but none are
part of the scriptaculous core.
So far as lazily creating Draggables: some on this list create them
on mouseover, which works nicely. In the past I've even waited until
the mousedown, but that requires an extra bit of coding to
immediately kick-start the draggable:
onMouseDown: function (event) {
var d = new Draggable('someDivId');
//You'll need to add these two lines to start a draggable if
mouse is already down
d.initDrag(event);
Draggables.updateDrag(event);
}
TAG
On Feb 22, 2007, at 9:54 AM, Jean-Philippe Encausse wrote:
>
> Thanks,
>
> For this problem I solved it by setting a specific anchor to drag
> (without links).
> But Setting 300 anchors is slow...
>
> May be If I set the anchor Draggable only onMouseDown it would works ?
> It would be a lazy solution ?
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---