Sha256: 1bd0ee84bed6bbd19e28ee6cc79b142f4faa3ab444fe71fe5cfe9445a2972253

Contents?: true

Size: 1.51 KB

Versions: 13

Compression:

Stored size: 1.51 KB

Contents

/*!
 * jQuery UI Effects Clip 1.12.1
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */

//>>label: Clip Effect
//>>group: Effects
//>>description: Clips the element on and off like an old TV.
//>>docs: http://api.jqueryui.com/clip-effect/
//>>demos: http://jqueryui.com/effect/

( function( factory ) {
	if ( typeof define === "function" && define.amd ) {

		// AMD. Register as an anonymous module.
		define( [
			"jquery",
			"../version",
			"../effect"
		], factory );
	} else {

		// Browser globals
		factory( jQuery );
	}
}( function( $ ) {

return $.effects.define( "clip", "hide", function( options, done ) {
	var start,
		animate = {},
		element = $( this ),
		direction = options.direction || "vertical",
		both = direction === "both",
		horizontal = both || direction === "horizontal",
		vertical = both || direction === "vertical";

	start = element.cssClip();
	animate.clip = {
		top: vertical ? ( start.bottom - start.top ) / 2 : start.top,
		right: horizontal ? ( start.right - start.left ) / 2 : start.right,
		bottom: vertical ? ( start.bottom - start.top ) / 2 : start.bottom,
		left: horizontal ? ( start.right - start.left ) / 2 : start.left
	};

	$.effects.createPlaceholder( element );

	if ( options.mode === "show" ) {
		element.cssClip( animate.clip );
		animate.clip = start;
	}

	element.animate( animate, {
		queue: false,
		duration: options.duration,
		easing: options.easing,
		complete: done
	} );

} );

} ) );

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
ext_yarn-0.6.0 vendor/jquery-ui/ui/effects/effect-clip.js
ext_yarn-0.5.0 vendor/jquery-ui/ui/effects/effect-clip.js
ext_yarn-0.4.0 vendor/jquery-ui/ui/effects/effect-clip.js
ext_yarn-0.3.1 vendor/jquery-ui/ui/effects/effect-clip.js
ext_yarn-0.3.0 vendor/jquery-ui/ui/effects/effect-clip.js
ext_yarn-0.2.0 vendor/jquery-ui/ui/effects/effect-clip.js
ext_yarn-0.1.2 node_modules/jquery-ui/ui/effects/effect-clip.js
ext_yarn-0.1.1 node_modules/jquery-ui/ui/effects/effect-clip.js
ext_yarn-0.1.0 node_modules/jquery-ui/ui/effects/effect-clip.js
ext_sprockets-0.1.6 node_modules/jquery-ui/ui/effects/effect-clip.js
ext_sprockets-0.1.5 node_modules/jquery-ui/ui/effects/effect-clip.js
ext_sprockets-0.1.1 node_modules/jquery-ui/ui/effects/effect-clip.js
date_picker-0.0.9 test/dummy/vendor/assets/components/jquery-ui/ui/effects/effect-clip.js