Ticket #444 (new enhancement)
FX.options.duration can be a function
| Reported by: | guiguibonbon | Owned by: | |
|---|---|---|---|
| Type: | enhancement | Priority: | minor |
| Milestone: | Mootools version 1.3 | Component: | Core |
| Keywords: | duration, speed | Cc: |
Description
Sorry, don't know how to submit a patch.
start: function(from, to){
if (!this.options.wait) this.stop();
else if (this.timer) return this;
this.from = from;
this.to = to;
this.change = this.to - this.from;
if (typeof this.options.duration == "function")
this.options.duration = this.options.duration(this.change, this.from, this.to);
this.timer = this.step.periodical(Math.round(1000 / this.options.fps), this);
this.fireEvent('onStart', this.element);
return this;
},
Change History
Note: See
TracTickets for help on using
tickets.