-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
wip: class diagram cardinality display #705
Conversation
Pull Request Test Coverage Report for Build 685
💛 - Coveralls |
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.
various thoughts I had during development
const nextPoint = path.points[1] | ||
|
||
let direction = {x: nextPoint.x - p.x, y: nextPoint.y - p.y} | ||
normalize(direction, 10) |
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.
That 10
is not an ideal amount, it should be less if direction is heading UP.
I don't know if we have control on font too, it would break if we have.
|
||
let direction = {x: nextPoint.x - p.x, y: nextPoint.y - p.y} | ||
normalize(direction, 10) | ||
const offsettedPoint = {x: p.x + direction.x, y: p.y + direction.y} |
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.
Only this direction might not be enough, we might want to offset even more if that end of the relation has a type (aggregation/composition, etc)
Also, we might want to avoid writing text over the edge/path of the relation.
Any chance to merge this superb pull request ? ;-) |
Thanks for the support. As much as I’d like something like this merged, I insist that there are quite some problems with that first proposition, text is overlapping with existing nodes, so the end result is not clean. If anyone is interested in improving the pull request, or describing in detail the expected behaviour, go for it. I think I won’t be working on that pull request anymore. |
Merging! Thanks! |
Bumps [prettier](https://github.com/prettier/prettier) from 2.5.1 to 2.6.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](prettier/prettier@2.5.1...2.6.0) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Hello,
This Pull Request is intended to start a discussion on how to tackle the problem of cardinality within mermaid.
See #602