Skip to content

Commit 3c6994e

Browse files
committed
Merge branch 'ACP2E-3061' of https://github.com/adobe-commerce-tier-4/magento2ce into T4-PR-06-14-2024
2 parents 24e9478 + 4b84767 commit 3c6994e

File tree

1 file changed

+43
-39
lines changed

1 file changed

+43
-39
lines changed
Lines changed: 43 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,72 @@
11
/*!
2-
* jQuery UI Effects Clip 1.13.2
2+
* jQuery UI Effects Drop 1.13.2
33
* http://jqueryui.com
44
*
55
* Copyright jQuery Foundation and other contributors
66
* Released under the MIT license.
77
* http://jquery.org/license
88
*/
99

10-
//>>label: Clip Effect
10+
//>>label: Drop Effect
1111
//>>group: Effects
12-
//>>description: Clips the element on and off like an old TV.
13-
//>>docs: http://api.jqueryui.com/clip-effect/
12+
//>>description: Moves an element in one direction and hides it at the same time.
13+
//>>docs: http://api.jqueryui.com/drop-effect/
1414
//>>demos: http://jqueryui.com/effect/
1515

16-
( function( factory ) {
17-
"use strict";
16+
(function (factory) {
17+
'use strict';
1818

19-
if ( typeof define === "function" && define.amd ) {
19+
if (typeof define === 'function' && define.amd) {
2020

2121
// AMD. Register as an anonymous module.
22-
define( [
23-
"jquery",
24-
"../version",
25-
"../effect"
26-
], factory );
22+
define([
23+
'jquery',
24+
'../version',
25+
'../effect'
26+
], factory);
2727
} else {
2828

2929
// Browser globals
30-
factory( jQuery );
30+
factory(jQuery);
3131
}
32-
} )( function( $ ) {
33-
"use strict";
32+
})(function ($) {
33+
'use strict';
3434

35-
return $.effects.define( "clip", "hide", function( options, done ) {
36-
var start,
37-
animate = {},
38-
element = $( this ),
39-
direction = options.direction || "vertical",
40-
both = direction === "both",
41-
horizontal = both || direction === "horizontal",
42-
vertical = both || direction === "vertical";
35+
return $.effects.define('drop', 'hide', function (options, done) {
4336

44-
start = element.cssClip();
45-
animate.clip = {
46-
top: vertical ? ( start.bottom - start.top ) / 2 : start.top,
47-
right: horizontal ? ( start.right - start.left ) / 2 : start.right,
48-
bottom: vertical ? ( start.bottom - start.top ) / 2 : start.bottom,
49-
left: horizontal ? ( start.right - start.left ) / 2 : start.left
50-
};
37+
var distance,
38+
element = $(this),
39+
mode = options.mode,
40+
show = mode === 'show',
41+
direction = options.direction || 'left',
42+
ref = direction === 'up' || direction === 'down' ? 'top' : 'left',
43+
motion = direction === 'up' || direction === 'left' ? '-=' : '+=',
44+
oppositeMotion = motion === '+=' ? '-=' : '+=',
45+
animation = {
46+
opacity: 0
47+
};
5148

52-
$.effects.createPlaceholder( element );
49+
$.effects.createPlaceholder(element);
5350

54-
if ( options.mode === "show" ) {
55-
element.cssClip( animate.clip );
56-
animate.clip = start;
51+
distance = options.distance ||
52+
element[ ref === 'top' ? 'outerHeight' : 'outerWidth' ](true) / 2;
53+
54+
animation[ ref ] = motion + distance;
55+
56+
if (show) {
57+
element.css(animation);
58+
59+
animation[ ref ] = oppositeMotion + distance;
60+
animation.opacity = 1;
5761
}
5862

59-
element.animate( animate, {
63+
// Animate
64+
element.animate(animation, {
6065
queue: false,
6166
duration: options.duration,
6267
easing: options.easing,
6368
complete: done
64-
} );
65-
66-
} );
69+
});
70+
});
6771

68-
} );
72+
});

0 commit comments

Comments
 (0)