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

Copy-pasting a node with implicit attributes may differ visually from the copied node #282

Open
magjac opened this issue Feb 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@magjac
Copy link
Owner

magjac commented Feb 18, 2024

The reason is

  1. Only the copied node's explicit attributes are added to the pasted node
  2. The new node is inserted in the DOT source at the end of the graph where the implicit node attributes may be different than at the place in the DOT source where the copied node is defined.

Example

Initial DOT source

digraph {
    node [style=filled]
    node [fillcolor=red]
    
    a [color=blue]
    
    node [fillcolor=green shape=box]
    
}

Initial graph

image

DOT source after copy-paste of node a

digraph {
    node [style=filled]
    node [fillcolor=red]
    
    a [color=blue]
    
    node [fillcolor=green shape=box]
    
    n1 [ color=blue]
}

Graph after copy-paste of node a

image

@magjac
Copy link
Owner Author

magjac commented Feb 18, 2024

A solution could be to insert the new node in the same DOT source context as where the copied node is defined.

@magjac magjac added the bug Something isn't working label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant