diff options
Diffstat (limited to 'sw-ui/src/main/kotlin')
-rw-r--r-- | sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/Board.kt | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/Board.kt b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/Board.kt index 011ce732..419aa71b 100644 --- a/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/Board.kt +++ b/sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/Board.kt @@ -163,15 +163,6 @@ private fun RBuilder.boardToken(tokenName: String, count: Int, block: StyledDOMB } } -private fun CSSBuilder.wonderCardStyle(stageIndex: Int, nbStages: Int) { - position = Position.absolute - top = 60.pct - left = stagePositionPercent(stageIndex, nbStages).pct - maxWidth = 24.pct - maxHeight = 90.pct - zIndex = -1 -} - private fun RBuilder.wonderStageElement(stage: ApiWonderStage, block: StyledDOMBuilder<HTMLTag>.() -> Unit) { val back = stage.cardBack if (back != null) { @@ -185,9 +176,10 @@ private fun RBuilder.wonderStageElement(stage: ApiWonderStage, block: StyledDOMB } } -fun CSSBuilder.wonderCardStyle() { +private fun CSSBuilder.wonderCardStyle(stageIndex: Int, nbStages: Int) { position = Position.absolute top = 60.pct // makes the cards stick out of the bottom of the wonder + left = stagePositionPercent(stageIndex, nbStages).pct maxWidth = 24.pct // ratio of card width to wonder width maxHeight = 90.pct // ratio of card height to wonder height zIndex = -1 // below wonder (somehow 0 is not sufficient) |