diff --git a/src/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.ts b/src/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.ts index 1fe5309e..7117e890 100644 --- a/src/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.ts +++ b/src/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.ts @@ -146,13 +146,25 @@ export class ControlsLightboxComponent implements OnDestroy, OnInit, OnChanges { } } - wheel($event: { deltaY: number }): void { - if (!this.activePhoto || this.activePhoto.gridMedia.isVideo()) { + wheel($event: { deltaX: number, deltaY: number }): void { + if (!this.activePhoto) { + return; + } + if ($event.deltaX < 0) { + if (this.navigation.hasPrev) { + this.previousPhoto.emit(); + } + } else if ($event.deltaX > 0) { + if (this.navigation.hasNext) { + this.nextMediaManuallyTriggered(); + } + } + if (this.activePhoto.gridMedia.isVideo()) { return; } if ($event.deltaY < 0) { this.zoomIn(); - } else { + } else if ($event.deltaY > 0) { this.zoomOut(); } } @@ -537,4 +549,3 @@ export class ControlsLightboxComponent implements OnDestroy, OnInit, OnChanges { } } -