File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
plugins/archive/app/view/views Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import { Material } from '../../../../directives/material';
1818 [hidden]="object.container_guid == object.owner_guid || !object.album_children_guids || object.album_children_guids.length <= 1">
1919 keyboard_arrow_left
2020 </i>
21- <div class="minds-archive-stage" *ngIf="object.subtype == 'image'">
21+ <div class="minds-archive-stage" [ngClass]="{minds-image-landscape: orientation == 'landscape', minds-image-portrait: orientation == 'portrait'}" *ngIf="object.subtype == 'image'">
2222 <img src="/archive/thumbnail/{{object.guid}}/xlarge"/>
2323 </div>
2424 <div class="minds-archive-stage" *ngIf="object.subtype == 'video'">
@@ -44,6 +44,7 @@ import { Material } from '../../../../directives/material';
4444export class ArchiveTheatre {
4545
4646 object : any = { } ;
47+ orientation : string ;
4748 session = SessionFactory . build ( ) ;
4849
4950 constructor ( public client : Client , public router : Router ) {
@@ -53,6 +54,14 @@ export class ArchiveTheatre {
5354 if ( ! value . guid )
5455 return ;
5556 this . object = value ;
57+ if ( this . object . subtype == 'image' ) {
58+ /*Check image's aspect ratio for landscape or l*/
59+ if ( this . object . naturalWidth >= this . object . naturalHeight ) {
60+ this . orientation = 'landscape' ;
61+ } else {
62+ this . orientation = 'portrait' ;
63+ }
64+ }
5665 }
5766
5867 prev ( ) {
You can’t perform that action at this time.
0 commit comments