Skip to content

Commit e9de712

Browse files
committed
Removes redundant Link method
1 parent a07b457 commit e9de712

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/Link/index.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,7 @@ export default class Link extends React.PureComponent {
4545
`M${d.source.x},${d.source.y}V${d.target.y}H${d.target.x}`;
4646
}
4747

48-
collapsePath() {
49-
const { linkData, orientation, pathFunc } = this.props;
50-
const origin = { x: linkData.source.x, y: linkData.source.y };
51-
const pathDescriptor = { source: origin, target: origin };
52-
return pathFunc === 'diagonal'
53-
? this.diagonalPath(pathDescriptor, orientation)
54-
: this.elbowPath(pathDescriptor, orientation);
55-
}
56-
57-
expandPath() {
48+
drawPath() {
5849
const { linkData, orientation, pathFunc } = this.props;
5950
return pathFunc === 'diagonal'
6051
? this.diagonalPath(linkData, orientation)
@@ -67,7 +58,7 @@ export default class Link extends React.PureComponent {
6758
ref={(l) => { this.link = l; }}
6859
style={this.state.initialStyle}
6960
className="linkBase"
70-
d={this.expandPath()}
61+
d={this.drawPath()}
7162
/>
7263
);
7364
}

0 commit comments

Comments
 (0)