mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-06-25 23:03:15 +00:00
Improve appearance of railroad arrows
This commit is contained in:
parent
53953399c3
commit
6842a354ea
|
@ -373,8 +373,10 @@ var temp = (function(options) {
|
||||||
/* TiddlyWiki: code added */
|
/* TiddlyWiki: code added */
|
||||||
if(this.wantArrow) {
|
if(this.wantArrow) {
|
||||||
var arrowSize = Diagram.ARC_RADIUS/2;
|
var arrowSize = Diagram.ARC_RADIUS/2;
|
||||||
|
// Compensate for the illusion that makes the arrow look unbalanced if it's too close to the curve below it
|
||||||
|
var multiplier = (distanceFromY < arrowSize*5) ? 1.2 : 1;
|
||||||
Path(x-arrowSize, y+distanceFromY/2 + arrowSize/2, {class:"arrow"}).
|
Path(x-arrowSize, y+distanceFromY/2 + arrowSize/2, {class:"arrow"}).
|
||||||
line(arrowSize, -arrowSize).line(arrowSize, arrowSize).addTo(this);
|
line(arrowSize, -arrowSize).line(arrowSize*multiplier, arrowSize).addTo(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user