Fix relationship style.

This commit is contained in:
Paulo Gustavo Veiga 2023-01-07 00:24:09 -08:00
parent 8061bd375a
commit d65b604a7e
2 changed files with 3 additions and 6 deletions

View File

@ -47,10 +47,7 @@ class Relationship extends ConnectionLine {
private _model: RelationshipModel;
constructor(sourceNode: Topic, targetNode: Topic, model: RelationshipModel) {
$assert(sourceNode, 'sourceNode can not be null');
$assert(targetNode, 'targetNode can not be null');
super(sourceNode, targetNode);
super(sourceNode, targetNode, LineType.THIN_CURVED);
this._model = model;
const strokeColor = Relationship.getStrokeColor();

View File

@ -134,7 +134,7 @@ class CurvedLinePeer extends ElementPeer {
setWidth(value) {
this._width = value;
if (this._width >= 1) {
if (this._width > 1) {
this._style.fill = this._fill;
} else {
this._fill = this._style.fill;
@ -157,7 +157,7 @@ class CurvedLinePeer extends ElementPeer {
const curveP5 = CurvedLinePeer._pointToStr(this._control1.x + this._x1, this._control1.y + this._y1 + this.getWidth() * 0.7);
const curveP6 = CurvedLinePeer._pointToStr(this._x1, this._y1 + this.getWidth() / 2);
const path = `M${moveTo} C${curveP1} ${curveP2} ${curveP3} ${this.getWidth() >= 1 ? ` ${curveP4} ${curveP5} ${curveP6} Z` : ''}`;
const path = `M${moveTo} C${curveP1} ${curveP2} ${curveP3} ${this.getWidth() > 1 ? ` ${curveP4} ${curveP5} ${curveP6} Z` : ''}`;
this._native.setAttribute('d', path);
}
}