Skip to content

Support per node styling #14

Description

@GiantRobato

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I'm using dependentree to visualize dependencies but sometimes a dependency fails. It would be helpful for me to color those dependencies separately from the other nodes.

Describe the solution you'd like
Add in the constructor a way to specify a field to look for if you want to override the default node color. Example:

// js
const tree = new DependenTree("div#tree", {
      overrideColorField : "_color"
    });


// json
[
    {
        "_name": "Component",
        "_deps": [
            "Extension 1",
            "Extension 2"
        ],
       "_color": "red"
    }
]

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions