fix
This commit is contained in:
parent
f0af063c9c
commit
86808327ae
File diff suppressed because one or more lines are too long
|
|
@ -74,7 +74,7 @@ const target = {
|
|||
|
||||
export const active = {
|
||||
should_render_main: true,
|
||||
hover: { id: "" },
|
||||
hover: { id: "", tree: false },
|
||||
scope: {} as any,
|
||||
script_nav: {
|
||||
list: [] as {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,18 @@ export const EdTreeBody = () => {
|
|||
|
||||
if (tree.length === 0)
|
||||
return (
|
||||
<div className="flex py-[100px] select-none justify-center flex-1">
|
||||
<div
|
||||
className="flex py-[100px] select-none justify-center flex-1"
|
||||
onPointerMove={() => {
|
||||
active.hover.tree = true;
|
||||
}}
|
||||
onPointerOut={() => {
|
||||
active.hover.tree = false;
|
||||
}}
|
||||
onPointerLeave={() => {
|
||||
active.hover.tree = false;
|
||||
}}
|
||||
>
|
||||
<div className="flex flex-col items-center">
|
||||
<img
|
||||
draggable={false}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export const scrollTreeActiveItem = () => {
|
|||
`.tree-${active.item_id}`
|
||||
) as HTMLDivElement;
|
||||
if (div) {
|
||||
div.scrollIntoView();
|
||||
if (!active.hover.tree) div.scrollIntoView();
|
||||
}
|
||||
if (i > 7) clearInterval(ival);
|
||||
i++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue