Scriptaculous and Move

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Scriptaculous and Move

squeakman
Greetings All,

I am trying to use the Move Effect in Scriptaculous.  Here is my simple
test code:

renderContentOn: html
   html div
     id: 'testMove';
     onClick: (html effect id:'testMove'; duration: 1; move: 10@10);
     with: [html text: 'this is a test'].


When I run this, the javascript for the move effect is executed (I have
a breakpoint to prove it) but the element does not move.

I have tried the other effects, e.g., "scale" and it works but "move"
appears to do nothing.

What am I doing wrong?

Thanks,
Frank

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Scriptaculous and Move

Lukas Renggli
>  What am I doing wrong?

Did FireBug say anything?

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Scriptaculous and Move

squeakman
Lukas Renggli wrote:
>>  What am I doing wrong?
>
> Did FireBug say anything?
>
> Cheers,
> Lukas
>
No I saw no error messages from FireBug - nothing in the console.

I am assuming that any complaints would be reported in the console?

...Frank

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Scriptaculous and Move

squeakman

>> Did FireBug say anything?
>>

> No I saw no error messages from FireBug - nothing in the console.
>
> I am assuming that any complaints would be reported in the console?
>
> ...Frank

Below is the generated HTML, in case this helps is spotting the problem.

<div onclick="new Effect.Move('testMove',10,10,{'duration':1})"
id="testMove" style="position: relative; left: 0px; top: 0px;">this is a
test</div>

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Re: Scriptaculous and Move

Gaetan Le Brun
It works for me if i replace :
new Effect.Move('testMove',10,10,{'duration':1})
with :
new Effect.Move('testMove',{'x':10,'y':10,'duration':1})

Gaëtan

On Tue, Sep 30, 2008 at 4:55 PM, Squeaker <[hidden email]> wrote:

Did FireBug say anything?


No I saw no error messages from FireBug - nothing in the console.

I am assuming that any complaints would be reported in the console?

...Frank

Below is the generated HTML, in case this helps is spotting the problem.

<div onclick="new Effect.Move('testMove',10,10,{'duration':1})" id="testMove" style="position: relative; left: 0px; top: 0px;">this is a test</div>


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



--
Gaëtan Le Brun

"The best way to predict the future is to invent it.", A.Kay, 1971

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Scriptaculous and Move

squeakman
Gaëtan Le Brun wrote:
> It works for me if i replace :
> new Effect.Move('testMove',10,10,{'duration':1})
> with :
> new Effect.Move('testMove',{'x':10,'y':10,'duration':1})
>
> Gaëtan
>

Yes, I can confirm that your changes worked.  Thanks.

It appears to me that this is a problem with the SUEffect>>move: method.
      Assuming that this is a bug, is this where the fix should go?

...Frank

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Re: Scriptaculous and Move

Gaetan Le Brun
I tried the code below and it fixes the bug :

SUEffect>>move: aPoint
    "This effect moves an element by a given x/y pair of pixels."

    self create; method: 'Move';
     optionAt: 'x' put: aPoint x;
     optionAt: 'y' put: aPoint y



On Tue, Sep 30, 2008 at 5:29 PM, Squeaker <[hidden email]> wrote:
Gaëtan Le Brun wrote:
It works for me if i replace :
new Effect.Move('testMove',10,10,{'duration':1})
with :
new Effect.Move('testMove',{'x':10,'y':10,'duration':1})

Gaëtan


Yes, I can confirm that your changes worked.  Thanks.

It appears to me that this is a problem with the SUEffect>>move: method.     Assuming that this is a bug, is this where the fix should go?

...Frank


_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



--
Gaëtan Le Brun

"The best way to predict the future is to invent it.", A.Kay, 1971

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Re: Scriptaculous and Move

Lukas Renggli
Thank you, I will committed an update version for Seaside 2.8:

  Name: Scriptaculous-lr.242
  Author: lr
  Time: 30 September 2008, 6:33:14 pm
  UUID: 7db360d6-e196-4c13-a18b-7773f5c9feb3
  Ancestors: Scriptaculous-lr.241

  - fixed Effect.Move and updated tests
  - improved performance with WASmallDictionary

Obviously the Move-Effect has changed in the JavaScript library
recently and I missed to update the Smalltalk bindings.

Cheers,
Lukas

On 9/30/08, Gaëtan Le Brun <[hidden email]> wrote:

> I tried the code below and it fixes the bug :
>
> SUEffect>>move: aPoint
>     "This effect moves an element by a given x/y pair of pixels."
>
>     self create; method: 'Move';
>       optionAt: 'x' put: aPoint x;
>      optionAt: 'y' put: aPoint y
>
>
>
>
> On Tue, Sep 30, 2008 at 5:29 PM, Squeaker <[hidden email]> wrote:
>
> >
> > Gaëtan Le Brun wrote:
> >
> > > It works for me if i replace :
> > > new Effect.Move('testMove',10,10,{'duration':1})
> > > with :
> > > new
> Effect.Move('testMove',{'x':10,'y':10,'duration':1})
> > >
> > > Gaëtan
> > >
> > >
> >
> > Yes, I can confirm that your changes worked.  Thanks.
> >
> > It appears to me that this is a problem with the SUEffect>>move: method.
>   Assuming that this is a bug, is this where the fix should go?
> >
> > ...Frank
> >
> >
> >
> >
> > _______________________________________________
> > seaside mailing list
> > [hidden email]
> >
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
>
>
>
> --
> Gaëtan Le Brun
>
> "The best way to predict the future is to invent it.", A.Kay, 1971
>
> _______________________________________________
>  seaside mailing list
>  [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>


--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside