MCPcopy Index your code
hub / github.com/documentcloud/visualsearch / defaultPrefilter

Function defaultPrefilter

build-min/dependencies.js:457–467  ·  view source on GitHub ↗
(elem,props,opts)

Source from the content-addressed store, hash-verified

455return attrs;}
456function createTween(value,prop,animation){var tween,collection=(tweeners[prop]||[]).concat(tweeners["*"]),index=0,length=collection.length;for(;index<length;index++){if((tween=collection[index].call(animation,prop,value))){return tween;}}}
457function defaultPrefilter(elem,props,opts){var prop,value,toggle,tween,hooks,oldfire,display,dDisplay,anim=this,orig={},style=elem.style,hidden=elem.nodeType&&isHidden(elem),dataShow=jQuery._data(elem,"fxshow");if(!opts.queue){hooks=jQuery._queueHooks(elem,"fx");if(hooks.unqueued==null){hooks.unqueued=0;oldfire=hooks.empty.fire;hooks.empty.fire=function(){if(!hooks.unqueued){oldfire();}};}
458hooks.unqueued++;anim.always(function(){anim.always(function(){hooks.unqueued--;if(!jQuery.queue(elem,"fx").length){hooks.empty.fire();}});});}
459if(elem.nodeType===1&&("height"in props||"width"in props)){opts.overflow=[style.overflow,style.overflowX,style.overflowY];display=jQuery.css(elem,"display");dDisplay=defaultDisplay(elem.nodeName);if(display==="none"){display=dDisplay;}
460if(display==="inline"&&jQuery.css(elem,"float")==="none"){if(!support.inlineBlockNeedsLayout||dDisplay==="inline"){style.display="inline-block";}else{style.zoom=1;}}}
461if(opts.overflow){style.overflow="hidden";if(!support.shrinkWrapBlocks()){anim.always(function(){style.overflow=opts.overflow[0];style.overflowX=opts.overflow[1];style.overflowY=opts.overflow[2];});}}
462for(prop in props){value=props[prop];if(rfxtypes.exec(value)){delete props[prop];toggle=toggle||value==="toggle";if(value===(hidden?"hide":"show")){if(value==="show"&&dataShow&&dataShow[prop]!==undefined){hidden=true;}else{continue;}}
463orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop);}}
464if(!jQuery.isEmptyObject(orig)){if(dataShow){if("hidden"in dataShow){hidden=dataShow.hidden;}}else{dataShow=jQuery._data(elem,"fxshow",{});}
465if(toggle){dataShow.hidden=!hidden;}
466if(hidden){jQuery(elem).show();}else{anim.done(function(){jQuery(elem).hide();});}
467anim.done(function(){var prop;jQuery._removeData(elem,"fxshow");for(prop in orig){jQuery.style(elem,prop,orig[prop]);}});for(prop in orig){tween=createTween(hidden?dataShow[prop]:0,prop,anim);if(!(prop in dataShow)){dataShow[prop]=tween.start;if(hidden){tween.end=tween.start;tween.start=prop==="width"||prop==="height"?1:0;}}}}}
468function propFilter(props,specialEasing){var index,name,easing,value,hooks;for(index in props){name=jQuery.camelCase(index);easing=specialEasing[name];value=props[index];if(jQuery.isArray(value)){easing=value[1];value=props[index]=value[0];}
469if(index!==name){props[name]=value;delete props[index];}
470hooks=jQuery.cssHooks[name];if(hooks&&"expand"in hooks){value=hooks.expand(value);delete props[name];for(index in value){if(!(index in props)){props[index]=value[index];specialEasing[index]=easing;}}}else{specialEasing[name]=easing;}}}

Callers

nothing calls this directly

Calls 4

isHiddenFunction · 0.85
defaultDisplayFunction · 0.85
jQueryFunction · 0.85
createTweenFunction · 0.85

Tested by

no test coverage detected