Skip to content

Commit

Permalink
fix: fix incorrect label position on edges (#5234)
Browse files Browse the repository at this point in the history
Co-authored-by: yvonneyx <[email protected]>
  • Loading branch information
yvonneyx and yvonneyx authored Dec 8, 2023
1 parent 0a0dc61 commit 66a7580
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/g6/src/item/edge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ export default class Edge extends Item {
this.hide(false);
}
this.changedStates = [];

this.labelGroup.children
.filter((element) => element.attributes.dataIsLabel)
.forEach((shape) => (shape.attributes.dataOriginPosition = ''));

this.updateLabelPosition(true);
}

Expand Down

0 comments on commit 66a7580

Please sign in to comment.