* deploy fix

* style changes
* navigation fix
This commit is contained in:
Danyi Dávid
2018-07-08 17:50:35 +02:00
parent 291ad5047f
commit 04ba910717
6 changed files with 24 additions and 13 deletions

View File

@@ -10,10 +10,22 @@
-webkit-transition: opacity 150ms ease-in;
-moz-transition: opacity 150ms ease-in;
transition: opacity 150ms ease-in;
height: 100%;
width: 100%;
padding: 15px;
overflow: hidden;
}
.modal-padding {
overflow: hidden;
max-height: calc(100% - 30px);
max-width: calc(100% - 30px);
}
.modal-container .image {
display: flex;
margin: auto;
margin-top: 15px;
display: block;
margin-left: auto;
margin-right: auto;
max-height: calc(100% - 30px);
width: auto;
}

View File

@@ -1,3 +1,5 @@
<div class="modal-container" [ngStyle]="modalStyle">
<img *ngIf="hasImage" class="ui centered image" src="{{imageUrl}}">
<div class="modal-padding">
<img *ngIf="hasImage" class="ui centered image" src="{{imageUrl}}">
</div>
</div>

View File

@@ -75,7 +75,7 @@ export class DisplayImageComponent implements OnInit {
private hide() {
this.visible = false;
this.titleService.setTitle(`${this.albumTitle} - photos.yvan.hu`);
this.router.navigate([`${this.albumTitle} - photos.yvan.hu`]);
this.router.navigate([`/album/${this.slug}`]);
}
private nextImage() {
@@ -129,6 +129,7 @@ export class DisplayImageComponent implements OnInit {
let xDiff: number = this.touchX - touchEvent.changedTouches[0].clientX;
let yDiff: number = this.touchY - touchEvent.changedTouches[0].clientY;
// noinspection JSSuspiciousNameCombination
if (Math.abs(xDiff) > Math.abs(yDiff)) {
if (xDiff > 0) {
this.prevImage();