I like crisper Fx transitions, so I want to change the following
default options for the Fx class:

   duration: 250
   transition: 'expo:out'
   fps: 100

I'd like to have it so that all instances of Fx and their subclasses
(Fx.Slide, Fx.Morph, Element.tween, etc) take these changes too. The
only way I've found to do this is to overwrite the entire initialize
method of Fx by copy+pasting the existing method and adding my own
code:

Fx.implement({
    initialize: function(options) {
        this.subject = this.subject || this;
        // my code
        options = options || {};
        options.duration = options.duration || 250;
        options.transition = options.transition || 'expo:out';
        options.fps = options.fps || 100;
        // end my code
        this.setOptions(options);
    }
});

Is there any other way to do this cleanly? If I upgrade core in the
future, I'll just have to update this method.

Reply via email to