mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-23 08:03:48 +01:00
logbox layer on click
This commit is contained in:
parent
3bd05ea398
commit
8b59260bd3
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -89,15 +89,15 @@ function LogWindow(props: IProps): React.ReactElement {
|
|||||||
}
|
}
|
||||||
//useEffect(() => TerminalEvents.subscribe(_.debounce(async () => rerender(), 25, { maxWait: 50 })), []);
|
//useEffect(() => TerminalEvents.subscribe(_.debounce(async () => rerender(), 25, { maxWait: 50 })), []);
|
||||||
|
|
||||||
function onDrag(): void {
|
function updateLayer(): void {
|
||||||
const c = container.current;
|
const c = container.current;
|
||||||
if (c === null) return;
|
if (c === null) return;
|
||||||
c.style.zIndex = (new Date().getTime() % 1000000) + "";
|
c.style.zIndex = (new Date().getTime() % 1000000000) + 1500 + "";
|
||||||
rerender();
|
rerender();
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Draggable onDrag={onDrag} handle=".drag">
|
<Draggable handle=".drag">
|
||||||
<Paper
|
<Paper
|
||||||
style={{
|
style={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
@ -109,6 +109,7 @@ function LogWindow(props: IProps): React.ReactElement {
|
|||||||
}}
|
}}
|
||||||
ref={container}
|
ref={container}
|
||||||
>
|
>
|
||||||
|
<div onMouseDown={updateLayer}>
|
||||||
<Paper
|
<Paper
|
||||||
style={{
|
style={{
|
||||||
cursor: "grab",
|
cursor: "grab",
|
||||||
@ -148,6 +149,7 @@ function LogWindow(props: IProps): React.ReactElement {
|
|||||||
</Box>
|
</Box>
|
||||||
</ResizableBox>
|
</ResizableBox>
|
||||||
</Paper>
|
</Paper>
|
||||||
|
</div>
|
||||||
</Paper>
|
</Paper>
|
||||||
</Draggable>
|
</Draggable>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user