New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labels to links #142

Merged
merged 7 commits into from Jan 20, 2018

Conversation

Projects
None yet
3 participants
@klauspaiva
Copy link
Contributor

klauspaiva commented Jan 18, 2018

Checklist

  • The code has been run through pretty yarn run pretty
  • The tests pass on CircleCI
  • You have referenced the issue(s) or other PR(s) this fixes/relates-to
  • The PR Template has been filled out (see below)
  • Had a beer because you are awesome

What?

Introduces the functionality to add a plain text label to links.
Following the discussion from: #140

Why?

Especially useful when you're implementing something like a state machine.

How?

The initial plan was to use SVG's textPath, but it then follows the orientation of the referenced path, which makes text incredibly hard to read.

Achieved the desired result by using a combination of getPointAtLength and getTotalLength.
Implementation had to account for multiple segments (paths), which made the algorithm slightly more complex to follow, but still simple enough.

Feel-Good "programming lol" image:

3653705_orig
Source: http://codingatschool.weebly.com/programming-project.html

@dylanvorster dylanvorster merged commit 266eb85 into projectstorm:master Jan 20, 2018

1 check passed

ci/circleci Your tests passed on CircleCI!
Details
@emero

This comment has been minimized.

Copy link

emero commented Feb 23, 2018

@dylanvorster would it be possible to release a version that has these commits? 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment