diff --git a/app/web/src/nova/ed/ed-left.tsx b/app/web/src/nova/ed/ed-left.tsx index a76e0a41..22076b90 100644 --- a/app/web/src/nova/ed/ed-left.tsx +++ b/app/web/src/nova/ed/ed-left.tsx @@ -2,7 +2,8 @@ import { getBackendOptions } from "@minoru/react-dnd-treeview"; import { DndProvider } from "react-dnd"; import { HTML5Backend } from "react-dnd-html5-backend"; import { useGlobal, useLocal } from "web-utils"; -import { EDGlobal } from "./logic/ed-global"; +import { active, EDGlobal } from "./logic/ed-global"; +import { treeRebuild } from "./logic/tree/build"; import { EdApi } from "./panel/header/left/api"; import { EdSiteJS } from "./panel/header/left/js"; import { EdSitePicker } from "./panel/header/left/site-picker"; @@ -10,7 +11,6 @@ import { EdTreeBody } from "./panel/tree/body"; import { EdPageHistoryBtn } from "./panel/tree/history-btn"; import { EdPageHistoryList } from "./panel/tree/history-list"; import { EdTreeSearch } from "./panel/tree/search"; -import { treeRebuild } from "./logic/tree/build"; export const EdLeft = () => { const p = useGlobal(EDGlobal, "EDITOR"); @@ -84,6 +84,15 @@ export const EdLeft = () => { ref={(ref) => { if (ref) local.tree = ref; }} + onPointerMove={() => { + active.hover.tree = true; + }} + onPointerOut={() => { + active.hover.tree = false; + }} + onPointerLeave={() => { + active.hover.tree = false; + }} > {p.page.history.show ? ( diff --git a/app/web/src/nova/ed/panel/tree/body.tsx b/app/web/src/nova/ed/panel/tree/body.tsx index 481f0bb1..2ad059f9 100644 --- a/app/web/src/nova/ed/panel/tree/body.tsx +++ b/app/web/src/nova/ed/panel/tree/body.tsx @@ -35,18 +35,7 @@ export const EdTreeBody = () => { if (tree.length === 0) return ( -
{ - active.hover.tree = true; - }} - onPointerOut={() => { - active.hover.tree = false; - }} - onPointerLeave={() => { - active.hover.tree = false; - }} - > +
{ setTimeout(() => { - let i = 0; - const ival = setInterval(() => { - const div = document.querySelector( - `.tree-${active.item_id}` - ) as HTMLDivElement; - if (div) { - if (!active.hover.tree) div.scrollIntoView(); - } - if (i > 7) clearInterval(ival); - i++; - }, 30); + // let i = 0; + // const ival = setInterval(() => { + const div = document.querySelector( + `.tree-${active.item_id}` + ) as HTMLDivElement; + if (div) { + if (!active.hover.tree) div.scrollIntoView(); + } + // if (i > 7) clearInterval(ival); + // i++; + // }, 30); }, 100); };