Skip to content
Permalink
Browse files

draggable: removed helpr animation from connectToSortable in favor of…

… callbacks
  • Loading branch information
Paul Bakaus
Paul Bakaus committed May 25, 2008
1 parent d0d8ee7 commit e7a179ef4243aa48f37fe519885eabf89a89ac25
Showing with 0 additions and 8 deletions.
  1. +0 −8 ui/source/ui.draggable.js
@@ -480,10 +480,6 @@
if(!this.instance.isOver) {
this.instance.isOver = 1;

//Cache the width/height of the new helper
var height = this.instance.options.placeholderElement ? $(this.instance.options.placeholderElement, $(this.instance.options.items, this.instance.element)).innerHeight() : $(this.instance.options.items, this.instance.element).innerHeight();
var width = this.instance.options.placeholderElement ? $(this.instance.options.placeholderElement, $(this.instance.options.items, this.instance.element)).innerWidth() : $(this.instance.options.items, this.instance.element).innerWidth();

//Now we fake the start of dragging for the sortable instance,
//by cloning the list group item, appending it to the sortable and using it as inst.currentItem
//We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
@@ -499,9 +495,6 @@
this.instance.offset.left -= ui.absolutePosition.left - this.instance.position.absolute.left;
this.instance.offset.top -= ui.absolutePosition.top - this.instance.position.absolute.top;

//Do a nifty little helper animation: Animate it to the portlet's size (just takes the first 'li' element in the sortable now)
this.instance.helperProportions = {width: width, height: height}; //We have to reset the helper proportions, because we are doing our animation there
ui.helper.animate({height: height, width: width}, 500);
inst.propagate("toSortable", e);

}
@@ -524,7 +517,6 @@
this.instance.currentItem.remove();
this.instance.placeholder.remove();

ui.helper.animate({ height: self.innerHeight(), width: self.innerWidth() }, 500);
inst.propagate("fromSortable", e);
}

0 comments on commit e7a179e

Please sign in to comment.
You can’t perform that action at this time.