Skip to content

Commit 13432b6

Browse files
committed
style: adjust tree indentation and add visual indicator for parent nodes
1 parent 366c785 commit 13432b6

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

src/react-obj-view/components/RenderNode.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export const RenderNode: React.FC<ObjectViewRenderRowProps> = (props) => {
9494
className="tree-indents">
9595
{nodeData.parents.slice(0, -1)
9696
.map(index => <span style={{ ['--indent-index' as any]: String(index) }}>
97-
{" "}
97+
{" "}
9898
</span>)
9999
}
100100
</span>

src/react-obj-view/components/style.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,17 @@
8888
--compare: calc(clamp(0, abs(var(--indent-index, -1) - var(--active-parent, -1)), 1));
8989
opacity: clamp(0.07, calc(1 - var(--compare)), 0.4);
9090
transition: opacity 0.3s;
91+
position: relative;
92+
display: inline-block;
93+
&:after {
94+
content: "";
95+
position: absolute;
96+
background-color: currentColor;
97+
left: 0.25em;
98+
width: 0.1em;
99+
top: -0em;
100+
bottom: -0em;
101+
}
91102
}
92103

93104
}

0 commit comments

Comments
 (0)