From 4cd491ec3ce091cacc3f42a6d898618365891b13 Mon Sep 17 00:00:00 2001 From: Adrien Agez Date: Fri, 4 Dec 2020 19:40:26 +0100 Subject: [PATCH] test screen orientations --- src/components/Battleground.vue | 46 +++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/src/components/Battleground.vue b/src/components/Battleground.vue index 2027e07..7cbe7ba 100644 --- a/src/components/Battleground.vue +++ b/src/components/Battleground.vue @@ -1,16 +1,14 @@ @@ -18,7 +16,7 @@ $border-style: 1px solid $blizzard-font-color .battleground - &-background, &-content + &-background, &-objectives height: 100vh width: 100vw @@ -29,18 +27,18 @@ filter: blur(2px) brightness(70%) z-index: -10 - .objectives - display: flex - flex-direction: column - height: 100% - - &-row + &-objectives display: flex - justify-content: space-between - flex-grow: 1 - &:first-child - border-top: $border-style - border-bottom: $border-style + flex-direction: column + + &-row + display: flex + justify-content: space-between + flex-grow: 1 + &:first-child + border-top: $border-style + border-bottom: $border-style + .objective &:first-child border-left: $border-style @@ -76,6 +74,14 @@ this.battlegroundId = to.params.battlegroundId } }, + mounted: function () { + console.log('Mounted : lock landscape orientation') + screen.orientation.lock('landscape') + }, + destroyed: function () { + console.log('Destroyed : unlock orientation') + screen.orientation.unlock() + }, components: { Timer, Objective