mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 06:37:56 +01:00
Fix relationship style.
This commit is contained in:
parent
8061bd375a
commit
d65b604a7e
@ -47,10 +47,7 @@ class Relationship extends ConnectionLine {
|
|||||||
private _model: RelationshipModel;
|
private _model: RelationshipModel;
|
||||||
|
|
||||||
constructor(sourceNode: Topic, targetNode: Topic, model: RelationshipModel) {
|
constructor(sourceNode: Topic, targetNode: Topic, model: RelationshipModel) {
|
||||||
$assert(sourceNode, 'sourceNode can not be null');
|
super(sourceNode, targetNode, LineType.THIN_CURVED);
|
||||||
$assert(targetNode, 'targetNode can not be null');
|
|
||||||
|
|
||||||
super(sourceNode, targetNode);
|
|
||||||
this._model = model;
|
this._model = model;
|
||||||
|
|
||||||
const strokeColor = Relationship.getStrokeColor();
|
const strokeColor = Relationship.getStrokeColor();
|
||||||
|
@ -134,7 +134,7 @@ class CurvedLinePeer extends ElementPeer {
|
|||||||
|
|
||||||
setWidth(value) {
|
setWidth(value) {
|
||||||
this._width = value;
|
this._width = value;
|
||||||
if (this._width >= 1) {
|
if (this._width > 1) {
|
||||||
this._style.fill = this._fill;
|
this._style.fill = this._fill;
|
||||||
} else {
|
} else {
|
||||||
this._fill = this._style.fill;
|
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 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 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);
|
this._native.setAttribute('d', path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user