Skip to content

Commit e579551

Browse files
justinsisleybkrem
authored andcommitted
Ensure nodes render over their links on Z-axis (#29); closes #26
1 parent 7477fd0 commit e579551

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/Tree/index.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,17 @@ export default class Tree extends React.Component {
279279
className="rd3t-g"
280280
transform={`translate(${translate.x},${translate.y})`}
281281
>
282+
{links.map((linkData) =>
283+
<Link
284+
key={uuid.v4()}
285+
orientation={orientation}
286+
pathFunc={pathFunc}
287+
linkData={linkData}
288+
transitionDuration={transitionDuration}
289+
styles={styles.links}
290+
/>
291+
)}
292+
282293
{nodes.map((nodeData) =>
283294
<Node
284295
key={nodeData.id}
@@ -293,17 +304,6 @@ export default class Tree extends React.Component {
293304
styles={styles.nodes}
294305
/>
295306
)}
296-
297-
{links.map((linkData) =>
298-
<Link
299-
key={uuid.v4()}
300-
orientation={orientation}
301-
pathFunc={pathFunc}
302-
linkData={linkData}
303-
transitionDuration={transitionDuration}
304-
styles={styles.links}
305-
/>
306-
)}
307307
</TransitionGroup>
308308
</svg>
309309
</div>

0 commit comments

Comments
 (0)