Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): fix set z index error when selected indices not continuous… #827

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/mean-fireants-prove.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@plait/core': patch
---

fix set z index error when selected indices not continuous
2 changes: 1 addition & 1 deletion .changeset/nine-mugs-guess.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@plait/common': patch
---

get selectedGroups from board.childen when remove
get selectedGroups from board.children when remove
2 changes: 1 addition & 1 deletion packages/core/src/utils/z-index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const getAllMoveOptions = (board: PlaitBoard, direction: 'down' | 'up'):
const indicesToMove = getIndicesToMove(board);
let groupedIndices = toContiguousGroups(board, indicesToMove);
let moveContents: MoveNodeOption[] = [];
if (direction === 'up') {
if (direction === 'down') {
groupedIndices = groupedIndices.reverse();
}
groupedIndices.forEach(indices => {
Expand Down