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

Make link end marker's width and height configurable #238

Closed
danielcaldas opened this issue Sep 30, 2019 · 2 comments
Closed

Make link end marker's width and height configurable #238

danielcaldas opened this issue Sep 30, 2019 · 2 comments
Labels
enhancement improving existent functionality or performance related feature request Hacktoberfest Hacktoberfest label priority low

Comments

@danielcaldas
Copy link
Owner

Is your feature request related to a problem? Please describe.
Currently there is no way for users to specify the width and the height of link's [marker[(https://developer.mozilla.org/en-US/docs/Web/SVG/Element/marker)'s elements. As you can see in our codebase, this values are hardcoded, see for yourself in src/components/marker/Marker.jsx.

<marker
    className="marker"
    id={this.props.id}
    viewBox="0 -5 10 10"
    refX={this.props.refX}
    refY="0"
    markerWidth="6"           // width
    markerHeight="6"          // height
    orient="auto"
    fill={this.props.fill}
>

Describe the solution you'd like
The propriate solution here would be for the library to expose this as a link-level configurable value.

So basically, extend the existent functionalities in src/components/graph/graph.config.js adding two new properties:

// ...
link: {
    // ...
    markerWidth: 6,
    markerHeight: 6,
    // ...
}
// ...

Additional context
Changing marker's width and height, impact.

markers

@danielcaldas danielcaldas added enhancement improving existent functionality or performance related feature request Hacktoberfest Hacktoberfest label priority low labels Sep 30, 2019
@SachinVarghese
Copy link
Contributor

SachinVarghese commented Oct 5, 2019

@danielcaldas I would like to work on this. Can you explain how are these markers being rendered from SVG defs (using markerIds right)?

Edit: Alright I read through the codebase to figure stuff out. I will submit a PR soon. Please review

@danielcaldas
Copy link
Owner Author

Done in #245

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improving existent functionality or performance related feature request Hacktoberfest Hacktoberfest label priority low
Projects
None yet
Development

No branches or pull requests

2 participants