On Jul 21, 2006, at 12:20 PM, bikutoru wrote:

>
> I need to modify the default duration of Visual effects.
> Of course I can go and modify the source code or redefine the:
>
> MochiKit.Visual.DefaultOptions = {
>     transition: MochiKit.Visual.Transitions.sinoidal,
> //    duration: 1.0,  // seconds
>     duration: 0.5,  // seconds
>     fps: 25.0,  // max. 25fps due to MochiKit.Visual.Queue
> implementation
>     sync: false,  // true for combining
>     from: 0.0,
>     to: 1.0,
>     delay: 0.0,
>     queue: 'parallel'
> };
>
> in my script. But it seems that it would be much cleaner if we could
> pass an optional argument to an effect:

A more sane way would be to simply set it...

MochiKit.Visual.DefaultOptions.duration = 0.5;

Probably not necessarily a good idea if you end up using other code  
that assumes a default of 1.0...

> MochiKit.Visual.fade(element, {duration : x});

Did you bother to try it? That should work. It's also documented as  
taking an optional options argument...

-bob


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" 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/mochikit
-~----------~----~----~----~------~----~------~--~---

Reply via email to