diff --git a/packages/g6/src/item/edge.ts b/packages/g6/src/item/edge.ts index 2e7932164f5..33f16deeef2 100644 --- a/packages/g6/src/item/edge.ts +++ b/packages/g6/src/item/edge.ts @@ -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); }