mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 18:16:15 +08:00
fix(core): should use AttachmentViewerView in split view and standalone page (#12323)
Closes: [AF-2564](https://linear.app/affine-design/issue/AF-2564/pdf-split-view-多了-header) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Improved code clarity and maintainability with clearer comments and streamlined property usage. - Updated the workspace attachment page to use a more context-appropriate attachment viewer component. - **Style** - Minor formatting improvements for better code readability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -142,12 +142,13 @@ interface PageRendererInnerProps {
|
||||
const PageRendererInner = forwardRef<HTMLCanvasElement, PageRendererInnerProps>(
|
||||
({ img, err }, ref) => {
|
||||
if (img) {
|
||||
const { width, height } = img;
|
||||
return (
|
||||
<PDFPageCanvas
|
||||
ref={ref}
|
||||
style={{
|
||||
height: img.height / 2,
|
||||
aspectRatio: `${img.width} / ${img.height}`,
|
||||
height: height / 2,
|
||||
aspectRatio: `${width} / ${height}`,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user