mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-06-06 00:37:25 +03:00
Merge commit '7f7c9b378f
' as 'jquery-ui'
This commit is contained in:
commit
0115f4500d
629 changed files with 341074 additions and 0 deletions
57
jquery-ui/ui/effect-transfer.js
vendored
Normal file
57
jquery-ui/ui/effect-transfer.js
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
/*!
|
||||
* jQuery UI Effects Transfer @VERSION
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/transfer-effect/
|
||||
*/
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([
|
||||
"jquery",
|
||||
"./effect"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
return $.effects.effect.transfer = function( o, done ) {
|
||||
var elem = $( this ),
|
||||
target = $( o.to ),
|
||||
targetFixed = target.css( "position" ) === "fixed",
|
||||
body = $("body"),
|
||||
fixTop = targetFixed ? body.scrollTop() : 0,
|
||||
fixLeft = targetFixed ? body.scrollLeft() : 0,
|
||||
endPosition = target.offset(),
|
||||
animation = {
|
||||
top: endPosition.top - fixTop,
|
||||
left: endPosition.left - fixLeft,
|
||||
height: target.innerHeight(),
|
||||
width: target.innerWidth()
|
||||
},
|
||||
startPosition = elem.offset(),
|
||||
transfer = $( "<div class='ui-effects-transfer'></div>" )
|
||||
.appendTo( document.body )
|
||||
.addClass( o.className )
|
||||
.css({
|
||||
top: startPosition.top - fixTop,
|
||||
left: startPosition.left - fixLeft,
|
||||
height: elem.innerHeight(),
|
||||
width: elem.innerWidth(),
|
||||
position: targetFixed ? "fixed" : "absolute"
|
||||
})
|
||||
.animate( animation, o.duration, o.easing, function() {
|
||||
transfer.remove();
|
||||
done();
|
||||
});
|
||||
};
|
||||
|
||||
}));
|
Loading…
Add table
Add a link
Reference in a new issue