mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-02-18 10:53:43 +01:00
logbox window z index fix
This commit is contained in:
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 makeStyles from "@mui/styles/makeStyles";
|
||||||
import createStyles from "@mui/styles/createStyles";
|
import createStyles from "@mui/styles/createStyles";
|
||||||
import ArrowForwardIosIcon from "@mui/icons-material/ArrowForwardIos";
|
import ArrowForwardIosIcon from "@mui/icons-material/ArrowForwardIos";
|
||||||
|
import _ from "lodash";
|
||||||
|
|
||||||
export const LogBoxEvents = new EventEmitter<[RunningScript]>();
|
export const LogBoxEvents = new EventEmitter<[RunningScript]>();
|
||||||
|
|
||||||
@ -86,9 +87,17 @@ function LogWindow(props: IProps): React.ReactElement {
|
|||||||
killWorkerScript(props.script, props.script.server, true);
|
killWorkerScript(props.script, props.script.server, true);
|
||||||
props.onClose();
|
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 (
|
return (
|
||||||
<Draggable handle=".drag">
|
<Draggable onDrag={onDrag} handle=".drag">
|
||||||
<Paper
|
<Paper
|
||||||
style={{
|
style={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
|
Reference in New Issue
Block a user