Skip to content
This repository has been archived by the owner on Jun 19, 2018. It is now read-only.

No breakpoints by default on a line #33

Merged
merged 9 commits into from
Sep 26, 2014

Conversation

andreit
Copy link
Contributor

@andreit andreit commented Sep 22, 2014

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.

screen shot 2014-09-18 at 1 14 13 pm

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)
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see, thanks.

@andreit
Copy link
Contributor

andreit commented Sep 23, 2014

@justinvdm Do you mean something like this?

@justinvdm
Copy link
Contributor

@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.

@andreit
Copy link
Contributor

andreit commented Sep 25, 2014

@justinvdm Ok cool, where do you think this should live?

@justinvdm
Copy link
Contributor

@andreit public/js/src/services/utils.js seems like a good place for it, I think

@andreit
Copy link
Contributor

andreit commented Sep 25, 2014

@justinvdm shall I make a goUtils service?

@justinvdm
Copy link
Contributor

@andreit sounds good

@andreit
Copy link
Contributor

andreit commented Sep 25, 2014

@justinvdm Does this look better?

@justinvdm
Copy link
Contributor

@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.

@andreit
Copy link
Contributor

andreit commented Sep 25, 2014

@justinvdm I can't really see any other place where we calculate a midpoint given 2 points... am I missing something?

@andreit
Copy link
Contributor

andreit commented Sep 25, 2014

@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.

@justinvdm
Copy link
Contributor

@andreit the only other one I can find is here. I remember seeing more, but I must've been remembering wrong.

I've commented out our node 0.11 travis build, we can bring it back when karma#1182 is resolved.

Happy with this landing once we are using the util there and travis is happy.

andreit added a commit that referenced this pull request Sep 26, 2014
@andreit andreit merged commit 3b5dc11 into develop Sep 26, 2014
@andreit andreit deleted the feature/issue-33-no-control-points branch September 26, 2014 14:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants