You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Android Studio, ctrl + click on the FruchtermanReingoldAlgorithm entry in your code. This one, that is on screenshot:
You will arrive at the dartfile for this algorythm. Scroll own below to find the block on screenshot below or search for ArrowEdgeRenderer. ctrl + click on the found entry.
You will arrive at the dartfile for arrow renderer. Now search for function drawTriangle, it will look like on the screenshot:
Inside the function find line canvas.drawPath(trianglePath, paint); above the comment and make it a comment, like on a screenshot:
Then scroll a little down and look at the line var triangleCentroid = [x, y];. Change [x, y] to [x2, y2], so it will look like at the screenshot below:
Recompile the app and enjoy your new looks.
Comparison
Here's how it looks without arrows:
And here's with default arrows:
Explanation
When plugin draws Arrow to the node, it draws the arrow, calculates the arrow center (x, y moment) and passes it back to the function that will draw line to the center of the triangle. So removing drawPath we make the plugin not draw arrow head, and by changing x,y (center of the head) to x2, y2 (top arrow point, the one that points toward the node) we make it not draw the triangle and then draw the line to the point that would be the top of the truangle.
Reasons
I have a lot of Nodes, and they usually all originate from one single Node. Having circular formation of Nodes was hard, since they all overlapped
Thus I had to make them smaller, but arrows are not scaled this way. I wasn't able to find easier way, so I had to change the extension to fit my needs.
I did other changes in the process of making nodes smaller, I will try to make guides for each of them.
Any comments on how to make it more effective are welcome.
The text was updated successfully, but these errors were encountered:
Alright, to be honest this is a pretty easy fix.
Steps
In Android Studio,
ctrl
+ click on the FruchtermanReingoldAlgorithm entry in your code. This one, that is on screenshot:You will arrive at the dartfile for this algorythm. Scroll own below to find the block on screenshot below or search for
ArrowEdgeRenderer
.ctrl
+ click on the found entry.You will arrive at the dartfile for arrow renderer. Now search for function
drawTriangle
, it will look like on the screenshot:Inside the function find line
canvas.drawPath(trianglePath, paint);
above the comment and make it a comment, like on a screenshot:Then scroll a little down and look at the line
var triangleCentroid = [x, y];
. Change[x, y]
to[x2, y2]
, so it will look like at the screenshot below:Recompile the app and enjoy your new looks.
Comparison
Here's how it looks without arrows:
And here's with default arrows:
Explanation
When plugin draws Arrow to the node, it draws the arrow, calculates the arrow center (x, y moment) and passes it back to the function that will draw line to the center of the triangle. So removing
drawPath
we make the plugin not draw arrow head, and by changing x,y (center of the head) to x2, y2 (top arrow point, the one that points toward the node) we make it not draw the triangle and then draw the line to the point that would be the top of the truangle.Reasons
I have a lot of Nodes, and they usually all originate from one single Node. Having circular formation of Nodes was hard, since they all overlapped
Thus I had to make them smaller, but arrows are not scaled this way. I wasn't able to find easier way, so I had to change the extension to fit my needs.
I did other changes in the process of making nodes smaller, I will try to make guides for each of them.
Any comments on how to make it more effective are welcome.
The text was updated successfully, but these errors were encountered: