Fix visualiser after virtualisation

Summary: There was an issue with cropping introduce by virtualisation and the position of the scroll view in the hierachy. Its a bit fragile but it works now.

Reviewed By: lblasa

Differential Revision: D46761831

fbshipit-source-id: ce001c6f4fe7ddc111edf0098f75a1273c84472d
This commit is contained in:
Luke De Feo
2023-06-19 05:06:52 -07:00
committed by Facebook GitHub Bot
parent f72514f238
commit f9bbc967ea
3 changed files with 8 additions and 8 deletions

View File

@@ -111,6 +111,9 @@ export const Visualization2D: React.FC<
//this div is to ensure that the size of the visualiser doesnt change when focusings on a subtree
style={
{
overflowY: 'auto',
overflowX: 'hidden',
position: 'relative', //this is for the absolutely positioned overlays
[pxScaleFactorCssVar]: pxScaleFactor,
width: toPx(focusState.actualRoot.bounds.width),
height: toPx(focusState.actualRoot.bounds.height),