We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 203cfe8 commit 0502e59Copy full SHA for 0502e59
src/Viewer.tsx
@@ -83,11 +83,14 @@ function ViewerWidget(props: ViewerProps): JSX.Element {
83
for (const entry of entries) {
84
// get the size of viewer container
85
let { width } = entry.contentRect;
86
+ const { height } = entry.contentRect;
87
// hide side panel if space is small
88
setShowSidePanel(width > MIN_WIDTH_TO_SHOW_SIDE_PANEL);
89
if (showSidePanel) {
90
width = width - SIDE_PANEL_WIDTH;
91
}
92
+ // pass size to viewer
93
+ setDimensions({ width, height });
94
95
96
);
0 commit comments