fix(complement-race): counter-flip AI speech bubbles to make text readable
When AI racers were flipped with scaleX(-1) to face right, their speech bubbles were also flipped, making the text appear mirrored/backwards. Added a wrapper div around SpeechBubble with scaleX(-1) to counter the parent's flip transform, keeping the text readable while the emoji remains flipped. This matches the pattern used in CircularTrack which counter-rotates speech bubbles to keep them upright. LinearTrack.tsx:145-154 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -142,10 +142,16 @@ export function LinearTrack({
|
||||
>
|
||||
{racer.icon}
|
||||
{activeBubble && (
|
||||
<SpeechBubble
|
||||
message={activeBubble}
|
||||
onHide={() => dispatch({ type: 'CLEAR_AI_COMMENT', racerId: racer.id })}
|
||||
/>
|
||||
<div
|
||||
style={{
|
||||
transform: 'scaleX(-1)', // Counter-flip bubble to make text readable
|
||||
}}
|
||||
>
|
||||
<SpeechBubble
|
||||
message={activeBubble}
|
||||
onHide={() => dispatch({ type: 'CLEAR_AI_COMMENT', racerId: racer.id })}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user