Increase max zoom and improve zoom styling

Increased the maximum zoom percentage (`MaxZoomPercent`) in `SenderPdfImageEditor.razor` from 300 to 1000, enabling higher zoom levels for PDFs.

Updated the `GetZoomStyle` method to use a CSS variable (`--sender-editor-zoom`) for better flexibility and consistency in applying zoom styles.

Introduced the `--sender-editor-zoom` CSS variable in `envelope-viewer.css` and replaced the `max-width` property with a dynamic `width` calculation to ensure zoom levels affect the editor's layout.
This commit is contained in:
2026-11-30 14:41:08 +01:00
parent d54e094ef4
commit eae1f7baa8
2 changed files with 4 additions and 3 deletions

View File

@@ -203,7 +203,7 @@
private ActiveFieldScrollTarget? _pendingActiveFieldScrollTarget;
private const int MinZoomPercent = 50;
private const int MaxZoomPercent = 300;
private const int MaxZoomPercent = 1000;
private const int ZoomStepPercent = 5;
private bool CanDownloadPdf => !string.IsNullOrWhiteSpace(PdfDataUrl);
private bool CanPrintPdf => !string.IsNullOrWhiteSpace(PdfDataUrl);
@@ -269,7 +269,7 @@
private string GetZoomStyle()
{
var factor = (_zoomPercent / 100.0).ToString("F4", CultureInfo.InvariantCulture);
return $"zoom:{factor};";
return $"--sender-editor-zoom:{factor};";
}
protected override void OnParametersSet()