MCPcopy Create free account
hub / github.com/andreikop/python-ws-discovery / Animation

Function Animation

docs/_static/jquery-3.4.1.js:7291–7414  ·  view source on GitHub ↗
( elem, properties, options )

Source from the content-addressed store, hash-verified

7289}
7290
7291function Animation( elem, properties, options ) {
7292 var result,
7293 stopped,
7294 index = 0,
7295 length = Animation.prefilters.length,
7296 deferred = jQuery.Deferred().always( function() {
7297
7298 // Don't match elem in the :animated selector
7299 delete tick.elem;
7300 } ),
7301 tick = function() {
7302 if ( stopped ) {
7303 return false;
7304 }
7305 var currentTime = fxNow || createFxNow(),
7306 remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
7307
7308 // Support: Android 2.3 only
7309 // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
7310 temp = remaining / animation.duration || 0,
7311 percent = 1 - temp,
7312 index = 0,
7313 length = animation.tweens.length;
7314
7315 for ( ; index < length; index++ ) {
7316 animation.tweens[ index ].run( percent );
7317 }
7318
7319 deferred.notifyWith( elem, [ animation, percent, remaining ] );
7320
7321 // If there's more to do, yield
7322 if ( percent < 1 && length ) {
7323 return remaining;
7324 }
7325
7326 // If this was an empty animation, synthesize a final progress notification
7327 if ( !length ) {
7328 deferred.notifyWith( elem, [ animation, 1, 0 ] );
7329 }
7330
7331 // Resolve the animation and report its conclusion
7332 deferred.resolveWith( elem, [ animation ] );
7333 return false;
7334 },
7335 animation = deferred.promise( {
7336 elem: elem,
7337 props: jQuery.extend( {}, properties ),
7338 opts: jQuery.extend( true, {
7339 specialEasing: {},
7340 easing: jQuery.easing._default
7341 }, options ),
7342 originalProperties: properties,
7343 originalOptions: options,
7344 startTime: fxNow || createFxNow(),
7345 duration: options.duration,
7346 tweens: [],
7347 createTween: function( prop, end ) {
7348 var tween = jQuery.Tween( elem, animation.opts, prop, end,

Callers 1

doAnimationFunction · 0.85

Calls 4

createFxNowFunction · 0.85
propFilterFunction · 0.85
isFunctionFunction · 0.85
runMethod · 0.45

Tested by

no test coverage detected