Skip to content
This repository has been archived by the owner on Mar 13, 2023. It is now read-only.

Allow to customize node font color in THEME #9

Closed
fraxken opened this issue Jun 12, 2022 · 1 comment
Closed

Allow to customize node font color in THEME #9

fraxken opened this issue Jun 12, 2022 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@fraxken
Copy link
Member

fraxken commented Jun 12, 2022

Current theme only allow to update the background color of the Node. However in LIGHT Theme it would be cool to also be able to update the font color for a dark one (for example).

Font color is customizable like the background color:

allNodes[connectedNodes[id]].color = this.colors.CONNECTED;
allNodes[connectedNodes[id]].font.color = "#000";

I guess a restructuration of COLORS constants is necessary:

SELECTED: {
  color: "#673AB7",
  font: {
    color: "#000"
  }
}

I think vis.js allow something like this:

allNodes[connectedNodes[id]].setOptions(this.colors.SELECTED);
@fraxken fraxken added enhancement New feature or request good first issue Good for newcomers labels Jun 12, 2022
@PierreDemailly
Copy link
Member

I'm on it

PierreDemailly added a commit to PierreDemailly/vis-network that referenced this issue Jun 20, 2022
fraxken added a commit that referenced this issue Jun 20, 2022
feat: allow tu customize node font color (#9)
@fraxken fraxken closed this as completed Jun 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants