-
-
-
-
-
-
-
-
-
+
+
+
diff --git a/mediarepo-ui/src/app/components/file-gallery/file-gallery.component.scss b/mediarepo-ui/src/app/components/file-gallery/file-gallery.component.scss
index 82b0004..83fccf1 100644
--- a/mediarepo-ui/src/app/components/file-gallery/file-gallery.component.scss
+++ b/mediarepo-ui/src/app/components/file-gallery/file-gallery.component.scss
@@ -32,13 +32,6 @@ app-file-gallery-entry {
overflow: hidden;
}
-.file-full-view-inner {
- height: 100%;
- width: 100%;
- display: block;
- position: relative;
-}
-
app-content-aware-image {
height: 100%;
width: 100%;
@@ -66,30 +59,3 @@ app-content-aware-image {
margin: auto;
}
}
-
-.image-drag-container, .image-scale-container {
- height: 100%;
- width: 100%;
-}
-
-.image-scale-container {
- display: block;
-}
-
-.zoom-slider {
- position: absolute;
- display: flex;
- flex-direction: column;
- right: 1em;
- bottom: 1em;
- z-index: 10;
- opacity: 0.5;
- padding: 1em 0.5em;
- transition-duration: 0.2s;
-}
-
-.zoom-slider:hover {
- opacity: 1;
- background-color: rgba(0, 0, 0, 0.3);
- border-radius: 1em;
-}
diff --git a/mediarepo-ui/src/app/components/file-gallery/file-gallery.component.ts b/mediarepo-ui/src/app/components/file-gallery/file-gallery.component.ts
index 9d8c911..b209366 100644
--- a/mediarepo-ui/src/app/components/file-gallery/file-gallery.component.ts
+++ b/mediarepo-ui/src/app/components/file-gallery/file-gallery.component.ts
@@ -1,6 +1,5 @@
import {
Component,
- ElementRef,
EventEmitter,
HostListener,
Input,
@@ -15,7 +14,6 @@ import {FileService} from "../../services/file/file.service";
import {SafeResourceUrl} from "@angular/platform-browser";
import {Selectable} from "../../models/Selectable";
import {CdkVirtualScrollViewport} from "@angular/cdk/scrolling";
-import {CdkDragMove} from "@angular/cdk/drag-drop";
import {TabService} from "../../services/tab/tab.service";
@Component({
@@ -33,15 +31,9 @@ export class FileGalleryComponent implements OnChanges, OnInit {
entries: Selectable[] = [];
@ViewChild("virtualScroll") virtualScroll!: CdkVirtualScrollViewport;
- @ViewChild("scaledImage") scaledImage: ElementRef | undefined;
- @ViewChild(
- "imageDragContainer") imageDragContainer: ElementRef | undefined;
public selectedFile: Selectable | undefined;
public fileContentUrl: SafeResourceUrl | undefined;
- public imageZoom = 1;
- public imagePosition = {x: 0, y: 0};
- public mouseInImageView = false;
private scrollTimeout: number | undefined;
@@ -56,7 +48,6 @@ export class FileGalleryComponent implements OnChanges, OnInit {
*/
async onEntrySelect(entry: Selectable) {
if (entry) {
- this.resetImage();
this.selectedFile?.unselect();
entry.select();
this.selectedFile = entry;
@@ -149,15 +140,6 @@ export class FileGalleryComponent implements OnChanges, OnInit {
}
}
- public resetImage() {
- this.imageZoom = 1;
- this.imagePosition = {x: 0, y: 0};
- }
-
- public onDragMoved($event: CdkDragMove): void {
- this.imagePosition.x += $event.delta.x;
- this.imagePosition.y += $event.delta.y;
- }
@HostListener("window:keydown", ["$event"])
private async handleKeydownEvent(event: KeyboardEvent) {
@@ -168,28 +150,6 @@ export class FileGalleryComponent implements OnChanges, OnInit {
case "ArrowLeft":
await this.previousItem();
break;
- case "Escape":
- this.resetImage();
- break;
- }
- }
-
- @HostListener("mousewheel", ["$event"])
- private handleScroll(event: any) {
- if (this.mouseInImageView) {
- const delta = event.wheelDelta ?? event.detail;
-
- if (delta > 0) {
- this.imageZoom += 0.2
- if (this.imageZoom > 4) {
- this.imageZoom = 4;
- }
- } else if (delta < 0) {
- this.imageZoom -= 0.2
- if (this.imageZoom < 0.5) {
- this.imageZoom = 0.5;
- }
- }
}
}