Skip to content
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

Support for dotted links #26

Closed
Anachron opened this issue Dec 2, 2014 · 16 comments
Closed

Support for dotted links #26

Anachron opened this issue Dec 2, 2014 · 16 comments
Labels

Comments

@Anachron
Copy link

Anachron commented Dec 2, 2014

Sometimes it would be really useful to use dotted links to specify a weak link or temporary break.
Syntax could be:
A-.->B;

@knsv
Copy link
Collaborator

knsv commented Dec 2, 2014

I like the idea and I like the syntax!

@knsv knsv added Type: Enhancement New feature or request Contributor needed labels Dec 2, 2014
@your-a-git
Copy link

What is the intent for this content? sounds like fun :)

@Anachron
Copy link
Author

Anachron commented Dec 3, 2014

For example a class hirarchy which shows abstract classes which inherit from their "real" parents.

Or a Workflow where one path is temporary unused. (Business logic could be changing or defect)

How about a organisation diagram which shows temporary workers as weak links?

There are so many use cases.

@cerdman
Copy link

cerdman commented Dec 3, 2014

I've got a proposed solution for this. Funny thing is I figured out how to add the requisite lexer/linkStatement definitions, get passing tests for A-.->B, A-.-B, A-.-xB etc.

For the life of me, I cannot figure out how to add the stroke-dasharray property to the <path> in <edgePath... It has to be a property, can't do it using style alone (according to w3 schools svg stroke).

If you can let me know where to put that in main.js or in sequenceRenderer.js functions like setClass etc. I will submit a PR for review.

@knsv
Copy link
Collaborator

knsv commented Dec 3, 2014

look in main.js in the addEdges function (row 110+). There some styles are applied. Perhaps you could apply the styles for the dotted line there.
Good luck.

@peacemaker1995
Copy link

Hey I'm new here

@knsv
Copy link
Collaborator

knsv commented Dec 5, 2014

Hello @peacemaker1995 welcome.

@cerdman
Copy link

cerdman commented Dec 5, 2014

@knsv - I tried that one actually - the issue is that it needs to have the the property stroke-dasharray - added (not modify the property style or class) so I think this requires something with the d3dagre methods - I just am not sure how or where to implement.

@Mercurius3
Copy link

In order to create dotted lines, you can try this:

linkStyle 0 stroke:#000,fill:none,stroke-width:2px,stroke-dasharray:3;

This turns the first link into a dotted line (it targets links using linkStyle: counting starts from 0): I have not been able to attach a class to a linkStyle yet.

mermaiddottedline

@knsv
Copy link
Collaborator

knsv commented Dec 8, 2014

Thats a good point. You can create dotted lines today by using code like the one provided by @Mercurius3. The dot notation would be a shortcut. simpler notation for a similar rendering.

@Anachron, you could apply styling as the one above when rendering the dotted links found during parsing.

@knsv
Copy link
Collaborator

knsv commented Dec 9, 2014

@cerdman How are things progressing? Still stuck? If you want I could fix the style if you commit the grammar update. If you want to continue that is fine too!

@knsv
Copy link
Collaborator

knsv commented Jan 10, 2015

Will look at this now

knsv added a commit that referenced this issue Jan 10, 2015
@knsv
Copy link
Collaborator

knsv commented Jan 10, 2015

An implementation for this is in place and will be included in next release. The solution uses the following syntax:

dotted link: 
-.->

dotted link with text: 
-. text .-> 

thick link: 
==>

think link with text: 
== text ==> 

@cerdman
Copy link

cerdman commented Jan 10, 2015

hey @knsv - yep sorry just saw this - that is as far as I got (grammar/syntax) and was pretty much the same - how did you get the style figured out?

@knsv
Copy link
Collaborator

knsv commented Jan 11, 2015

Fixed with release 0.3.2

@knsv knsv closed this as completed Jan 11, 2015
@Anachron
Copy link
Author

Awesome, thanks! @knsv

knsv pushed a commit that referenced this issue Aug 13, 2020
knsv pushed a commit that referenced this issue Aug 4, 2021
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.14.6 to 7.14.8.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.14.8/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants