From 23f85d72675b1e5a88c232b2f0c8a9cdc663b3a8 Mon Sep 17 00:00:00 2001 From: Reece Date: Tue, 7 Oct 2025 22:40:58 +0100 Subject: [PATCH] tweaks --- frontend/src/components/annotation/shared/DrawingCanvas.tsx | 2 +- frontend/src/components/annotation/shared/ImageUploader.tsx | 2 +- frontend/src/components/tools/sign/SignSettings.tsx | 2 +- frontend/src/components/viewer/SignatureAPIBridge.tsx | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/annotation/shared/DrawingCanvas.tsx b/frontend/src/components/annotation/shared/DrawingCanvas.tsx index 87362f74d..53585261d 100644 --- a/frontend/src/components/annotation/shared/DrawingCanvas.tsx +++ b/frontend/src/components/annotation/shared/DrawingCanvas.tsx @@ -64,7 +64,7 @@ export const DrawingCanvas: React.FC = ({ padRef.current = null; } setModalOpen(true); - }; + };1 const trimCanvas = (canvas: HTMLCanvasElement): string => { const ctx = canvas.getContext('2d'); diff --git a/frontend/src/components/annotation/shared/ImageUploader.tsx b/frontend/src/components/annotation/shared/ImageUploader.tsx index d590a7bc1..aabca815c 100644 --- a/frontend/src/components/annotation/shared/ImageUploader.tsx +++ b/frontend/src/components/annotation/shared/ImageUploader.tsx @@ -48,7 +48,7 @@ export const ImageUploader: React.FC = ({ disabled={disabled} /> - {hint || t('sign.image.hint', 'Upload a PNG or JPG image of your signature')} + {hint || t('sign.image.hint', 'Upload an image of your signature')} ); diff --git a/frontend/src/components/tools/sign/SignSettings.tsx b/frontend/src/components/tools/sign/SignSettings.tsx index 1bc72d840..ce49dbfd3 100644 --- a/frontend/src/components/tools/sign/SignSettings.tsx +++ b/frontend/src/components/tools/sign/SignSettings.tsx @@ -191,7 +191,7 @@ const SignSettings = ({ } }} hasSignatureData={!!(canvasSignatureData || imageSignatureData || (parameters.signerName && parameters.signerName.trim() !== ''))} - disabled={disabled} + disabled={false} showPlaceButton={false} placeButtonText="Update and Place" /> diff --git a/frontend/src/components/viewer/SignatureAPIBridge.tsx b/frontend/src/components/viewer/SignatureAPIBridge.tsx index b22f66b03..70e5ac684 100644 --- a/frontend/src/components/viewer/SignatureAPIBridge.tsx +++ b/frontend/src/components/viewer/SignatureAPIBridge.tsx @@ -22,9 +22,10 @@ export const SignatureAPIBridge = forwardRef(function SignatureAPI const { signatureConfig, storeImageData, isPlacementMode } = useSignature(); - // Enable keyboard deletion of selected annotations - only when in signature placement mode + // Enable keyboard deletion of selected annotations useEffect(() => { - if (!annotationApi || !isPlacementMode) return; + // Always enable delete key when we have annotation API and are in sign mode + if (!annotationApi || (isPlacementMode === undefined)) return; const handleKeyDown = (event: KeyboardEvent) => { if (event.key === 'Delete' || event.key === 'Backspace') {