Skip to content

Commit

Permalink
[Visualization] Fixed bug in reaction forces coloring
Browse files Browse the repository at this point in the history
  • Loading branch information
arpastrana committed Sep 20, 2023
1 parent f8434d8 commit b350021
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/jax_fdm/visualization/artists/network_artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ def __init__(self,
self.edge_color = edgecolor

self.load_color = loadcolor or self.default_loadcolor

if edgecolor == "force":
self.default_reactioncolor = Color.from_rgb255(0, 150, 10)
self.reaction_color = reactioncolor or self.default_reactioncolor

self.load_scale = loadscale or self.default_loadscale
Expand Down
2 changes: 1 addition & 1 deletion src/jax_fdm/visualization/viewers/network_artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def add_reactions(self):
reactions = {}

for node, arrow in self.collection_reactions.items():
obj = self.add_reaction(arrow, self.default_reactioncolor)
obj = self.add_reaction(arrow, self.reaction_color)
reactions[node] = obj

return reactions
Expand Down

0 comments on commit b350021

Please sign in to comment.