Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>

This commit is contained in:
Matt Bruce 2025-12-24 14:53:28 -06:00
parent c358d3b2ae
commit 582ed3237d
2 changed files with 18 additions and 0 deletions

View File

@ -61,6 +61,14 @@ struct DealerHandView: View {
} }
} }
.zIndex(Double(index)) .zIndex(Double(index))
.transition(
.asymmetric(
insertion: .move(edge: .top)
.combined(with: .opacity)
.combined(with: .scale(scale: Design.Scale.slightShrink)),
removal: .scale.combined(with: .opacity)
)
)
} }
// Show placeholder for second card in European mode (no hole card) // Show placeholder for second card in European mode (no hole card)
@ -70,6 +78,7 @@ struct DealerHandView: View {
} }
} }
} }
.animation(.spring(duration: Design.Animation.springDuration, bounce: Design.Animation.springBounce), value: hand.cards.count)
.overlay(alignment: .bottom) { .overlay(alignment: .bottom) {
// Result badge - overlayed so it doesn't add height to the view // Result badge - overlayed so it doesn't add height to the view
if let result = hand.cards.count >= 2 && showHoleCard ? handResultText : nil { if let result = hand.cards.count >= 2 && showHoleCard ? handResultText : nil {

View File

@ -131,9 +131,18 @@ struct PlayerHandView: View {
} }
} }
.zIndex(Double(index)) .zIndex(Double(index))
.transition(
.asymmetric(
insertion: .move(edge: .top)
.combined(with: .opacity)
.combined(with: .scale(scale: Design.Scale.slightShrink)),
removal: .scale.combined(with: .opacity)
)
)
} }
} }
} }
.animation(.spring(duration: Design.Animation.springDuration, bounce: Design.Animation.springBounce), value: hand.cards.count)
.padding(.horizontal, Design.Spacing.medium) .padding(.horizontal, Design.Spacing.medium)
.padding(.vertical, Design.Spacing.medium) .padding(.vertical, Design.Spacing.medium)
.background( .background(