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

The edge style is wrong when dragging #4227

Closed
da-du opened this issue Apr 30, 2024 · 1 comment
Closed

The edge style is wrong when dragging #4227

da-du opened this issue Apr 30, 2024 · 1 comment

Comments

@da-du
Copy link

da-du commented Apr 30, 2024

Describe the Bug

I set the edge type to 'step', but when dragging, the edge is not of type 'step'

defaultEdgeOptions={{
      type: 'step',
      style: {
          stroke: theme.colors.pattern.text.secondary,
      },
      markerEnd: {
          type: MarkerType.ArrowClosed,
          width: 20,
          height: 20,
      },
  }}

image

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

1.set defaultEdgeOptions, type: 'step',
2.Create new connections between nodes

Expected behavior

The edge type is 'step'

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Chrome
  • Version: 123.0.6312.124

Additional context

No response

@bcakmakoglu
Copy link
Contributor

An edge and a connection line are two different things, hence why defaultEdgeOptions will not change the style/type of a connection line.
Edges are established connections between two nodes.
Connection Lines are lines that are drawn to establish a connection between two nodes (in other words, the connection has not yet been created).

There's a separate set of props for connection lines (besides using your own custom connection line).

In your case you would want to use something like this

<ReactFlow connectionLineType={ConnectionLineType.Step} connectionLineStyle={{ stroke: theme.colors.pattern.text.secondary, }} {...rest}>

@moklick moklick closed this as completed Apr 30, 2024
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

No branches or pull requests

3 participants