Improve signature navigation and rendering stability
Enhanced signature navigation and rendering logic in `pdf-viewer.js`: - Added `_renderLock` to prevent concurrent page renders. - Refactored `renderPage` and `queueRenderPage` for stability. - Updated `goToNextSignature` to support cross-page navigation. - Filtered out applied signatures during rendering and navigation. - Improved handling of applied signatures visibility per page. Updated `EnvelopeViewer.razor`: - Added `OnPageChangedBySignatureNav` to handle page changes triggered by signature navigation. Improved code readability, added comments, and removed outdated logic to ensure smooth transitions and better user experience.
This commit is contained in:
@@ -616,6 +616,12 @@ const int MaxThumbnailWidth = 400;
|
||||
await UpdateSignatureCounterAsync();
|
||||
}
|
||||
|
||||
[JSInvokable]
|
||||
public async Task OnPageChangedBySignatureNav(int newPage) {
|
||||
_currentPage = newPage;
|
||||
await RenderSignatureButtonsAsync();
|
||||
}
|
||||
|
||||
async Task UpdateSignatureCounterAsync() {
|
||||
try {
|
||||
var state = await JSRuntime.InvokeAsync<SignatureNavState>("pdfViewer.getSignatureNavState");
|
||||
|
||||
Reference in New Issue
Block a user