Skip to content

Commit

Permalink
Merge pull request #3274 from cytoscape/fix/bug3267
Browse files Browse the repository at this point in the history
initialize edgeType when calling getSegmentPoints or getControlPoints
  • Loading branch information
mikekucera authored Oct 9, 2024
2 parents bce954c + a0417ac commit b1ac515
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1014,22 +1014,22 @@ function getPts( pts ){

BRp.getSegmentPoints = function( edge ){
let rs = edge[0]._private.rscratch;
let type = rs.edgeType;

this.recalculateRenderedStyle( edge );

let type = rs.edgeType;
if( type === 'segments' ){
this.recalculateRenderedStyle( edge );

return getPts( rs.segpts );
}
};

BRp.getControlPoints = function( edge ){
let rs = edge[0]._private.rscratch;
let type = rs.edgeType;

this.recalculateRenderedStyle( edge );

let type = rs.edgeType;
if( type === 'bezier' || type === 'multibezier' || type === 'self' || type === 'compound' ){
this.recalculateRenderedStyle( edge );

return getPts( rs.ctrlpts );
}
};
Expand Down

0 comments on commit b1ac515

Please sign in to comment.