Skip to content

Commit

Permalink
Component | Chord Diagram | Fix inconsistent transitions
Browse files Browse the repository at this point in the history
#0
reb-dev committed Feb 27, 2024
1 parent 1dae778 commit 851d8f9
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/ts/src/components/chord-diagram/modules/label.ts
Original file line number Diff line number Diff line change
@@ -104,6 +104,7 @@ export function updateLabel<N extends ChordInputNode, L extends ChordInputLink>
label.selectAll('textPath').remove()

label.text(d => getString(d.data, nodeLabel))
.style('transition', `fill ${duration}ms`)
.style('fill', d => getColor(d.data, nodeLabelColor) ?? getLabelFillColor(d, config))
.style('text-anchor', d => getLabelTextAnchor(d, config))
.each((d: ChordNode<N>, i: number, elements) => {
2 changes: 1 addition & 1 deletion packages/ts/src/components/chord-diagram/modules/link.ts
Original file line number Diff line number Diff line change
@@ -69,7 +69,7 @@ export function updateLink<N extends ChordInputNode, L extends ChordInputLink> (
duration: number
): void {
selection
.style('transition', `fill-opacity: ${duration}ms`)
.style('transition', `fill ${duration}ms`)
.style('fill', d => getColor(d.data, config.linkColor))
.style('stroke', d => getColor(d.data, config.linkColor))

0 comments on commit 851d8f9

Please sign in to comment.