Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Jan 14, 2024
1 parent 0fa9aa3 commit 2b656ad
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 3 additions & 1 deletion examples/08_smplx_visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ def main(
full_pose = torch.from_numpy(
onp.array(
[j.value for j in gui_elements.gui_joints[1:]], dtype=onp.float32
)[None, ...] # type: ignore
)[
None, ...
] # type: ignore
)

# Get deformed mesh.
Expand Down
2 changes: 1 addition & 1 deletion src/viser/_tunnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ async def relay(r: asyncio.StreamReader, w: asyncio.StreamWriter) -> None:
asyncio.create_task(relay(local_r, remote_w)),
asyncio.create_task(relay(remote_r, local_w)),
),
close_event.wait(),
asyncio.create_task(close_event.wait()),
],
return_when=asyncio.FIRST_COMPLETED,
)
Expand Down
11 changes: 7 additions & 4 deletions src/viser/client/src/ControlPanel/ControlPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ export default function ControlPanel(props: {
controlWidthString == "small"
? "16em"
: controlWidthString == "medium"
? "20em"
: controlWidthString == "large"
? "24em"
: null
? "20em"
: controlWidthString == "large"
? "24em"
: null
)!;

const generatedServerToggleButton = (
Expand Down Expand Up @@ -201,6 +201,9 @@ function ShareButton() {
setDoingSomething(false);
}
}, [shareUrl]);
React.useEffect(() => {
if (!connected && shareModalOpened) closeShareModal();
}, [connected, shareModalOpened]);

if (viewer.useGui((state) => state.theme).show_share_button === false)
return null;
Expand Down

0 comments on commit 2b656ad

Please sign in to comment.