-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
x: (start.x + (end.x - start.x) / 2), | ||
y: (start.y + (end.y - start.y) / 2) | ||
x: (start.x + (end.x - start.x) / 4), | ||
y: (start.y + (end.y - start.y) / 4) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain why this changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there are only 2 points in the path the arrows would go in the middle on top of one another. This just positions them better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see, thanks.
@justinvdm Do you mean something like this? |
@andreit I was thinking more something like function midpoint(a, b) {
// calculate midpoint of a and b
} What's there now works, but I'm thinking that a util that just takes two points and calculates midpoint will help because I remember other places in the code where we are doing midpoint calculates (unless I'm remembering wrong), so we could remove that repetition with some reusable util. |
@justinvdm Ok cool, where do you think this should live? |
@andreit |
@justinvdm shall I make a |
@andreit sounds good |
@justinvdm Does this look better? |
@andreit Yup. I meant we should actually use this in all the places we are calculating midpoints though. For example, the connection layout and its tests. |
@justinvdm I can't really see any other place where we calculate a midpoint given 2 points... am I missing something? |
@justinvdm There seems to be an issue with running karma on node 0.11.14 (karma-runner/karma#1182), which is why Travis is complaining. |
…om/praekelt/go-proto-fsm into feature/issue-33-no-control-points
No breakpoints by default on a line
Instead of including three break points by default on a line, instead have no line break points as the default, and instead enable the user to add break points by double clicking on the line.