Skip to content

Commit

Permalink
Check both directions when sorting.
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethcachia committed Oct 29, 2013
1 parent 2c454ba commit db5a393
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion background-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,12 @@
sorted = true;
}

// Reposition if zIndex is the same but the objects are not
// Reposition if zIndex is the same but the elements are not
// sorted according to their document position
if (a === b && pos === 2) {
reverse = 1;
} else if (a === b && pos === 4) {
reverse = -1;
}

return reverse || a - b;
Expand Down
2 changes: 1 addition & 1 deletion background-check.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/background-check.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit db5a393

Please sign in to comment.