Skip to content

Conversation

@klauspaiva
Copy link
Contributor

@klauspaiva 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
@emero
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants