Skip to content
This repository has been archived by the owner on Mar 14, 2020. It is now read-only.

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

zhizhangchen
Copy link
Contributor

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

@sbryan
Copy link
Contributor

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 01.org/rib/online version and master

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

@zhizhangchen
Copy link
Contributor Author

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

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants