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

Commit

Permalink
feat(gallery): input pagerVisible
Browse files Browse the repository at this point in the history
  • Loading branch information
garygrossgarten committed Apr 28, 2019
1 parent ae39efe commit 3347c17
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions projects/core/src/lib/gallery/gallery.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</div>

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

<ng-container *fivIf="['desktop']">
<ion-fab [@scale] *ngIf="controlsVisible" vertical="center" horizontal="end" slot="fixed">
<ion-fab [@scale] *ngIf="controlsVisible && pagerVisible" vertical="center" horizontal="end" slot="fixed">
<ion-fab-button color="light" (click)="next()" [disabled]="activeIndex === images.length - 1">
<ion-icon name="arrow-forward"></ion-icon>
</ion-fab-button>
Expand Down
3 changes: 2 additions & 1 deletion projects/core/src/lib/gallery/gallery.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { IonSlides, DomController, Platform } from '@ionic/angular';
import { FivOverlay } from './../overlay/overlay.component';
import {
Component, OnInit, ViewChild, ElementRef, Renderer2,
ContentChildren, QueryList, AfterContentInit, forwardRef, HostListener, Inject, ChangeDetectorRef, TemplateRef, ViewChildren
ContentChildren, QueryList, AfterContentInit, forwardRef, HostListener, Inject, ChangeDetectorRef, TemplateRef, ViewChildren, Input
} from '@angular/core';
import { style, animate, AnimationBuilder, trigger, transition } from '@angular/animations';
import { Key } from './keycodes.enum';
Expand Down Expand Up @@ -71,6 +71,7 @@ export class FivGallery implements OnInit, AfterContentInit {
inFullscreen: boolean;
zoomedIn: boolean;
controlsVisible = true;
@Input() pagerVisible = true;
private slidesLoaded;

@HostListener('window:keyup', ['$event'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

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

<ng-content></ng-content>
</ion-content>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ ion-content {
--padding-top: calc(env(safe-area-inset-top) + var(--fiv-padding-top, 0px));
}

.content{
transform: translate3d(0, 0, 0);
}

.icon {
height: 20px;
width: 20px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ import { animate, style, transition, trigger, state, AnimationBuilder, Animation
]),
transition('* => void', [
style({ width: '112px', opacity: 1, transform: 'translateY(calc(112px + env(safe-area-inset-top))) translateX(-50%)' }),
animate('125ms ease-out', style({ width: '40px', transform: 'translateY(calc(112px + env(safe-area-inset-top))) translateX(-50%)' }))
animate('125ms ease-out',
style({ width: '40px', transform: 'translateY(calc(112px + env(safe-area-inset-top))) translateX(-50%)' }))
]),
]
),
Expand Down

0 comments on commit 3347c17

Please sign in to comment.