mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
#885 fix other thumbnail
This commit is contained in:
@@ -12,6 +12,7 @@ import { NgxGalleryAnimation } from '@kolkov/ngx-gallery';
|
|||||||
})
|
})
|
||||||
export class MediaViewerImageComponent implements OnInit {
|
export class MediaViewerImageComponent implements OnInit {
|
||||||
@Input() images: MediaViewerItem[];
|
@Input() images: MediaViewerItem[];
|
||||||
|
@Input() image: string;
|
||||||
|
|
||||||
galleryOptions: NgxGalleryOptions[];
|
galleryOptions: NgxGalleryOptions[];
|
||||||
galleryImages: NgxGalleryImage[];
|
galleryImages: NgxGalleryImage[];
|
||||||
@@ -32,7 +33,18 @@ export class MediaViewerImageComponent implements OnInit {
|
|||||||
imageAnimation: NgxGalleryAnimation.Slide,
|
imageAnimation: NgxGalleryAnimation.Slide,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
this.galleryImages = this.convertToGalleryImage(this.images);
|
|
||||||
|
if (this.image) {
|
||||||
|
this.galleryImages = [
|
||||||
|
{
|
||||||
|
small: this.image,
|
||||||
|
medium: this.image,
|
||||||
|
big: this.image,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
this.galleryImages = this.convertToGalleryImage(this.images);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
mediaList[0]?.format !== 'audio'
|
mediaList[0]?.format !== 'audio'
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<img [src]="mediaList[0]?.thumbnail || thumbnailPlaceholder" alt="" />
|
<ds-media-viewer-image [image]="mediaList[0]?.thumbnail || thumbnailPlaceholder"></ds-media-viewer-image>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
@@ -1,8 +1 @@
|
|||||||
.media-viewer{
|
|
||||||
width: 340px;
|
|
||||||
height: 279px;
|
|
||||||
img{
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user