1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 10:29:54 +00:00

Reduce size of railroad arrows

This commit is contained in:
Astrid Elocson 2015-01-12 23:07:11 +00:00
parent 2d86d8e47d
commit 34983dd874

View File

@ -345,12 +345,8 @@ var temp = (function(options) {
this.up = this.item.up;
this.down = Math.max(Diagram.ARC_RADIUS*2, this.item.down + Diagram.VERTICAL_SEPARATION + this.rep.up + this.rep.down);
/* TiddlyWiki: code added, including moving calculation of distanceFromY (of the repeat arc) to here */
/* TiddlyWiki: moved calculation of distanceFromY (of the repeat arc) to here */
this.distanceFromY = Math.max(Diagram.ARC_RADIUS*2, this.item.down+Diagram.VERTICAL_SEPARATION+this.rep.up);
if(this.wantArrow && this.distanceFromY < Diagram.ARC_RADIUS*3) {
this.distanceFromY += Diagram.ARC_RADIUS/2;
this.down += Diagram.ARC_RADIUS/2;
}
}
subclassOf(OneOrMore, FakeSVG);
OneOrMore.prototype.needsSpace = true;
@ -376,7 +372,7 @@ var temp = (function(options) {
/* TiddlyWiki: code added */
if(this.wantArrow) {
var arrowSize = 2/3 * Diagram.ARC_RADIUS;
var arrowSize = Diagram.ARC_RADIUS/2;
Path(x-arrowSize, y+distanceFromY/2 + arrowSize/2, {class:"arrow"}).
line(arrowSize, -arrowSize).line(arrowSize, arrowSize).addTo(this);
}