Merge branch 'features' of github.com:projectstorm/react-diagrams into features

This commit is contained in:
Dylan Vorster
2023-01-24 17:08:12 -07:00

View File

@@ -58,11 +58,8 @@ export class DefaultLinkWidget extends React.Component<DefaultLinkProps, Default
!this.props.link.isLocked() &&
this.props.link.getPoints().length - 1 <= this.props.diagramEngine.getMaxNumberPointsPerLink()
) {
const point = new PointModel({
link: this.props.link,
position: this.props.diagramEngine.getRelativeMousePoint(event)
});
this.props.link.addPoint(point, index);
const position = this.props.diagramEngine.getRelativeMousePoint(event);
const point = this.props.link.point(position.x, position.y, index);
event.persist();
event.stopPropagation();
this.forceUpdate(() => {