4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 18:44:21 +08:00

Fix render window size (#1659)

This commit is contained in:
Matthew Tancik 2023-03-24 08:33:55 -07:00 committed by GitHub
parent f490d9a923
commit 2ff1462f30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,6 +169,12 @@ export default function ViewerWindow(props) {
});
};
setDimensions({
height: get_window_height(),
width: get_window_width(),
});
render();
window.addEventListener('resize', handleNewDimensions);
return () => {
window.removeEventListener('resize', handleNewDimensions);