Changes between Initial Version and Version 2 of Ticket #3912


Ignore:
Timestamp:
Jan 22, 2009, 6:57:02 PM (13 years ago)
Author:
kbwood
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3912

    • Property Component changed from ui.core to effects.core
  • Ticket #3912 – Description

    initial v2  
    1 Some effects perform a calculation on the duration before proceeding with the animation, such as bounce, fold, and pulsate. However, they fail to cater for non-numeric durations, such as slow, normal, or fast. There needs to be a common function to resolve the non-numeric duration to a numeric value that can then be used without further problems. The code below is based on the jQuery 1.3 code.
     1Some effects perform a calculation on the duration before proceeding with the animation, such as bounce, fold, and pulsate. However, they fail to cater for non-numeric durations, such as slow, normal, or fast. There needs to be a common function to resolve the non-numeric duration to a numeric value that can then be used without further problems. The code below is based on the jQuery 1.3 code (replace \\ with two vertical bars - can't seem to enter these directly).
    22
    33function resolveDuration(duration) {
    44        return (typeof duration === "number" && !isNaN(duration) ? duration :
    5                 jQuery.fx.speeds[duration] || jQuery.fx.speeds._default);
     5                jQuery.fx.speeds[duration] \\ jQuery.fx.speeds._default);
    66}