WordPress/wp-includes/js/jquery/ui/effect-explode.min.js
Andrew Ozz e175db4ae1 External Libraries: Update jQuery UI to 1.13.0-rc2.
The final release is expected at the beginning of October. Updating to rc2 now gives everybody plenty of time to test and report any issues either with UI 1.13.0 or with the WordPress implementation.

Props Clorith, mgol, azaozz.
See #52163.
Built from https://develop.svn.wordpress.org/trunk@51794


git-svn-id: http://core.svn.wordpress.org/trunk@51401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-09-10 00:02:59 +00:00

9 lines
1.1 KiB
JavaScript

/*!
* jQuery UI Effects Explode 1.13.0-rc.2
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*/
!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery","./effect"],e):e(jQuery)}(function(b){"use strict";return b.effects.define("explode","hide",function(e,i){var t,o,s,n,f,d,c=e.pieces?Math.round(Math.sqrt(e.pieces)):3,a=c,l=b(this),h="show"===e.mode,p=l.show().css("visibility","hidden").offset(),r=Math.ceil(l.outerWidth()/a),u=Math.ceil(l.outerHeight()/c),v=[];function y(){v.push(this),v.length===c*a&&(l.css({visibility:"visible"}),b(v).remove(),i())}for(t=0;t<c;t++)for(n=p.top+t*u,d=t-(c-1)/2,o=0;o<a;o++)s=p.left+o*r,f=o-(a-1)/2,l.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-o*r,top:-t*u}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:r,height:u,left:s+(h?f*r:0),top:n+(h?d*u:0),opacity:h?0:1}).animate({left:s+(h?0:f*r),top:n+(h?0:d*u),opacity:h?1:0},e.duration||500,e.easing,y)})});