public/assets/jquery-ui/sortable-171c104f15c5a6b34119e8f4b44f26483624bf434dc2342433c76671379be3ea.js
File sortable-171c104f15c5a6b34119e8f4b44f26483624bf434dc2342433c76671379be3ea.js
has 1737 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*!
* jQuery UI Core 1.11.4
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
Function _mouseDrag
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseDrag: function(event) {
var i, item, itemElement, intersection,
o = this.options,
scrolled = false;
Function _mouseStart
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseStart: function(event, overrideHandle, noActivation) {
var i, body,
o = this.options;
Function widget
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.widget = function( name, base, prototype ) {
var fullName, existingConstructor, constructor, basePrototype,
// proxiedPrototype allows the provided prototype to remain unmodified
// so that it can be used as a mixin for multiple widgets (#8876)
proxiedPrototype = {},
Function _clear
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_clear: function(event, noPropagation) {
this.reverting = false;
// We delay all events that have to be triggered to after the point where the placeholder has been removed and
// everything else normalized again
Function _contactContainers
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_contactContainers: function(event) {
var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom, floating, axis,
innermostContainer = null,
innermostIndex = null;
Function _generatePosition
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_generatePosition: function(event) {
var top, left,
o = this.options,
pageX = event.pageX,
Function bridge
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.widget.bridge = function( name, object ) {
var fullName = object.prototype.widgetFullName || name;
$.fn[ name ] = function( options ) {
var isMethodCall = typeof options === "string",
args = widget_slice.call( arguments, 1 ),
Function name
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$.fn[ name ] = function( options ) {
var isMethodCall = typeof options === "string",
args = widget_slice.call( arguments, 1 ),
returnValue = this;
Consider simplifying this complex logical expression. Open
Open
if (this.floating && horizontalDirection) {
return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf));
} else {
return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf));
}
Consider simplifying this complex logical expression. Open
Open
if(!(/^(document|window|parent)$/).test(o.containment)) {
ce = $(o.containment)[0];
co = $(o.containment).offset();
over = ($(ce).css("overflow") !== "hidden");
Function _mouseDown
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseDown: function(event) {
// don't let more than one widget handle mouseStart
if ( mouseHandled ) {
return;
}
Function _on
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_on: function( suppressDisabledCheck, element, handlers ) {
var delegateElement,
instance = this;
// no suppressDisabledCheck flag, shuffle arguments
Function _createPlaceholder
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_createPlaceholder: function(that) {
that = that || this;
var className,
o = that.options;
Function cancel
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
cancel: function() {
if(this.dragging) {
this._mouseUp({ target: null });
Function _mouseCapture
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_mouseCapture: function(event, overrideHandle) {
var currentItem = null,
validHandle = false,
that = this;
Function refreshPositions
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
refreshPositions: function(fast) {
// Determine whether items are being displayed horizontally
this.floating = this.items.length ?
this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) :
Function _refreshItems
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_refreshItems: function(event) {
this.items = [];
this.containers = [this];
Function option
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
option: function( key, value ) {
var options = key,
parts,
curOption,
i;
Function _createWidget
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_createWidget: function( options, element ) {
element = $( element || this.defaultElement || this )[ 0 ];
this.element = $( element );
this.uuid = widget_uuid++;
this.eventNamespace = "." + this.widgetName + this.uuid;
Consider simplifying this complex logical expression. Open
Open
if ( this.options.tolerance === "pointer" ||
this.options.forcePointerForContainers ||
(this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"])
) {
return isOverElement;
Avoid too many return
statements within this function. Open
Open
return true;