Skip to content

Commit

Permalink
Avoid inheritance arrow to be place behind asset box
Browse files Browse the repository at this point in the history
  • Loading branch information
Davmelle committed Sep 25, 2020
1 parent 4589add commit 28b9bfd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions resources/script-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,15 @@ function ticked() {
var y1 = d.subAsset.y + (30 * d.subAsset.children.length + 40)/2
var x2 = d.superAsset.x
var y2 = d.superAsset.y + (30 * d.superAsset.children.length + 40)/2

if(d.subAsset.y < d.superAsset.y) {
y1 += (30 * d.subAsset.children.length + 40)/2
y2 -= (30 * d.superAsset.children.length + 40)/2
} else if(d.subAsset.y > d.superAsset.y) {
y1 -= (30 * d.subAsset.children.length + 40)/2
y2 += (30 * d.superAsset.children.length + 40)/2
}

var xm = (x2-x1)/2 + x1
var ym = (y2-y1)/2 + y1
return "" + x1 + "," + y1 + " " +
Expand Down

0 comments on commit 28b9bfd

Please sign in to comment.