Make zoom step percentage configurable

Added a `ZoomStepPercentage` property to `PdfViewerOptions` to allow configurable zoom step increments (1-50, default 5%). Updated `EnvelopeViewer.razor` to use this property for the zoom slider step. Modified `pdf-viewer.js` to apply the zoom step percentage for mouse wheel zoom, `zoomIn`, and `zoomOut` methods.

Included `ZoomStepPercentage` in `appsettings.json` and `setQualityOptions` for dynamic updates. Reduced `ZoomTransitionDuration` in `appsettings.json` from 900ms to 150ms for faster zoom transitions. These changes ensure consistent and customizable zoom behavior across the application.
This commit is contained in:
2026-06-06 12:36:00 +02:00
parent 139b92ed8c
commit 0faf1fba7e
4 changed files with 26 additions and 13 deletions

View File

@@ -61,4 +61,11 @@ public class PdfViewerOptions
/// Default: 50
/// </summary>
public int ThumbnailRenderDelay { get; set; } = 50;
/// <summary>
/// Zoom step percentage (1 - 50)
/// Controls how much zoom changes per click or scroll
/// Default: 5 (5% per step)
/// </summary>
public int ZoomStepPercentage { get; set; } = 5;
}