We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 93c29c9 commit 5aad845Copy full SHA for 5aad845
src/repl/components/Plot.tsx
@@ -72,6 +72,14 @@ export function Plot({
72
});
73
}, []);
74
75
+ // Set initial plot height
76
+ React.useLayoutEffect(() => {
77
+ void webR.init().then(() => {
78
+ if (!panelRef.current) return;
79
+ onResize(panelRef.current.getSize());
80
+ });
81
+ }, []);
82
+
83
// Update the plot container to display the currently selected canvas element
84
React.useEffect(() => {
85
if (!plotContainerRef.current) {
0 commit comments