logbox window z index fix

This commit is contained in:
Olivier Gagnon 2021-10-15 13:49:03 -04:00
parent 79a6c7eb7b
commit 3bd05ea398
3 changed files with 12 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -11,6 +11,7 @@ import { ResizableBox } from "react-resizable";
import makeStyles from "@mui/styles/makeStyles";
import createStyles from "@mui/styles/createStyles";
import ArrowForwardIosIcon from "@mui/icons-material/ArrowForwardIos";
import _ from "lodash";
export const LogBoxEvents = new EventEmitter<[RunningScript]>();
@ -86,9 +87,17 @@ function LogWindow(props: IProps): React.ReactElement {
killWorkerScript(props.script, props.script.server, true);
props.onClose();
}
//useEffect(() => TerminalEvents.subscribe(_.debounce(async () => rerender(), 25, { maxWait: 50 })), []);
function onDrag(): void {
const c = container.current;
if (c === null) return;
c.style.zIndex = (new Date().getTime() % 1000000) + "";
rerender();
}
return (
<Draggable handle=".drag">
<Draggable onDrag={onDrag} handle=".drag">
<Paper
style={{
display: "flex",