mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-05-24 00:24:07 +03:00
Merge commit 'd21ea7816e
' as 'jquery-ui'
This commit is contained in:
commit
e904a80717
629 changed files with 341074 additions and 0 deletions
60
jquery-ui/ui/effect-puff.js
vendored
Normal file
60
jquery-ui/ui/effect-puff.js
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
/*!
|
||||
* jQuery UI Effects Puff @VERSION
|
||||
* http://jqueryui.com
|
||||
*
|
||||
* Copyright jQuery Foundation and other contributors
|
||||
* Released under the MIT license.
|
||||
* http://jquery.org/license
|
||||
*
|
||||
* http://api.jqueryui.com/puff-effect/
|
||||
*/
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([
|
||||
"jquery",
|
||||
"./effect",
|
||||
"./effect-scale"
|
||||
], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function( $ ) {
|
||||
|
||||
return $.effects.effect.puff = function( o, done ) {
|
||||
var elem = $( this ),
|
||||
mode = $.effects.setMode( elem, o.mode || "hide" ),
|
||||
hide = mode === "hide",
|
||||
percent = parseInt( o.percent, 10 ) || 150,
|
||||
factor = percent / 100,
|
||||
original = {
|
||||
height: elem.height(),
|
||||
width: elem.width(),
|
||||
outerHeight: elem.outerHeight(),
|
||||
outerWidth: elem.outerWidth()
|
||||
};
|
||||
|
||||
$.extend( o, {
|
||||
effect: "scale",
|
||||
queue: false,
|
||||
fade: true,
|
||||
mode: mode,
|
||||
complete: done,
|
||||
percent: hide ? percent : 100,
|
||||
from: hide ?
|
||||
original :
|
||||
{
|
||||
height: original.height * factor,
|
||||
width: original.width * factor,
|
||||
outerHeight: original.outerHeight * factor,
|
||||
outerWidth: original.outerWidth * factor
|
||||
}
|
||||
});
|
||||
|
||||
elem.effect( o );
|
||||
};
|
||||
|
||||
}));
|
Loading…
Add table
Add a link
Reference in a new issue