Skip to content
This repository was archived by the owner on Nov 30, 2022. It is now read-only.

Commit 3347c17

Browse files
feat(gallery): input pagerVisible
1 parent ae39efe commit 3347c17

5 files changed

Lines changed: 13 additions & 5 deletions

File tree

projects/core/src/lib/gallery/gallery.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</div>
88

99
<ng-container *fivIf="['desktop']">
10-
<ion-fab [@scale] *ngIf="controlsVisible && images?.length > 0" vertical="center" horizontal="start" slot="fixed">
10+
<ion-fab [@scale] *ngIf="controlsVisible && images?.length > 0 && pagerVisible" vertical="center" horizontal="start" slot="fixed">
1111
<ion-fab-button color="light" (click)="prev()" [disabled]="activeIndex === 0">
1212
<ion-icon name="arrow-back"></ion-icon>
1313
</ion-fab-button>
@@ -28,7 +28,7 @@
2828
</div>
2929

3030
<ng-container *fivIf="['desktop']">
31-
<ion-fab [@scale] *ngIf="controlsVisible" vertical="center" horizontal="end" slot="fixed">
31+
<ion-fab [@scale] *ngIf="controlsVisible && pagerVisible" vertical="center" horizontal="end" slot="fixed">
3232
<ion-fab-button color="light" (click)="next()" [disabled]="activeIndex === images.length - 1">
3333
<ion-icon name="arrow-forward"></ion-icon>
3434
</ion-fab-button>

projects/core/src/lib/gallery/gallery.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { IonSlides, DomController, Platform } from '@ionic/angular';
55
import { FivOverlay } from './../overlay/overlay.component';
66
import {
77
Component, OnInit, ViewChild, ElementRef, Renderer2,
8-
ContentChildren, QueryList, AfterContentInit, forwardRef, HostListener, Inject, ChangeDetectorRef, TemplateRef, ViewChildren
8+
ContentChildren, QueryList, AfterContentInit, forwardRef, HostListener, Inject, ChangeDetectorRef, TemplateRef, ViewChildren, Input
99
} from '@angular/core';
1010
import { style, animate, AnimationBuilder, trigger, transition } from '@angular/animations';
1111
import { Key } from './keycodes.enum';
@@ -71,6 +71,7 @@ export class FivGallery implements OnInit, AfterContentInit {
7171
inFullscreen: boolean;
7272
zoomedIn: boolean;
7373
controlsVisible = true;
74+
@Input() pagerVisible = true;
7475
private slidesLoaded;
7576

7677
@HostListener('window:keyup', ['$event'])

projects/core/src/lib/loading-content/loading-content.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
<ion-content [forceOverscroll]="false" fivPull [maxPullHeight]="maxPullHeight" [minPullHeight]="minPullHeight" (fivPull)="fivPull($event)"
1010
(fivRefresh)="onRefresh()" (fivCancel)="fivCancel()" [enabled]="!refreshing && !hintVisible">
11+
<div class="content">
12+
<ng-content></ng-content>
13+
</div>
1114

12-
<ng-content></ng-content>
1315
</ion-content>

projects/core/src/lib/loading-content/loading-content.component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ ion-content {
1212
--padding-top: calc(env(safe-area-inset-top) + var(--fiv-padding-top, 0px));
1313
}
1414

15+
.content{
16+
transform: translate3d(0, 0, 0);
17+
}
18+
1519
.icon {
1620
height: 20px;
1721
width: 20px;

projects/core/src/lib/loading-content/loading-content.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ import { animate, style, transition, trigger, state, AnimationBuilder, Animation
3737
]),
3838
transition('* => void', [
3939
style({ width: '112px', opacity: 1, transform: 'translateY(calc(112px + env(safe-area-inset-top))) translateX(-50%)' }),
40-
animate('125ms ease-out', style({ width: '40px', transform: 'translateY(calc(112px + env(safe-area-inset-top))) translateX(-50%)' }))
40+
animate('125ms ease-out',
41+
style({ width: '40px', transform: 'translateY(calc(112px + env(safe-area-inset-top))) translateX(-50%)' }))
4142
]),
4243
]
4344
),

0 commit comments

Comments
 (0)