OK maybe there is an answer in native scripty code but I couldn't find
it
So I solved it by adding a plugin. Feedback welcome
Changed these lines in Draggable.prototype.draw
// if((!this.options.constraint) ||
(this.options.constraint=='horizontal'))
// style.left = p[0] + "px";
// if((!this.options.constraint) ||
(this.options.constraint=='vertical'))
// style.top = p[1] + "px";
if((!this.options.constraint) ||
(this.options.constraint=='horizontal'))
style.left = ((this.options.mouseOffset && point[0]) || p[0])
+ "px";
if((!this.options.constraint) ||
(this.options.constraint=='vertical'))
style.top = ((this.options.mouseOffset && point[1]) || p[1]) +
"px";
and when I create the draggable I set my own custom option
mouseOffset: true
On Mar 25, 6:45 pm, angus <[email protected]> wrote:
> This is an age old problem - but now I'm using scriptaculous for my
> drag engine its come back to haunt me. When dragging a tree node over
> other tree nodes I want mouseover to fire for each node I drag over.
> So I want to position draggable.element so that its top-left is
> slightly below and to the right of the mousepointer
>
> I could reposition constantly in the onDrag handler but this is jerky
> and slow
>
> can anyone help? - thanks
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.