wp/wp-includes/js/jquery/ui/selectable.js
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
equal deleted inserted replaced
20:7b1b88e27a20 21:48c4eec2b7e6
     1 /*!
     1 /*!
     2  * jQuery UI Selectable 1.13.1
     2  * jQuery UI Selectable 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: Selectable
    10 //>>label: Selectable
    11 //>>group: Interactions
    11 //>>group: Interactions
    12 //>>description: Allows groups of elements to be selected with the mouse.
    12 //>>description: Allows groups of elements to be selected with the mouse.
    13 //>>docs: http://api.jqueryui.com/selectable/
    13 //>>docs: https://api.jqueryui.com/selectable/
    14 //>>demos: http://jqueryui.com/selectable/
    14 //>>demos: https://jqueryui.com/selectable/
    15 //>>css.structure: ../../themes/base/selectable.css
    15 //>>css.structure: ../../themes/base/selectable.css
    16 
    16 
    17 ( function( factory ) {
    17 ( function( factory ) {
    18 	"use strict";
    18 	"use strict";
    19 
    19 
    21 
    21 
    22 		// AMD. Register as an anonymous module.
    22 		// AMD. Register as an anonymous module.
    23 		define( [
    23 		define( [
    24 			"jquery",
    24 			"jquery",
    25 			"./mouse",
    25 			"./mouse",
    26 			"./core"
    26 			"../version",
       
    27 			"../widget"
    27 		], factory );
    28 		], factory );
    28 	} else {
    29 	} else {
    29 
    30 
    30 		// Browser globals
    31 		// Browser globals
    31 		factory( jQuery );
    32 		factory( jQuery );
    32 	}
    33 	}
    33 } )( function( $ ) {
    34 } )( function( $ ) {
    34 "use strict";
    35 "use strict";
    35 
    36 
    36 return $.widget( "ui.selectable", $.ui.mouse, {
    37 return $.widget( "ui.selectable", $.ui.mouse, {
    37 	version: "1.13.1",
    38 	version: "1.13.3",
    38 	options: {
    39 	options: {
    39 		appendTo: "body",
    40 		appendTo: "body",
    40 		autoRefresh: true,
    41 		autoRefresh: true,
    41 		distance: 0,
    42 		distance: 0,
    42 		filter: "*",
    43 		filter: "*",
   208 			offset.top    = selectee.top    + that.elementPos.top;
   209 			offset.top    = selectee.top    + that.elementPos.top;
   209 			offset.bottom = selectee.bottom + that.elementPos.top;
   210 			offset.bottom = selectee.bottom + that.elementPos.top;
   210 
   211 
   211 			if ( options.tolerance === "touch" ) {
   212 			if ( options.tolerance === "touch" ) {
   212 				hit = ( !( offset.left > x2 || offset.right < x1 || offset.top > y2 ||
   213 				hit = ( !( offset.left > x2 || offset.right < x1 || offset.top > y2 ||
   213 					offset.bottom < y1 ) );
   214                     offset.bottom < y1 ) );
   214 			} else if ( options.tolerance === "fit" ) {
   215 			} else if ( options.tolerance === "fit" ) {
   215 				hit = ( offset.left > x1 && offset.right < x2 && offset.top > y1 &&
   216 				hit = ( offset.left > x1 && offset.right < x2 && offset.top > y1 &&
   216 					offset.bottom < y2 );
   217                     offset.bottom < y2 );
   217 			}
   218 			}
   218 
   219 
   219 			if ( hit ) {
   220 			if ( hit ) {
   220 
   221 
   221 				// SELECT
   222 				// SELECT