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

Added rotation effect to cards #35

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

utkarsh1236
Copy link

Made changes so that the card appears to flip on clicking.

@dev-lovedeep dev-lovedeep linked an issue Oct 27, 2022 that may be closed by this pull request
Copy link
Contributor

@dev-lovedeep dev-lovedeep left a comment

Choose a reason for hiding this comment

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

currently the flip animation is not proper, search about backface visibility and that will fix the issue

refer to this example : link

@@ -91,6 +91,7 @@ function toggleSound(){

// unset image src when either card flip or show all cards
const unsetImgSource = (card) =>{
flip(card)
card.children[0].src="#"; // Removing image src so that it isn't visible through HTML
card.children[0].alt="card front face"; // Removing image alt so that it isn't visible through HTML
card.children[1].style.display="block";
Copy link
Contributor

Choose a reason for hiding this comment

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

hiding/unhiding the front pattern was temporary till this issue. Now after adding the rotation, there should be no need to hide/unhide it, as it should go backside.

so remove that

@utkarsh1236
Copy link
Author

Thanks for the feedback @dev-lovedeep :-) I'll try fixing the issue.

Copy link
Contributor

@dev-lovedeep dev-lovedeep left a comment

Choose a reason for hiding this comment

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

other things look good, just fix the images

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add rotation effect to the cards
2 participants