You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/app/components/StateRoute/History.tsx
+20-39Lines changed: 20 additions & 39 deletions
Original file line number
Diff line number
Diff line change
@@ -181,45 +181,41 @@ function History(props: Record<string, unknown>): JSX.Element {
181
181
`translate(${margin.left},${d3root.height===0 ? totalHeight/2 : margin.top})`,//Set the position of the group 'g' by translating it horizontally by 'margin.left' pixels and vertically based on the conditional expression.
182
182
);
183
183
184
-
constlink=g//responsible for rendering the links or connectors between the nodes in the d3 Tree
185
-
.selectAll('.link')// select all elements that contain the string '.link' and return a selection
//defines the path attribute (d) for each link (edge) between nodes, using a Bézier curve (C) to connect the source node's coordinates (d.x, d.y) to the midpoint between the source and target nodes and then to the target node's coordinates (d.parent.x, d.parent.y)
created popup div and appended it to display div(returned in this function)
220
218
221
-
D3 doesn't utilize z-index for priority, rather decides on placement by order of rendering needed to define the return div with a className to have a target to append to with the correct level of priority
222
-
*/
223
219
functionrenderToolTip(){
224
220
const[x,y]=d3.pointer(event);
225
221
constdiv=d3
@@ -268,10 +264,6 @@ function History(props: Record<string, unknown>): JSX.Element {
0 commit comments