Skip to content

[Layout View] Improve the sorting algorithm to solve jittering problem #297

wants to merge 5 commits into from

2 participants


Direction is now determined only by the border the mouse is nearer

sbryan commented Sep 14, 2012

With this change, I can no longer move a button to the first position in a horizontal (inline) layout container, such as a footer.

Test case:

  1. Add a footer to a page
  2. Add a button to the footer 3, Rename the button "Button 1" (to help track the buttons) 4, Add a 2nd button to the footer 5, Rename the 2nd button "Button 2" (to help track the buttons) 6, Repeat steps 4 and 5 as many times as you like (2 is enough)
  3. Begin dragging "button 2"
  4. Attempt to place it in front of "Button 1"

I am unable to make this work at all anymore.

Same is true for horizontal button groups

Also, it seems that list items in a list can no longer be sorted either... not sure if it is related, but I can see the behavior difference between the version and master

Please go back and retest more thoroughly and fix or note regressions.


I fixed all the bugs you mentioned. Please review. Thanks!

zhizhangchen added some commits Sep 25, 2012
@zhizhangchen zhizhangchen [Layout View] Fix the problem that horizontal buttons can't be sorted
jQuery UI's floating caculation overlooks the fact that items may
come from other connected containers which may not be horizontal
while this container is horizontal
@zhizhangchen zhizhangchen [Layout View] Exclude currentItem from distance calculation 9261662
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.