i cant believe this.. Uncommenting the console.debug() calls inside the
onEnd handler resolved the problem.
s
rgrds
andrew
2009/2/23 andras
>
> Can anyone help me file a bug report about this with webkit? Could
> this have anything to do with the safari image drag functionality? (ie
> you can grab any img and drag it out of the browser to download it)
>
> On Feb 22, 12:52 pm, andras wrote:
> > hey all,
> >
> > i've created a very iphone-y slider element that is both restricted in
> > overall movement horizontally (0-400px and it does not move
> > vertically) and "snaps" to either side of the 400px "container" when
> > it has passed the 200px mark and the drag has ended. It works perfect
> > in firefox. In Safari, the onEnd function that positions the element
> > to either end of this 400px container, is never called. Whats more,
> > the draggable element "sticks" to the mouse cursor and i have to
> > reload the page to end the animation.
> >
> > Here's my code
> >
> >
> >
> > new Draggable('dragtest', { constraint: 'horizontal',
> > onEnd: function(e, me) {
> > console.debug("!!!")
> > element = e.element
> > x = element.style.left
> > x = x.gsub('px','')
> >
> > if (x >= 200) {
> > $('dragtest').style.left = 400+'px';
> >
> > }
> >
> > if (x < 200) {
> > $('dragtest').style.left = 0+'px';
> > }
> >
> > console.debug("Snapping to ", element.style.left, " (x
> > was ", x, ")")
> > return true;
> >
> > },
> > snap: function(x, y) {
> > ret_x = x
> > ret_y = y
> >
> > if (x >= 400) {
> > ret_x = 400
> > }
> >
> > if (x <= 0) {
> > ret_x = 0
> > }
> >
> > return [ret_x,ret_y]
> >
> > }});
> >
> >
> >
> > thanks!
> > andrew
> >
>
--~--~-~--~~~---~--~~
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 prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---