diff --git a/source/js/jquery-sortable-min.js b/source/js/jquery-sortable-min.js index 3d2977a..ff4dc71 100644 --- a/source/js/jquery-sortable-min.js +++ b/source/js/jquery-sortable-min.js @@ -1,19 +1 @@ -!function(d,y,k,j){function s(a,b){var c=Math.max(0,a[0]-b[0],b[0]-a[1]),e=Math.max(0,a[2]-b[1],b[1]-a[3]);return c+e}function t(a,b,c,e){for(var h=a.length,e=e?"offset":"position",c=c||0;h--;){var f=a[h].el?a[h].el:d(a[h]),i=f[e]();i.left+=parseInt(f.css("margin-left"),10);i.top+=parseInt(f.css("margin-top"),10);b[h]=[i.left-c,i.left+f.outerWidth()+c,i.top-c,i.top+f.outerHeight()+c]}}function m(a,b){var c=b.offset();return{left:a.left-c.left,top:a.top-c.top}}function u(a,b,c){for(var b=[b.left,b.top], -c=c&&[c.left,c.top],e,h=a.length,d=[];h--;)e=a[h],d[h]=[h,s(e,b),c&&s(e,c)];return d=d.sort(function(a,b){return b[1]-a[1]||b[2]-a[2]||b[0]-a[0]})}function n(a){this.options=d.extend({},l,a);this.containers=[];this.options.rootGroup||(this.scrollProxy=d.proxy(this.scroll,this),this.dragProxy=d.proxy(this.drag,this),this.dropProxy=d.proxy(this.drop,this),this.placeholder=d(this.options.placeholder),a.isValidTarget||(this.options.isValidTarget=j))}function q(a,b){this.el=a;this.options=d.extend({}, -w,b);this.group=n.get(this.options);this.rootGroup=this.options.rootGroup||this.group;this.handle=this.rootGroup.options.handle||this.rootGroup.options.itemSelector;var c=this.rootGroup.options.itemPath;this.target=c?this.el.find(c):this.el;this.target.on(o.start,this.handle,d.proxy(this.dragInit,this));this.options.drop&&this.group.containers.push(this)}var o,w={drag:!0,drop:!0,exclude:"",nested:!0,vertical:!0},l={afterMove:function(){},containerPath:"",containerSelector:"ol, ul",distance:0,delay:0, -handle:"",itemPath:"",itemSelector:"li",isValidTarget:function(){return!0},onCancel:function(){},onDrag:function(a,b){a.css(b)},onDragStart:function(a){a.css({height:a.height(),width:a.width()});a.addClass("dragged");d("body").addClass("dragging")},onDrop:function(a){a.removeClass("dragged").removeAttr("style");d("body").removeClass("dragging")},onMousedown:function(a,b,c){if(!c.target.nodeName.match(/^(input|select)$/i))return c.preventDefault(),!0},placeholder:'
  • ',pullPlaceholder:!0, -serialize:function(a,b,c){a=d.extend({},a.data());if(c)return[b];b[0]&&(a.children=b);delete a.subContainers;delete a.sortable;return a},tolerance:0},p={},v=0,x={left:0,top:0,bottom:0,right:0};o={start:"touchstart.sortable mousedown.sortable",drop:"touchend.sortable touchcancel.sortable mouseup.sortable",drag:"touchmove.sortable mousemove.sortable",scroll:"scroll.sortable"};n.get=function(a){p[a.group]||(a.group===j&&(a.group=v++),p[a.group]=new n(a));return p[a.group]};n.prototype={dragInit:function(a, -b){this.$document=d(b.el[0].ownerDocument);this.item=d(a.target).closest(this.options.itemSelector);this.itemContainer=b;!this.item.is(this.options.exclude)&&this.options.onMousedown(this.item,l.onMousedown,a)&&(this.setPointer(a),this.toggleListeners("on"),this.setupDelayTimer(),this.dragInitDone=!0)},drag:function(a){if(!this.dragging){if(!this.distanceMet(a)||!this.delayMet)return;this.options.onDragStart(this.item,this.itemContainer,l.onDragStart,a);this.item.before(this.placeholder);this.dragging= -!0}this.setPointer(a);this.options.onDrag(this.item,m(this.pointer,this.item.offsetParent()),l.onDrag,a);var b=a.pageX||a.originalEvent.pageX,a=a.pageY||a.originalEvent.pageY,c=this.sameResultBox,e=this.options.tolerance;if(!c||c.top-e>a||c.bottom+eb||c.right+e=this.options.distance},getPointer:function(a){return{left:a.pageX||a.originalEvent.pageX,top:a.pageY||a.originalEvent.pageY}},setupDelayTimer:function(){var a=this;this.delayMet=!this.options.delay;this.delayMet||(clearTimeout(this._mouseDelayTimer),this._mouseDelayTimer=setTimeout(function(){a.delayMet= -!0},this.options.delay))},scroll:function(){this.clearDimensions();this.clearOffsetParent()},toggleListeners:function(a){var b=this;d.each(["drag","drop","scroll"],function(c,e){b.$document[a](o[e],b[e+"Proxy"])})},clearOffsetParent:function(){this.offsetParent=j},clearDimensions:function(){this.traverse(function(a){a._clearDimensions()})},traverse:function(a){a(this);for(var b=this.containers.length;b--;)this.containers[b].traverse(a)},_clearDimensions:function(){this.containerDimensions=j},_destroy:function(){p[this.options.group]= -j}};q.prototype={dragInit:function(a){var b=this.rootGroup;!this.disabled&&!b.dragInitDone&&this.options.drag&&this.isValidDrag(a)&&b.dragInit(a,this)},isValidDrag:function(a){return 1==a.which||"touchstart"==a.type&&1==a.originalEvent.touches.length},searchValidTarget:function(a,b){var c=u(this.getItemDimensions(),a,b),e=c.length,d=this.rootGroup,f=!d.options.isValidTarget||d.options.isValidTarget(d.item,this);if(!e&&f)return d.movePlaceholder(this,this.target,"append"),!0;for(;e--;)if(d=c[e][0], -!c[e][1]&&this.hasChildGroup(d)){if(this.getContainerGroup(d).searchValidTarget(a,b))return!0}else if(f)return this.movePlaceholder(d,a),!0},movePlaceholder:function(a,b){var c=d(this.items[a]),e=this.itemDimensions[a],h="after",f=c.outerWidth(),i=c.outerHeight(),g=c.offset(),g={left:g.left,right:g.left+f,top:g.top,bottom:g.top+i};this.options.vertical?b.top<=(e[2]+e[3])/2?(h="before",g.bottom-=i/2):g.top+=i/2:b.left<=(e[0]+e[1])/2?(h="before",g.right-=f/2):g.left+=f/2;this.hasChildGroup(a)&&(g=x); -this.rootGroup.movePlaceholder(this,c,h,g)},getItemDimensions:function(){this.itemDimensions||(this.items=this.$getChildren(this.el,"item").filter(":not(.placeholder, .dragged)").get(),t(this.items,this.itemDimensions=[],this.options.tolerance));return this.itemDimensions},getItemOffsetParent:function(){var a=this.el;return"relative"===a.css("position")||"absolute"===a.css("position")||"fixed"===a.css("position")?a:a.offsetParent()},hasChildGroup:function(a){return this.options.nested&&this.getContainerGroup(a)}, -getContainerGroup:function(a){var b=d.data(this.items[a],"subContainers");if(b===j){var c=this.$getChildren(this.items[a],"container"),b=!1;c[0]&&(b=d.extend({},this.options,{rootGroup:this.rootGroup,group:v++}),b=c[k](b).data(k).group);d.data(this.items[a],"subContainers",b)}return b},$getChildren:function(a,b){var c=this.rootGroup.options,e=c[b+"Path"],c=c[b+"Selector"],a=d(a);e&&(a=a.find(e));return a.children(c)},_serialize:function(a,b){var c=this,e=this.$getChildren(a,b?"item":"container").not(this.options.exclude).map(function(){return c._serialize(d(this), -!b)}).get();return this.rootGroup.options.serialize(a,e,b)},traverse:function(a){d.each(this.items||[],function(){var b=d.data(this,"subContainers");b&&b.traverse(a)});a(this)},_clearDimensions:function(){this.itemDimensions=j},_destroy:function(){var a=this;this.target.off(o.start,this.handle);this.el.removeData(k);this.options.drop&&(this.group.containers=d.grep(this.group.containers,function(b){return b!=a}));d.each(this.items||[],function(){d.removeData(this,"subContainers")})}};var r={enable:function(){this.traverse(function(a){a.disabled= -!1})},disable:function(){this.traverse(function(a){a.disabled=!0})},serialize:function(){return this._serialize(this.el,!0)},refresh:function(){this.traverse(function(a){a._clearDimensions()})},destroy:function(){this.traverse(function(a){a._destroy()})}};d.extend(q.prototype,r);d.fn[k]=function(a){var b=Array.prototype.slice.call(arguments,1);return this.map(function(){var c=d(this),e=c.data(k);if(e&&r[a])return r[a].apply(e,b)||this;!e&&(a===j||"object"===typeof a)&&c.data(k,new q(c,a));return this})}}(jQuery, -window,"sortable"); +!function(a,b,c,d){function l(a,b){var c=Math.max(0,a[0]-b[0],b[0]-a[1]),d=Math.max(0,a[2]-b[1],b[1]-a[3]);return c+d}function m(b,c,d,e){var f=b.length,g=e?"offset":"position";for(d=d||0;f--;){var h=b[f].el?b[f].el:a(b[f]),i=h[g]();i.left+=parseInt(h.css("margin-left"),10),i.top+=parseInt(h.css("margin-top"),10),c[f]=[i.left-d,i.left+h.outerWidth()+d,i.top-d,i.top+h.outerHeight()+d]}}function n(a,b){var c=b.offset();return{left:a.left-c.left,top:a.top-c.top}}function o(a,b,c){b=[b.left,b.top],c=c&&[c.left,c.top];for(var d,e=a.length,f=[];e--;)d=a[e],f[e]=[e,l(d,b),c&&l(d,c)];return f=f.sort(function(a,b){return b[1]-a[1]||b[2]-a[2]||b[0]-a[0]})}function p(b){this.options=a.extend({},f,b),this.containers=[],this.options.rootGroup||(this.scrollProxy=a.proxy(this.scroll,this),this.dragProxy=a.proxy(this.drag,this),this.dropProxy=a.proxy(this.drop,this),this.placeholder=a(this.options.placeholder),b.isValidTarget||(this.options.isValidTarget=d))}function q(b,c){this.el=b,this.options=a.extend({},e,c),this.group=p.get(this.options),this.rootGroup=this.options.rootGroup||this.group,this.handle=this.rootGroup.options.handle||this.rootGroup.options.itemSelector;var d=this.rootGroup.options.itemPath;this.target=d?this.el.find(d):this.el,this.target.on(j.start,this.handle,a.proxy(this.dragInit,this)),this.options.drop&&this.group.containers.push(this)}var e={drag:!0,drop:!0,exclude:"",nested:!0,vertical:!0},f={afterMove:function(a,b,c){},containerPath:"",containerSelector:"ol, ul",distance:0,delay:0,handle:"",itemPath:"",itemSelector:"li",bodyClass:"dragging",draggedClass:"dragged",isValidTarget:function(a,b){return!0},onCancel:function(a,b,c,d){},onDrag:function(a,b,c,d){a.css(b)},onDragStart:function(b,c,d,e){b.css({height:b.outerHeight(),width:b.outerWidth()}),b.addClass(c.group.options.draggedClass),a("body").addClass(c.group.options.bodyClass)},onDrop:function(b,c,d,e){b.removeClass(c.group.options.draggedClass).removeAttr("style"),a("body").removeClass(c.group.options.bodyClass)},onMousedown:function(a,b,c){return c.target.nodeName.match(/^(input|select|textarea)$/i)?void 0:(c.preventDefault(),!0)},placeholderClass:"placeholder",placeholder:'
  • ',pullPlaceholder:!0,serialize:function(b,c,d){var e=a.extend({},b.data());return d?[c]:(c[0]&&(e.children=c),delete e.subContainers,delete e.sortable,e)},tolerance:0},g={},h=0,i={left:0,top:0,bottom:0,right:0},j={start:"touchstart.sortable mousedown.sortable",drop:"touchend.sortable touchcancel.sortable mouseup.sortable",drag:"touchmove.sortable mousemove.sortable",scroll:"scroll.sortable"},k="subContainers";p.get=function(a){return g[a.group]||(a.group===d&&(a.group=h++),g[a.group]=new p(a)),g[a.group]},p.prototype={dragInit:function(b,c){this.$document=a(c.el[0].ownerDocument);var d=a(b.target).closest(this.options.itemSelector);if(d.length){if(this.item=d,this.itemContainer=c,this.item.is(this.options.exclude)||!this.options.onMousedown(this.item,f.onMousedown,b))return;this.setPointer(b),this.toggleListeners("on"),this.setupDelayTimer(),this.dragInitDone=!0}},drag:function(a){if(!this.dragging){if(!this.distanceMet(a)||!this.delayMet)return;this.options.onDragStart(this.item,this.itemContainer,f.onDragStart,a),this.item.before(this.placeholder),this.dragging=!0}this.setPointer(a),this.options.onDrag(this.item,n(this.pointer,this.item.offsetParent()),f.onDrag,a);var b=this.getPointer(a),c=this.sameResultBox,e=this.options.tolerance;(!c||c.top-e>b.top||c.bottom+eb.left||c.right+e=this.options.distance},getPointer:function(a){var b=a.originalEvent||a.originalEvent.touches&&a.originalEvent.touches[0];return{left:a.pageX||b.pageX,top:a.pageY||b.pageY}},setupDelayTimer:function(){var a=this;this.delayMet=!this.options.delay,this.delayMet||(clearTimeout(this._mouseDelayTimer),this._mouseDelayTimer=setTimeout(function(){a.delayMet=!0},this.options.delay))},scroll:function(a){this.clearDimensions(),this.clearOffsetParent()},toggleListeners:function(b){var c=this,d=["drag","drop","scroll"];a.each(d,function(a,d){c.$document[b](j[d],c[d+"Proxy"])})},clearOffsetParent:function(){this.offsetParent=d},clearDimensions:function(){this.traverse(function(a){a._clearDimensions()})},traverse:function(a){a(this);for(var b=this.containers.length;b--;)this.containers[b].traverse(a)},_clearDimensions:function(){this.containerDimensions=d},_destroy:function(){g[this.options.group]=d}},q.prototype={dragInit:function(a){var b=this.rootGroup;!this.disabled&&!b.dragInitDone&&this.options.drag&&this.isValidDrag(a)&&b.dragInit(a,this)},isValidDrag:function(a){return 1==a.which||"touchstart"==a.type&&1==a.originalEvent.touches.length},searchValidTarget:function(a,b){var c=o(this.getItemDimensions(),a,b),d=c.length,e=this.rootGroup,f=!e.options.isValidTarget||e.options.isValidTarget(e.item,this);if(!d&&f)return e.movePlaceholder(this,this.target,"append"),!0;for(;d--;){var g=c[d][0],h=c[d][1];if(!h&&this.hasChildGroup(g)){var i=this.getContainerGroup(g).searchValidTarget(a,b);if(i)return!0}else if(f)return this.movePlaceholder(g,a),!0}},movePlaceholder:function(b,c){var d=a(this.items[b]),e=this.itemDimensions[b],f="after",g=d.outerWidth(),h=d.outerHeight(),j=d.offset(),k={left:j.left,right:j.left+g,top:j.top,bottom:j.top+h};if(this.options.vertical){var l=(e[2]+e[3])/2,m=c.top<=l;m?(f="before",k.bottom-=h/2):k.top+=h/2}else{var n=(e[0]+e[1])/2,o=c.left<=n;o?(f="before",k.right-=g/2):k.left+=g/2}this.hasChildGroup(b)&&(k=i),this.rootGroup.movePlaceholder(this,d,f,k)},getItemDimensions:function(){return this.itemDimensions||(this.items=this.$getChildren(this.el,"item").filter(":not(."+this.group.options.placeholderClass+", ."+this.group.options.draggedClass+")").get(),m(this.items,this.itemDimensions=[],this.options.tolerance)),this.itemDimensions},getItemOffsetParent:function(){var a,b=this.el;return a="relative"===b.css("position")||"absolute"===b.css("position")||"fixed"===b.css("position")?b:b.offsetParent()},hasChildGroup:function(a){return this.options.nested&&this.getContainerGroup(a)},getContainerGroup:function(b){var e=a.data(this.items[b],k);if(e===d){var f=this.$getChildren(this.items[b],"container");if(e=!1,f[0]){var g=a.extend({},this.options,{rootGroup:this.rootGroup,group:h++});e=f[c](g).data(c).group}a.data(this.items[b],k,e)}return e},$getChildren:function(b,c){var d=this.rootGroup.options,e=d[c+"Path"],f=d[c+"Selector"];return b=a(b),e&&(b=b.find(e)),b.children(f)},_serialize:function(b,c){var d=this,e=c?"item":"container",f=this.$getChildren(b,e).not(this.options.exclude).map(function(){return d._serialize(a(this),!c)}).get();return this.rootGroup.options.serialize(b,f,c)},traverse:function(b){a.each(this.items||[],function(c){var d=a.data(this,k);d&&d.traverse(b)}),b(this)},_clearDimensions:function(){this.itemDimensions=d},_destroy:function(){var b=this;this.target.off(j.start,this.handle),this.el.removeData(c),this.options.drop&&(this.group.containers=a.grep(this.group.containers,function(a){return a!=b})),a.each(this.items||[],function(){a.removeData(this,k)})}};var r={enable:function(){this.traverse(function(a){a.disabled=!1})},disable:function(){this.traverse(function(a){a.disabled=!0})},serialize:function(){return this._serialize(this.el,!0)},refresh:function(){this.traverse(function(a){a._clearDimensions()})},destroy:function(){this.traverse(function(a){a._destroy()})}};a.extend(q.prototype,r),a.fn[c]=function(b){var e=Array.prototype.slice.call(arguments,1);return this.map(function(){var f=a(this),g=f.data(c);return g&&r[b]?r[b].apply(g,e)||this:(g||b!==d&&"object"!=typeof b||f.data(c,new q(f,b)),this)})}}(jQuery,window,"sortable"); \ No newline at end of file diff --git a/source/js/jquery-sortable.js b/source/js/jquery-sortable.js index 5fcccf3..37194a4 100644 --- a/source/js/jquery-sortable.js +++ b/source/js/jquery-sortable.js @@ -1,5 +1,5 @@ /* =================================================== - * jquery-sortable.js v0.9.12 + * jquery-sortable.js v0.9.13 * http://johnny.github.com/jquery-sortable/ * =================================================== * Copyright (c) 2012 Jonas von Andrian @@ -27,9 +27,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * ========================================================== */ + !function ( $, window, pluginName, undefined){ - var eventNames, - containerDefaults = { + var containerDefaults = { // If true, items can be dragged from this container drag: true, // If true, items can be droped onto this container @@ -37,7 +37,9 @@ // Exclude items from being draggable, if the // selector matches the item exclude: "", - // If true, search for nested containers within an item + // If true, search for nested containers within an item.If you nest containers, + // either the original selector with which you call the plugin must only match the top containers, + // or you need to specify a group (see the bootstrap nav example) nested: true, // If true, the items are assumed to be arranged vertically vertical: true @@ -60,10 +62,16 @@ delay: 0, // The css selector of the drag handle handle: "", - // The exact css path between the item and its subcontainers + // The exact css path between the item and its subcontainers. + // It should only match the immediate items of a container. + // No item of a subcontainer should be matched. E.g. for ol>div>li the itemPath is "> div" itemPath: "", // The css selector of the items itemSelector: "li", + // The class given to "body" while an item is being dragged + bodyClass: "dragging", + // The class giving to an item while being dragged + draggedClass: "dragged", // Check if the dragged item may be inside the container. // Use with care, since the search for a valid container entails a depth first search // and may be quite expensive. @@ -80,35 +88,37 @@ $item.css(position) }, // Called after the drag has been started, - // that is the mouse button is beeing held down and + // that is the mouse button is being held down and // the mouse is moving. // The container is the closest initialized container. // Therefore it might not be the container, that actually contains the item. onDragStart: function ($item, container, _super, event) { $item.css({ - height: $item.height(), - width: $item.width() + height: $item.outerHeight(), + width: $item.outerWidth() }) - $item.addClass("dragged") - $("body").addClass("dragging") + $item.addClass(container.group.options.draggedClass) + $("body").addClass(container.group.options.bodyClass) }, - // Called when the mouse button is beeing released + // Called when the mouse button is being released onDrop: function ($item, container, _super, event) { - $item.removeClass("dragged").removeAttr("style") - $("body").removeClass("dragging") + $item.removeClass(container.group.options.draggedClass).removeAttr("style") + $("body").removeClass(container.group.options.bodyClass) }, // Called on mousedown. If falsy value is returned, the dragging will not start. - // If clicked on input element, ignore + // Ignore if element clicked is input, select or textarea onMousedown: function ($item, _super, event) { - if (!event.target.nodeName.match(/^(input|select)$/i)) { + if (!event.target.nodeName.match(/^(input|select|textarea)$/i)) { event.preventDefault() return true } }, + // The class of the placeholder (must match placeholder option markup) + placeholderClass: "placeholder", // Template for the placeholder. Can be any valid jQuery input // e.g. a string, a DOM element. // The placeholder must have the class "placeholder" - placeholder: '
  • ', + placeholder: '
  • ', // If true, the position of the placeholder is calculated on every mousemove. // If false, it is only calculated when the mouse is above a container. pullPlaceholder: true, @@ -237,19 +247,20 @@ this.$document = $(itemContainer.el[0].ownerDocument) // get item to drag - this.item = $(e.target).closest(this.options.itemSelector) - this.itemContainer = itemContainer - - if(this.item.is(this.options.exclude) || - !this.options.onMousedown(this.item, groupDefaults.onMousedown, e)){ - return + var closestItem = $(e.target).closest(this.options.itemSelector); + // using the length of this item, prevents the plugin from being started if there is no handle being clicked on. + // this may also be helpful in instantiating multidrag. + if (closestItem.length) { + this.item = closestItem; + this.itemContainer = itemContainer; + if (this.item.is(this.options.exclude) || !this.options.onMousedown(this.item, groupDefaults.onMousedown, e)) { + return; + } + this.setPointer(e); + this.toggleListeners('on'); + this.setupDelayTimer(); + this.dragInitDone = true; } - - this.setPointer(e) - this.toggleListeners('on') - - this.setupDelayTimer() - this.dragInitDone = true }, drag: function (e) { if(!this.dragging){ @@ -268,14 +279,15 @@ groupDefaults.onDrag, e) - var x = e.pageX || e.originalEvent.pageX, - y = e.pageY || e.originalEvent.pageY, + var p = this.getPointer(e), box = this.sameResultBox, t = this.options.tolerance - if(!box || box.top - t > y || box.bottom + t < y || box.left - t > x || box.right + t < x) - if(!this.searchValidTarget()) + if(!box || box.top - t > p.top || box.bottom + t < p.top || box.left - t > p.left || box.right + t < p.left) + if(!this.searchValidTarget()){ this.placeholder.detach() + this.lastAppendedItem = undefined + } }, drop: function (e) { this.toggleListeners('off') @@ -284,12 +296,12 @@ if(this.dragging){ // processing Drop, check if placeholder is detached - if(this.placeholder.closest("html")[0]) + if(this.placeholder.closest("html")[0]){ this.placeholder.before(this.item).detach() - else + } else { this.options.onCancel(this.item, this.itemContainer, groupDefaults.onCancel, e) - - this.options.onDrop(this.item, this.getContainer(this.item), groupDefaults.onDrop, e) + } + this.options.onDrop(this.item, this.getContainer(this.item), groupDefaults.onDrop, e, this) // cleanup this.clearDimensions() @@ -345,7 +357,17 @@ return this.containerDimensions }, getContainer: function (element) { - return element.closest(this.options.containerSelector).data(pluginName) + // get the real container of this item + var container = '', + parent = element; + while(!container.length && !parent.is('body')){ + parent = parent.parent(); + if(typeof parent.data(pluginName) != 'undefined'){ + container = parent.data(pluginName); + } + } + console.log(container); + return container }, $getOffsetParent: function () { if(this.offsetParent === undefined){ @@ -389,9 +411,10 @@ ) >= this.options.distance) }, getPointer: function(e) { + var o = e.originalEvent || e.originalEvent.touches && e.originalEvent.touches[0] return { - left: e.pageX || e.originalEvent.pageX, - top: e.pageY || e.originalEvent.pageY + left: e.pageX || o.pageX, + top: e.pageY || o.pageY } }, setupDelayTimer: function () { @@ -537,7 +560,9 @@ }, getItemDimensions: function () { if(!this.itemDimensions){ - this.items = this.$getChildren(this.el, "item").filter(":not(.placeholder, .dragged)").get() + this.items = this.$getChildren(this.el, "item").filter( + ":not(." + this.group.options.placeholderClass + ", ." + this.group.options.draggedClass + ")" + ).get() setDimensions(this.items, this.itemDimensions = [], this.options.tolerance) } return this.itemDimensions