File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
frontend/javascript/components/redaction Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -673,8 +673,10 @@ export default {
673673 // - but would have to limit effective canvas size to prevent crashes
674674 renderDensityFactor = Math .max (minRenderWidth / window .innerWidth , 1.0 )
675675
676- this .intrinsicPageWidth = page .view [2 ]
677- this .intrinsicpageHeight = page .view [3 ]
676+ // is the page rotated by ±{90, 270}?
677+ const flipWidthHeight = Math .abs (page .rotate ) % 180 === 90
678+ this .intrinsicPageWidth = flipWidthHeight ? page .view [3 ] : page .view [2 ]
679+ this .intrinsicPageHeight = flipWidthHeight ? page .view [2 ] : page .view [3 ]
678680 this .scaleFactor = (renderDensityFactor * maxWidth) / this .intrinsicPageWidth
679681 const viewport = page .getViewport ({ scale: this .scaleFactor })
680682
@@ -687,6 +689,9 @@ export default {
687689 const wPx = viewport .width / renderDensityFactor + ' px'
688690 const hPx = viewport .height / renderDensityFactor + ' px'
689691 console .log (' PdfRedaction loadPage' , {
692+ flipWidthHeight,
693+ page,
694+ viewport,
690695 renderDensityFactor,
691696 scaleFactor: this .scaleFactor ,
692697 maxWidth,
You can’t perform that action at this time.
0 commit comments