|
|
@ -32,9 +32,10 @@ export class FileGalleryComponent implements OnChanges, OnInit {
|
|
|
|
@ViewChild("imageDragContainer") imageDragContainer: ElementRef<HTMLDivElement> | undefined;
|
|
|
|
@ViewChild("imageDragContainer") imageDragContainer: ElementRef<HTMLDivElement> | undefined;
|
|
|
|
|
|
|
|
|
|
|
|
public selectedFile: Selectable<File> | undefined;
|
|
|
|
public selectedFile: Selectable<File> | undefined;
|
|
|
|
fileContentUrl: SafeResourceUrl | undefined;
|
|
|
|
public fileContentUrl: SafeResourceUrl | undefined;
|
|
|
|
public imageZoom = 1;
|
|
|
|
public imageZoom = 1;
|
|
|
|
public imagePosition = {x: 0, y: 0};
|
|
|
|
public imagePosition = {x: 0, y: 0};
|
|
|
|
|
|
|
|
public mouseInImageView = false;
|
|
|
|
|
|
|
|
|
|
|
|
constructor(private fileService: FileService) {
|
|
|
|
constructor(private fileService: FileService) {
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -152,7 +153,8 @@ export class FileGalleryComponent implements OnChanges, OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
@HostListener("mousewheel", ["$event"])
|
|
|
|
@HostListener("mousewheel", ["$event"])
|
|
|
|
private handleScroll(event: any) {
|
|
|
|
private handleScroll(event: any) {
|
|
|
|
const delta = event.wheelDelta ?? event.detail
|
|
|
|
if (this.mouseInImageView) {
|
|
|
|
|
|
|
|
const delta = event.wheelDelta ?? event.detail;
|
|
|
|
|
|
|
|
|
|
|
|
if (delta > 0) {
|
|
|
|
if (delta > 0) {
|
|
|
|
this.imageZoom += 0.2
|
|
|
|
this.imageZoom += 0.2
|
|
|
@ -166,6 +168,7 @@ export class FileGalleryComponent implements OnChanges, OnInit {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private getPreselectedEntry(): Selectable<File> | undefined {
|
|
|
|
private getPreselectedEntry(): Selectable<File> | undefined {
|
|
|
|
if (this.preselectedFile) {
|
|
|
|
if (this.preselectedFile) {
|
|
|
|