Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 107 additions & 6 deletions css/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/style.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 29 additions & 4 deletions css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -778,8 +778,6 @@ h4 {
display: none;
}
.map {


width: 100%;
height: 100%;
transform: translate(-50%, -50%);
Expand Down Expand Up @@ -833,12 +831,39 @@ h4 {
}
}


@for $i from 1 through 6 {
img[data-rotate="#{$i}"] {
transform: translate(-50%, -50%) rotate(#{$i * 60}deg);
&[data-rotate="#{$i}"] {
transform: rotate(#{$i * 60}deg);

img {
transform: translate(-50%, -50%) rotate(#{$i * -60}deg)
}
span {
transform: translate(-50%, -50%) rotate(#{$i * -60}deg) scale(0.3, 0.3);
}
}
&[data-rotate="-#{$i}"] {
transform: rotate(#{$i * -60}deg);

img {
transform: translate(-50%, -50%) rotate(#{$i * 60}deg)
}
span {
transform: translate(-50%, -50%) rotate(#{$i * 60}deg) scale(0.3, 0.3);
}
}
}
}
.rotate-map {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.rotate-map button {
font-size: 30px;
padding: 0.1em 0.3em 0.3em;
}
#log p {
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
padding-bottom: 1em;
Expand Down
4 changes: 2 additions & 2 deletions data/tile-selection.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"BaseGame": {
"high": [28, 29, 30, 32, 33, 35, 36, 38],
"mid": [26, 27, 31, 34, 37, 24],
"low": [19, 20, 21, 22, 23, 25]
"mid": [26, 27, 31, 34, 37],
"low": [19, 20, 21, 22, 23, 24, 25]
},
"PoK": {
"high": [69, 70, 71, 75 ],
Expand Down
13 changes: 13 additions & 0 deletions js/draft.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ $(document).ready(function () {
}
});

$('.rotate-map-left').on('click', function (e) {
rotateMap(-1);
})
$('.rotate-map-right').on('click', function (e) {
rotateMap(1);
})

$('.close-popup').on('click', function(e) {
$(this).parents('.popup').removeClass('open');
Expand Down Expand Up @@ -581,3 +587,10 @@ function getPlayerInPosition(position) {
}
return null;
}


let mapRotation = 0;
function rotateMap(direction) {
mapRotation = (mapRotation + direction) % 6;
$('#mapview-hyperlane .map').attr('data-rotate', mapRotation);
}
4 changes: 4 additions & 0 deletions templates/draft.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@

<div class="mapview current" id="mapview-hyperlane">
<h3 class="map-layout-title">Hyperlane Map</h3>
<div class="rotate-map">
<button title="Rotate counter-clockwise" class="rotate-map-left">⟲</button>
<button title="Rotate clockwise" class="rotate-map-right">⟳</button>
</div>
<div class="map-container">
<div class="map-offset">
<div id="map-wrap" class="map">
Expand Down