WordPress/wp-includes/js/jquery/ui/effect-shake.min.js
Aaron Jorbin d60ca2f758 Bump grunt-contrib-uglify to 0.10.0
This includes an update to the underlying version of uglify which causes all of the JS to be modified.

See #34177


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


git-svn-id: http://core.svn.wordpress.org/trunk@35502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-05 17:47:30 +00:00

25 lines
1.3 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(a){"function"==typeof define&&define.amd?
// AMD. Register as an anonymous module.
define(["jquery","./effect"],a):
// Browser globals
a(jQuery)}(function(a){return a.effects.effect.shake=function(b,c){var d,e=a(this),f=["position","top","bottom","left","right","height","width"],g=a.effects.setMode(e,b.mode||"effect"),h=b.direction||"left",i=b.distance||20,j=b.times||3,k=2*j+1,l=Math.round(b.duration/k),m="up"===h||"down"===h?"top":"left",n="up"===h||"left"===h,o={},p={},q={},
// we will need to re-assemble the queue to stack our animations in place
r=e.queue(),s=r.length;
// Shakes
for(a.effects.save(e,f),e.show(),a.effects.createWrapper(e),
// Animation
o[m]=(n?"-=":"+=")+i,p[m]=(n?"+=":"-=")+2*i,q[m]=(n?"-=":"+=")+2*i,
// Animate
e.animate(o,l,b.easing),d=1;j>d;d++)e.animate(p,l,b.easing).animate(q,l,b.easing);e.animate(p,l,b.easing).animate(o,l/2,b.easing).queue(function(){"hide"===g&&e.hide(),a.effects.restore(e,f),a.effects.removeWrapper(e),c()}),
// inject all the animations we just queued to be first in line (after "inprogress")
s>1&&r.splice.apply(r,[1,0].concat(r.splice(s,k+1))),e.dequeue()}});