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: position change weird animation #109

Merged
merged 2 commits into from
Oct 9, 2023

Conversation

Manukyanq
Copy link
Contributor

@Manukyanq Manukyanq commented Oct 1, 2023

#106 fix

All changes in storybook are for test and unactual and they have to be removed before merge

@vercel
Copy link

vercel bot commented Oct 1, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-chessboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 2, 2023 4:49pm

// check if piece matches or if removed piece was a pawn and new square is on 1st or 8th rank (promotion)
const newSquare = (
Object.entries(positionDifferences.added) as [Square, Pc][]
).find(
([s, p]) =>
p === removedPiece ||
(removedPiece?.[1] === "P" && (s[1] === "1" || s[1] === "8"))
p === removedPiece || onPromotionCheck(square, s, removedPiece)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before

before.mov

and after

Untitled.mov

@Manukyanq Manukyanq marked this pull request as draft October 4, 2023 12:18
@Manukyanq Manukyanq marked this pull request as ready for review October 8, 2023 21:26
Copy link
Owner

@Clariity Clariity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making this fix, small change but leads to a much nicer experience

@Clariity Clariity merged commit 4cae8af into Clariity:main Oct 9, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants