Remove unsupported ZoomLevelChanged from DxPdfViewer
Removed the `ZoomLevelChanged` parameter from the `DxPdfViewer` component in `EnvelopeReceiverPage.razor` due to lack of support in the installed `DevExpress.Blazor.PdfViewer` package version `25.2.3`. This prevents runtime exceptions caused by the use of an unsupported parameter. Deleted the `OnViewerZoomLevelChanged` method, as it is no longer needed. Updated `RECEIVER_PDF_VIEWER_CONTEXT.md` to reflect the limitations of the installed package and adjusted the recovery plan to bind zoom state directly to `DxPdfViewer.ZoomLevel`. Simplified zoom handling by removing custom JavaScript logic for `ctrl+wheel` zoom and retaining the overlay redraw pipeline. Confirmed that the built-in DevExpress zoom UI now works without runtime errors, and custom zoom duplication has been eliminated.
This commit is contained in:
@@ -334,7 +334,6 @@
|
|||||||
CssClass="envelope-dx-pdf-viewer"
|
CssClass="envelope-dx-pdf-viewer"
|
||||||
DocumentContent="@_pdfDocumentContent"
|
DocumentContent="@_pdfDocumentContent"
|
||||||
ZoomLevel="@_viewerZoomLevel"
|
ZoomLevel="@_viewerZoomLevel"
|
||||||
ZoomLevelChanged="OnViewerZoomLevelChanged"
|
|
||||||
IsSinglePagePreview="true" />
|
IsSinglePagePreview="true" />
|
||||||
}
|
}
|
||||||
<div id="pdf-signature-layer" class="pdf-signature-layer pdf-signature-layer--dx"></div>
|
<div id="pdf-signature-layer" class="pdf-signature-layer pdf-signature-layer--dx"></div>
|
||||||
@@ -749,21 +748,6 @@
|
|||||||
await SetZoom(requestedZoom);
|
await SetZoom(requestedZoom);
|
||||||
}
|
}
|
||||||
|
|
||||||
async Task OnViewerZoomLevelChanged(double newZoomLevel)
|
|
||||||
{
|
|
||||||
_viewerZoomLevel = newZoomLevel;
|
|
||||||
|
|
||||||
if (newZoomLevel > 0)
|
|
||||||
{
|
|
||||||
_currentZoom = (int)Math.Round(newZoomLevel * 100, MidpointRounding.AwayFromZero);
|
|
||||||
}
|
|
||||||
|
|
||||||
await JSRuntime.InvokeVoidAsync("pdfViewer.setViewState", _currentPage, _currentZoom);
|
|
||||||
await Task.Delay(150);
|
|
||||||
await RenderSignatureButtonsAsync();
|
|
||||||
await InvokeAsync(StateHasChanged);
|
|
||||||
}
|
|
||||||
|
|
||||||
async Task NextPage()
|
async Task NextPage()
|
||||||
{
|
{
|
||||||
if (_currentPage >= _totalPages)
|
if (_currentPage >= _totalPages)
|
||||||
|
|||||||
@@ -941,13 +941,12 @@ That is the safest first vertical slice because:
|
|||||||
|
|
||||||
### 9. Verified DevExpress API findings and current progress
|
### 9. Verified DevExpress API findings and current progress
|
||||||
|
|
||||||
The following points are now verified from DevExpress documentation for `DxPdfViewer`:
|
The following points are now verified for the currently installed `DevExpress.Blazor.PdfViewer` package version `25.2.3`:
|
||||||
|
|
||||||
- `ZoomLevel` is a real component parameter
|
- `ZoomLevel` is a real component parameter
|
||||||
- positive `ZoomLevel` values are interpreted as percentages
|
- normal positive zoom values used in this receiver page must be treated as factors in the live UI flow here (`1.5` = `150%`)
|
||||||
- `ZoomLevelChanged` is supported and should be used to synchronize viewer zoom with page state
|
|
||||||
- `CustomizeToolbar` can clear all built-in toolbar items through `ToolbarModel.AllItems.Clear()`
|
|
||||||
- `ActivePageIndex` is read-only information and is not a page-navigation parameter
|
- `ActivePageIndex` is read-only information and is not a page-navigation parameter
|
||||||
|
- `ZoomLevelChanged` must not be used in this workspace because the current installed component surface does not expose a matching incoming parameter on `DxPdfViewer`
|
||||||
|
|
||||||
### 10. Recovery progress update
|
### 10. Recovery progress update
|
||||||
|
|
||||||
@@ -955,16 +954,15 @@ The first functional recovery step is zoom restoration.
|
|||||||
|
|
||||||
Implemented direction:
|
Implemented direction:
|
||||||
|
|
||||||
- bind custom receiver toolbar zoom controls to `DxPdfViewer.ZoomLevel`
|
- bind receiver zoom state to `DxPdfViewer.ZoomLevel`
|
||||||
- synchronize zoom changes back into `_currentZoom` through `ZoomLevelChanged`
|
|
||||||
- remove competing custom JS ctrl+wheel zoom logic
|
- remove competing custom JS ctrl+wheel zoom logic
|
||||||
- keep overlay redraw pipeline after confirmed zoom changes
|
- keep overlay redraw pipeline in place
|
||||||
|
- avoid `ZoomLevelChanged` usage because it is not available on the installed `25.2.3` `DxPdfViewer` surface
|
||||||
|
|
||||||
Expected outcome after this step:
|
Expected outcome after this step:
|
||||||
|
|
||||||
- toolbar zoom buttons visibly affect the DevExpress viewer
|
- built-in DevExpress zoom UI can be used without the runtime parameter exception
|
||||||
- zoom slider visibly affects the DevExpress viewer
|
- custom zoom duplication is removed
|
||||||
- overlay refresh is triggered from real viewer zoom state instead of guessed zoom state
|
|
||||||
|
|
||||||
### 11. Additional findings after first zoom integration attempt
|
### 11. Additional findings after first zoom integration attempt
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user