summaryrefslogtreecommitdiff
path: root/sw-ui/src/main/kotlin
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@booking.com>2020-08-12 01:48:11 +0200
committerJoffrey Bion <joffrey.bion@booking.com>2020-08-12 01:48:11 +0200
commit1772247bcbeaa936c9a0e08071561863dffd30ac (patch)
tree460a375d6d56aec814f61125fc49a62c2b55ac1a /sw-ui/src/main/kotlin
parentDisplay only victory military points on the board next to victory tokens (diff)
downloadseven-wonders-1772247bcbeaa936c9a0e08071561863dffd30ac.tar.gz
seven-wonders-1772247bcbeaa936c9a0e08071561863dffd30ac.tar.bz2
seven-wonders-1772247bcbeaa936c9a0e08071561863dffd30ac.zip
Cleanup wonder card style
Diffstat (limited to 'sw-ui/src/main/kotlin')
-rw-r--r--sw-ui/src/main/kotlin/org/luxons/sevenwonders/ui/components/game/Board.kt12
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)
bgstack15