From 27af7c0f42a1f52b86232e1598111165b3f09236 Mon Sep 17 00:00:00 2001 From: SondreB Date: Sat, 16 Nov 2024 23:46:19 +0100 Subject: [PATCH] Add a reset button --- src/app/photo-collage/photo-collage.component.html | 1 + src/app/photo-collage/photo-collage.component.ts | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/src/app/photo-collage/photo-collage.component.html b/src/app/photo-collage/photo-collage.component.html index ad78530..742e880 100644 --- a/src/app/photo-collage/photo-collage.component.html +++ b/src/app/photo-collage/photo-collage.component.html @@ -32,5 +32,6 @@
+
diff --git a/src/app/photo-collage/photo-collage.component.ts b/src/app/photo-collage/photo-collage.component.ts index 368375e..0b45b2c 100644 --- a/src/app/photo-collage/photo-collage.component.ts +++ b/src/app/photo-collage/photo-collage.component.ts @@ -526,4 +526,14 @@ export class PhotoCollageComponent implements AfterViewInit { this.render(); } + + resetCollage() { + this.photos = []; + this.maxZIndex = 0; + this.scale = 1; + this.panX = 0; + this.panY = 0; + this.hoveredPhoto = null; + this.render(); + } }