]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix: fix pdf editor hover rotate counterclockwise button (#10848)
authorshamoon <4887959+shamoon@users.noreply.github.com>
Sat, 13 Sep 2025 21:19:50 +0000 (14:19 -0700)
committerGitHub <noreply@github.com>
Sat, 13 Sep 2025 21:19:50 +0000 (14:19 -0700)
src-ui/src/app/components/common/pdf-editor/pdf-editor.component.html
src-ui/src/app/components/common/pdf-editor/pdf-editor.component.ts

index 4b47de3d18f7fef66c21a6bd4d0ec9c24c5cc9c2..2d1d01ca711283b3d7fe532b61cab415c725a026 100644 (file)
@@ -30,7 +30,7 @@
       <div class="page-item rounded p-2" cdkDrag (click)="toggleSelection(i)" [class.selected]="p.selected">
         <div class="btn-toolbar hover-actions z-10">
           <div class="btn-group me-2">
-            <button class="btn btn-sm btn-dark" (click)="rotate(i); $event.stopPropagation()" title="Rotate page counter-clockwise" i18n-title>
+            <button class="btn btn-sm btn-dark" (click)="rotate(i, true); $event.stopPropagation()" title="Rotate page counter-clockwise" i18n-title>
               <i-bs name="arrow-counterclockwise"></i-bs>
             </button>
             <button class="btn btn-sm btn-dark" (click)="rotate(i); $event.stopPropagation()" title="Rotate page clockwise" i18n-title>
index f417f5199e22fea8b7b7c5de342ccc063f4ddc14..25eaf42f15cdfa5ad8cbe430141ca0112f3ad542 100644 (file)
@@ -67,8 +67,9 @@ export class PDFEditorComponent extends ConfirmDialogComponent {
     this.pages[i].selected = !this.pages[i].selected
   }
 
-  rotate(i: number) {
-    this.pages[i].rotate = (this.pages[i].rotate + 90) % 360
+  rotate(i: number, counterclockwise: boolean = false) {
+    this.pages[i].rotate =
+      (this.pages[i].rotate + (counterclockwise ? -90 : 90) + 360) % 360
   }
 
   rotateSelected(dir: number) {