MCPcopy Create free account
hub / github.com/JsAaron/jQuery / propFilter

Function propFilter

2.1.1/test/jquery-2.1.1.js:6468–6503  ·  view source on GitHub ↗
( props, specialEasing )

Source from the content-addressed store, hash-verified

6466}
6467
6468function propFilter( props, specialEasing ) {
6469 var index, name, easing, value, hooks;
6470
6471 // camelCase, specialEasing and expand cssHook pass
6472 for ( index in props ) {
6473 name = jQuery.camelCase( index );
6474 easing = specialEasing[ name ];
6475 value = props[ index ];
6476 if ( jQuery.isArray( value ) ) {
6477 easing = value[ 1 ];
6478 value = props[ index ] = value[ 0 ];
6479 }
6480
6481 if ( index !== name ) {
6482 props[ name ] = value;
6483 delete props[ index ];
6484 }
6485
6486 hooks = jQuery.cssHooks[ name ];
6487 if ( hooks && "expand" in hooks ) {
6488 value = hooks.expand( value );
6489 delete props[ name ];
6490
6491 // not quite $.extend, this wont overwrite keys already present.
6492 // also - reusing 'index' from above because we have the correct "name"
6493 for ( index in value ) {
6494 if ( !( index in props ) ) {
6495 props[ index ] = value[ index ];
6496 specialEasing[ index ] = easing;
6497 }
6498 }
6499 } else {
6500 specialEasing[ name ] = easing;
6501 }
6502 }
6503}
6504
6505function Animation( elem, properties, options ) {
6506 var result,

Callers 1

AnimationFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected