almende / vis

⚠️ This project is not maintained anymore! Please go to https://github.com/visjs
7.86k stars 1.48k forks source link

Shorthand option for edge color being ignored #4299

Open StrikeAgainst opened 5 years ago

StrikeAgainst commented 5 years ago

I'm using Vis network for my Typescript React project, and I'm having an issue with setting the color for edges. When I'm using the shorthand option like this:

edges: { color: '#0000ff' },

it will be ignored and inherit the color from the node border instead. Doing the longhand option works though:

edges: { color: { color: '#0000ff' } },

although this is too verbose in my opinion, having to set highlight color etc. individually as well. This issue goes for both global and local edge properties.

Just recently I switched from using react-vis-network (which uses vis version ^4.0.0 / 4.21.0) to directly using vis. This is when this issue started appearing, although react-vis-network doesn't alter any of the properties.

Is there anything known about this?

Tested with Google Chrome 74 on Windows 10. vis version is ^4.0.0 / 4.21.0.

Please tell me if there's any more code I need to provide. Thanks in advance.