From 1c6927f6118d12a06ebea7251b266a923743d580 Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Sun, 30 Apr 2023 03:02:13 +0200 Subject: Fix hand rotation indicator's placement (out of view) --- .../sevenwonders/ui/components/game/HandRotationIndicator.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sw-ui/src') diff --git a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/HandRotationIndicator.kt b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/HandRotationIndicator.kt index 9e6874d3..5d69628c 100644 --- a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/HandRotationIndicator.kt +++ b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/HandRotationIndicator.kt @@ -17,14 +17,17 @@ fun ChildrenBuilder.handRotationIndicator(direction: HandRotationDirection) { display = Display.flex alignItems = AlignItems.center bottom = 25.vh + val sideDistance = 2.rem + when (direction) { + HandRotationDirection.LEFT -> left = sideDistance + HandRotationDirection.RIGHT -> right = sideDistance + } } title = "Your hand will be passed to the player on your $direction after playing this card." - val sideDistance = 2.rem when (direction) { HandRotationDirection.LEFT -> { - css { left = sideDistance } BpIcon { icon = IconNames.ARROW_LEFT size = 25 @@ -32,7 +35,6 @@ fun ChildrenBuilder.handRotationIndicator(direction: HandRotationDirection) { handCardsImg() } HandRotationDirection.RIGHT -> { - css { right = sideDistance } handCardsImg() BpIcon { icon = IconNames.ARROW_RIGHT -- cgit