Refactor comments for clarity and consistency
Replaced non-English comments with English equivalents across `EnvelopeViewer.razor` and `pdf-viewer.js` to improve code readability and maintainability. Updated comments to clarify the purpose of variables, methods, and DOM manipulation logic without altering functionality. These changes ensure the codebase is more accessible to a broader audience.
This commit is contained in:
@@ -519,7 +519,7 @@ EnvelopeReceiverDto? _envelopeReceiver;
|
||||
int _totalSignatures = 0;
|
||||
int _signedSignatures = 0;
|
||||
int _unsignedSignatures = 0;
|
||||
int _currentSignatureIndex = 0; // Şu an hangi imzada (1-based)
|
||||
int _currentSignatureIndex = 0; // Current signature index (1-based)
|
||||
|
||||
// Signature state
|
||||
SignatureCaptureDto? _capturedSignature;
|
||||
@@ -817,7 +817,7 @@ const int MaxThumbnailWidth = 400;
|
||||
_totalSignatures = state.Total;
|
||||
_signedSignatures = state.Signed;
|
||||
_unsignedSignatures = state.Unsigned;
|
||||
_currentSignatureIndex = state.CurrentIndex; // Şu an hangi imzada
|
||||
_currentSignatureIndex = state.CurrentIndex; // Current signature
|
||||
await InvokeAsync(StateHasChanged);
|
||||
} catch {
|
||||
// Ignore errors during counter update
|
||||
@@ -862,12 +862,12 @@ const int MaxThumbnailWidth = 400;
|
||||
|
||||
// Signature popup methods
|
||||
void OpenSignaturePopup() {
|
||||
// Popup'ı mevcut imza ile aç (değiştirme modu)
|
||||
// Open popup with current signature (edit mode)
|
||||
_activeSignatureTab = SignatureTabDraw;
|
||||
_signaturePopupVisible = true;
|
||||
_popupValidationMessage = null;
|
||||
|
||||
// Mevcut imza bilgilerini form field'larına yükle
|
||||
// Load current signature info into form fields
|
||||
if (_capturedSignature is not null)
|
||||
{
|
||||
_signerFullName = _capturedSignature.FullName;
|
||||
@@ -879,10 +879,10 @@ const int MaxThumbnailWidth = 400;
|
||||
async Task OnPopupShownAsync() {
|
||||
await InitializeActiveSignatureTabAsync();
|
||||
|
||||
// Eğer mevcut imza varsa ve draw tab'deyse, imzayı canvas'a yükle
|
||||
// If there's an existing signature and we're on draw tab, load it to canvas
|
||||
if (_capturedSignature is not null && _activeSignatureTab == SignatureTabDraw)
|
||||
{
|
||||
await Task.Delay(100); // Canvas'ın hazır olmasını bekle
|
||||
await Task.Delay(100); // Wait for canvas to be ready
|
||||
await JSRuntime.InvokeVoidAsync("receiverSignature.loadExistingSignature", DrawCanvasId, _capturedSignature.DataUrl);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user