Skip to content

Commit

Permalink
chore: 기존 커밋 메시지 안내 텍스트 요소 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
yunchaehyun committed Dec 13, 2023
1 parent f6d4445 commit 9785bee
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
20 changes: 0 additions & 20 deletions packages/frontend/src/components/graph/Graph.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ function renderD3(svgRef: RefObject<SVGGElement>, data: InitialDataProps[]) {
const svg = d3.select(svgRef.current);

if (!parsedData.length) {
svg.select("#text").selectAll("*").remove();
svg.select("#link").selectAll("*").remove();
svg.select("#node").selectAll("*").remove();
return;
Expand All @@ -45,24 +44,6 @@ function renderD3(svgRef: RefObject<SVGGElement>, data: InitialDataProps[]) {
const treeData = treeLayout(rootNode);
fillColor(treeData);

// Add text next to each node
svg
.select("#text")
.selectAll("text")
.data(treeData.descendants())
.join(
(enter) => enter.append("text").style("opacity", 0),
(update) => update,
(exit) =>
exit.transition().duration(DURATION).style("opacity", 0).remove(),
)
.text((d) => d.data.message)
.attr("x", (d) => d.x + 20)
.attr("y", (d) => d.y + 5)
.transition()
.duration(DURATION)
.style("opacity", 1);

additionalLinks.forEach(({ id, parentId }) => {
const sourceNode = treeData.descendants().filter((d) => d.id === id)[0];
const targetNode = treeData
Expand Down Expand Up @@ -138,7 +119,6 @@ export function Graph({ data, className = "" }: GraphProps) {
<g ref={gRef} transform="translate(100,70)">
<g id="link" />
<g id="node" />
<g id="text" />
</g>
</svg>
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/graph/renderTooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface TooltipProps {
}

export default function renderTooltip(
svg,
svg: d3.Selection<SVGGElement | null, unknown, null, undefined>,
d: d3.HierarchyPointNode<InitialDataProps>,
) {
const tooltipStyle = {
Expand Down

0 comments on commit 9785bee

Please sign in to comment.