equal
deleted
inserted
replaced
1 /*! |
1 /*! |
2 * jQuery UI Effects Explode 1.13.1 |
2 * jQuery UI Effects Explode 1.13.3 |
3 * http://jqueryui.com |
3 * https://jqueryui.com |
4 * |
4 * |
5 * Copyright jQuery Foundation and other contributors |
5 * Copyright OpenJS Foundation and other contributors |
6 * Released under the MIT license. |
6 * Released under the MIT license. |
7 * http://jquery.org/license |
7 * https://jquery.org/license |
8 */ |
8 */ |
9 |
9 |
10 //>>label: Explode Effect |
10 //>>label: Explode Effect |
11 //>>group: Effects |
11 //>>group: Effects |
12 /* eslint-disable max-len */ |
12 /* eslint-disable max-len */ |
13 //>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness. |
13 //>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness. |
14 /* eslint-enable max-len */ |
14 /* eslint-enable max-len */ |
15 //>>docs: http://api.jqueryui.com/explode-effect/ |
15 //>>docs: https://api.jqueryui.com/explode-effect/ |
16 //>>demos: http://jqueryui.com/effect/ |
16 //>>demos: https://jqueryui.com/effect/ |
17 |
17 |
18 ( function( factory ) { |
18 ( function( factory ) { |
19 "use strict"; |
19 "use strict"; |
20 |
20 |
21 if ( typeof define === "function" && define.amd ) { |
21 if ( typeof define === "function" && define.amd ) { |
22 |
22 |
23 // AMD. Register as an anonymous module. |
23 // AMD. Register as an anonymous module. |
24 define( [ |
24 define( [ |
25 "jquery", |
25 "jquery", |
26 "./effect" |
26 "../version", |
|
27 "../effect" |
27 ], factory ); |
28 ], factory ); |
28 } else { |
29 } else { |
29 |
30 |
30 // Browser globals |
31 // Browser globals |
31 factory( jQuery ); |
32 factory( jQuery ); |
81 } ) |
82 } ) |
82 |
83 |
83 // Select the wrapper - make it overflow: hidden and absolute positioned based on |
84 // Select the wrapper - make it overflow: hidden and absolute positioned based on |
84 // where the original was located +left and +top equal to the size of pieces |
85 // where the original was located +left and +top equal to the size of pieces |
85 .parent() |
86 .parent() |
86 .addClass( "ui-effects-explode" ) |
87 .addClass( "ui-effects-explode" ) |
87 .css( { |
88 .css( { |
88 position: "absolute", |
89 position: "absolute", |
89 overflow: "hidden", |
90 overflow: "hidden", |
90 width: width, |
91 width: width, |
91 height: height, |
92 height: height, |
92 left: left + ( show ? mx * width : 0 ), |
93 left: left + ( show ? mx * width : 0 ), |
93 top: top + ( show ? my * height : 0 ), |
94 top: top + ( show ? my * height : 0 ), |
94 opacity: show ? 0 : 1 |
95 opacity: show ? 0 : 1 |
95 } ) |
96 } ) |
96 .animate( { |
97 .animate( { |
97 left: left + ( show ? 0 : mx * width ), |
98 left: left + ( show ? 0 : mx * width ), |
98 top: top + ( show ? 0 : my * height ), |
99 top: top + ( show ? 0 : my * height ), |
99 opacity: show ? 1 : 0 |
100 opacity: show ? 1 : 0 |
100 }, options.duration || 500, options.easing, childComplete ); |
101 }, options.duration || 500, options.easing, childComplete ); |
101 } |
102 } |
102 } |
103 } |
103 |
104 |
104 function animComplete() { |
105 function animComplete() { |
105 element.css( { |
106 element.css( { |