Add configurable SignatureFieldParams class

Introduce `SignatureFieldParams` class to manage signature field dimensions with configurable `Width` and `Height`. Integrate this configuration into the service collection and replace hardcoded dimensions in `CreateEnvelopeCommandHandler.cs` and `SenderEditorPage.razor`. Update `appsettings.json` to include the new configuration section, allowing runtime adjustments.
This commit is contained in:
2026-10-27 09:18:11 +01:00
parent c2b7579717
commit 5df38754cb
7 changed files with 41 additions and 6 deletions

View File

@@ -47,6 +47,8 @@ public class CreateEnvelopeCommandHandler : IRequestHandler<CreateEnvelopeComman
private DispatcherParams DispatcherParams => _provider.GetRequiredService<IOptions<DispatcherParams>>().Value;
private SignatureFieldParams SignatureFieldParams => _provider.GetRequiredService<IOptionsMonitor<SignatureFieldParams>>().CurrentValue;
private IConfigService ConfigService => _provider.GetRequiredService<IConfigService>();
private IMediator Mediator => _provider.GetRequiredService<IMediator>();
@@ -444,8 +446,8 @@ public class CreateEnvelopeCommandHandler : IRequestHandler<CreateEnvelopeComman
ElementType = 1,
X = field.X,
Y = field.Y,
Width = 1.77,
Height = 1.96,
Width = SignatureFieldParams.Width,
Height = SignatureFieldParams.Height,
Page = field.Page,
Required = true,
ReadOnly = false,