mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
Don't show controls before image is fullscreen #587
This commit is contained in:
parent
c8210b975f
commit
01f1b69b41
@ -19,8 +19,9 @@ import {PiTitleService} from '../../../model/pi-title.service';
|
||||
|
||||
export enum LightboxStates {
|
||||
Open = 1,
|
||||
Closing = 2,
|
||||
Closed = 3,
|
||||
Opening = 2,
|
||||
Closing = 3,
|
||||
Closed = 4,
|
||||
}
|
||||
|
||||
@Component({
|
||||
@ -220,7 +221,7 @@ export class GalleryLightboxComponent implements OnDestroy, OnInit {
|
||||
if (this.controls) {
|
||||
this.controls.resetZoom();
|
||||
}
|
||||
this.status = LightboxStates.Open;
|
||||
this.status = LightboxStates.Opening;
|
||||
const selectedPhoto = this.findPhotoComponent(photo);
|
||||
if (selectedPhoto === null) {
|
||||
throw new Error('Can\'t find Photo');
|
||||
@ -234,6 +235,7 @@ export class GalleryLightboxComponent implements OnDestroy, OnInit {
|
||||
this.calcLightBoxPhotoDimension(selectedPhoto.gridMedia.media)
|
||||
).onDone((): void => {
|
||||
this.animating = false;
|
||||
this.status = LightboxStates.Open;
|
||||
});
|
||||
this.animateLightbox(lightboxDimension, {
|
||||
top: 0,
|
||||
|
Loading…
Reference in New Issue
Block a user