Skip to content

Commit

Permalink
Merge pull request #331 from greggman/gui-to-front
Browse files Browse the repository at this point in the history
Make GUI appear on top of other elements
  • Loading branch information
toji authored Nov 23, 2023
2 parents e59b766 + c6a94aa commit 6682d94
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/SampleLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ const SampleLayout: React.FunctionComponent<
if (props.gui && process.browser) {
// eslint-disable-next-line @typescript-eslint/no-var-requires
const dat = require('dat.gui');
return new dat.GUI({ autoPlace: false });
const gui = new dat.GUI({ autoPlace: false });
// HACK: Make
gui.domElement.style.position = 'relative';
gui.domElement.style.zIndex = '1000';
return gui;
}
return undefined;
}, []);
Expand Down

0 comments on commit 6682d94

Please sign in to comment.