Merge pull request #1505 from danielyxie/dev

logbox layer on click
This commit is contained in:
hydroflame 2021-10-15 13:59:51 -04:00 committed by GitHub
commit 2e203d46ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 44 additions and 42 deletions

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 })), []);
function onDrag(): void {
function updateLayer(): void {
const c = container.current;
if (c === null) return;
c.style.zIndex = (new Date().getTime() % 1000000) + "";
c.style.zIndex = (new Date().getTime() % 1000000000) + 1500 + "";
rerender();
}
return (
<Draggable onDrag={onDrag} handle=".drag">
<Draggable handle=".drag">
<Paper
style={{
display: "flex",
@ -109,6 +109,7 @@ function LogWindow(props: IProps): React.ReactElement {
}}
ref={container}
>
<div onMouseDown={updateLayer}>
<Paper
style={{
cursor: "grab",
@ -148,6 +149,7 @@ function LogWindow(props: IProps): React.ReactElement {
</Box>
</ResizableBox>
</Paper>
</div>
</Paper>
</Draggable>
);