Skip to content

edge-distances: endpoints #3157

Description

@maxkfranz

Description of new feature

What should the new feature do? For visual features, include an image/mockup of the expected output.

Sometimes, you may want to set the control point of an edge relative to the endpoints of the edge rather than the positions (i.e. centre points) of the source and target nodes.

To support this, we could add to the existing edge-distances property. This property already modifies how control points are calculated. Here, we would add a new value, edge-distances: endpoints. When set this way, the control points, segment points, etc. are calculated relative to the endpoints of the edge.

Edge cases to consider:

  • The endpoints might not be well specified already, based on the values of the other style properties.
    • Case: The endpoints are set explicitly. Everything works for edge-distances: endpoints.
    • Case: The endpoints are implicit, by default. That means for edge-distances: endpoints, they would be undefined. We need to decide what the behaviour here should be.
      • It shouldn't break things if set incorrectly, i.e. it should show something rather than just giving an error with no visual output. An edge with style not quite like you wanted is better than no edge.
      • It should have a warning.
      • Option: If the endpoints aren't set properly, then assume the default edge-distances: intersection instead.
      • Other options?
  • Other edge cases?

Motivation for new feature

Describe your use case for this new feature.

For instance:

edge-sketch

If you want an even edge like the second case, then you need the control point to be relative to the endpoints.

For reviewers

Reviewers should ensure that the following tasks are carried out for incorporated issues:

  • Ensure that the reporter has adequately described their idea. If not, elicit more information about the use case. You should iteratively build a spec together.
  • Ensure that the issue is a good fit for the core library. Some things are best done in extensions (e.g. UI-related features that aren't style-related). Some things are best done by app authors themselves -- instead of in Cytoscape libraries.
  • The issue has been associated with a corresponding milestone.
  • The commits have been incorporated into the unstable branch via pull request. The corresponding pull request is cross-referenced.

Activity

  1. maxkfranz commented on Aug 22, 2023

    @maxkfranz
    MemberAuthor

    @chrtannus, let me know what you think about this feature re. EM. Once we're satisfied with the specification, I can take a look at making a PR for this since you're already assigned on #3005.

  2. chrtannus commented on Aug 24, 2023

    @chrtannus
    Member

    This looks good. I guess this option will also work with Taxi edges, right?

  3. maxkfranz commented on Aug 24, 2023

    @maxkfranz
    MemberAuthor

    Taxis already support the edge-distances property, so adding a new value for edge-distances should apply to all edge types that support the property (taxi, bezier, etc.).

    For taxis, we'd then have to test to confirm that no other new properties would be necessary if you want to use them like the use case in the diagram above.

  4. stale commented on Sep 7, 2023

    @stale

    This issue has been automatically marked as stale, because it has not had activity within the past 14 days. It will be closed if no further activity occurs within the next 7 days. If a feature request is important to you, please consider making a pull request. Thank you for your contributions.

  5. added this to the 3.27.0 milestone on Sep 12, 2023
  6. self-assigned this
    on Sep 12, 2023
  7. maxkfranz commented on Sep 12, 2023

    @maxkfranz
    MemberAuthor

    PR up in #3163

  8. stale commented on Sep 26, 2023

    @stale

    This issue has been automatically marked as stale, because it has not had activity within the past 14 days. It will be closed if no further activity occurs within the next 7 days. If a feature request is important to you, please consider making a pull request. Thank you for your contributions.

  9. maxkfranz commented on Sep 28, 2023

    @maxkfranz
    MemberAuthor

    Closed by merging #3163

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions