WordPress/wp-includes/js/jquery/ui/effect-shake.min.js
Aaron Jorbin ebd841790b Build/Test: Update Grunt Uglify options
Follow up to [46408]

Sometimes you need to take documentation literally. And sometimes you need to take it seriously. Deprecations and replacements in uglify are a case where I took them literally and should have taken them seriously.

See #48203.


Built from https://develop.svn.wordpress.org/trunk@46409


git-svn-id: http://core.svn.wordpress.org/trunk@46207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-10-05 22:01:04 +00:00

11 lines
1.1 KiB
JavaScript

/*!
* jQuery UI Effects Shake 1.11.4
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/shake-effect/
*/
!function(e){"function"==typeof define&&define.amd?define(["jquery","./effect"],e):e(jQuery)}(function(y){return y.effects.effect.shake=function(e,t){var i,f=y(this),n=["position","top","bottom","left","right","height","width"],a=y.effects.setMode(f,e.mode||"effect"),o=e.direction||"left",s=e.distance||20,c=e.times||3,r=2*c+1,u=Math.round(e.duration/r),d="up"===o||"down"===o?"top":"left",p="up"===o||"left"===o,h={},m={},g={},l=f.queue(),q=l.length;for(y.effects.save(f,n),f.show(),y.effects.createWrapper(f),h[d]=(p?"-=":"+=")+s,m[d]=(p?"+=":"-=")+2*s,g[d]=(p?"-=":"+=")+2*s,f.animate(h,u,e.easing),i=1;i<c;i++)f.animate(m,u,e.easing).animate(g,u,e.easing);f.animate(m,u,e.easing).animate(h,u/2,e.easing).queue(function(){"hide"===a&&f.hide(),y.effects.restore(f,n),y.effects.removeWrapper(f),t()}),1<q&&l.splice.apply(l,[1,0].concat(l.splice(q,1+r))),f.dequeue()}});