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

Color map prevents other color options #20

Open
adamocarolli opened this issue Dec 22, 2020 · 0 comments
Open

Color map prevents other color options #20

adamocarolli opened this issue Dec 22, 2020 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@adamocarolli
Copy link
Contributor

adamocarolli commented Dec 22, 2020

Using a color set should not prevent using color options in layer data (ie. rgb values or hex codes).

// Passing in color mapping here 
const colors = [
    '#5e81ac',
    '#d08770',
    '#ebcb8b',
    '#81a1c1',
];
new GraferController(canvas, { points, colors layers });

// Prevents ability to change colors in layer data without using mapping
layer.edges.data.push(Object.assign({}, edge, {
    sourceColor: '#ebcb8b',
    targetColor: '#ebcb8b',
}));
@adamocarolli adamocarolli changed the title Color sets prevent using other color options Color map prevents other color options Dec 22, 2020
@adamocarolli adamocarolli added bug Something isn't working good first issue Good for newcomers labels Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant