2010-06-06 87 views
4

出于好奇,我无法在任何地方找到任何东西;有没有人知道一种方法来获取jQuery UI的可排序函数来动画化它的排序?jQuery UI可排序的动画转换

我的意思是,当你将一个元素移动到可排序的父对象上时,它的子对象,可排序对象会跳过,而不是顺利地将它们动画到新的位置,除了作为旁观者之外,还可能使它有点难找出在哪里移动了什么。

这显然没有默认选项,但我希望也许某个人在某个地方有一个很好的解决方案。

+0

我要疯了。我正在查看几天前想要的确切插件,现在我一直在寻找并且无法再找到它。它的确定,它真的很好。也许我不会找到它,只是为了告诉你不要放弃它。试着找到:) – XGreen 2010-06-06 12:25:54

回答

1

可悲的是,目前还不可能,因为可排序的代码只是更新元素的位置。虽然它指的是一个this.options.custom,它可能允许自定义动画;虽然它然后完全没有文件/不支持:

if(this.options.custom && this.options.custom.refreshContainers) { 
    this.options.custom.refreshContainers.call(this); 
} else { 
    for (var i = this.containers.length - 1; i >= 0; i--){ 
     var p = this.containers[i].element.offset(); 
     this.containers[i].containerCache.left = p.left; 
     this.containers[i].containerCache.top = p.top; 
     this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); 
     this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); 
    }; 
} 

可悲的是我不能提供更多的帮助;没有太多的自我介绍给可分类代码,所以上面的代码提取可能会引起误解。

+0

这是一个很好的指针。我会看看,看看有什么关系。 – Heilemann 2010-06-07 13:59:31