fix: fix incorrect label position on edges (#5234)

Co-authored-by: yvonneyx <banxuan.zyx@antgroup.com>
This commit is contained in:
yvonneyx 2023-12-08 20:24:47 +08:00 committed by GitHub
parent 0a0dc61a88
commit 66a7580ea4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}