Fix image scaling in infoscreen

Resolves #32
This commit is contained in:
Juhana
2017-03-01 14:13:20 +02:00
parent 7d863e2104
commit 1f1869796a
2 changed files with 20 additions and 6 deletions
+16 -5
View File
@@ -12,12 +12,23 @@
height:100%; height:100%;
} }
.img-container{
width: 100vw;
height: 100vh;
position: relative;
overflow: hidden;
}
.fit { .fit {
width: auto; position:absolute;
min-height: 100%; top: 50%;
display: block; left: 50%;
margin-left: auto; width: 100%;
margin-right: auto; min-height: 100%;
height: auto;
margin: auto;
-webkit-transform: translate(-50%,-50%);
-ms-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
} }
.swap-animation.ng-enter, .swap-animation.ng-leave { .swap-animation.ng-enter, .swap-animation.ng-leave {
+4 -1
View File
@@ -1 +1,4 @@
<img ng-src="{{ img }}" class="fit"/> <div class="img-container">
<img ng-src="{{ img }}" class="fit"/>
</div>