Skip to content

Commit

Permalink
Set opacity on individual charge nodes instead of the shared image, see
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Feb 13, 2021
1 parent 24888bc commit 62d1650
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/view/ChargeNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class ChargeNode extends Node {

const opacity = Utils.linear( 0.015, CONVENTIONAL_CHARGE_THRESHOLD, 1, 0, Math.abs( charge.circuitElement.currentProperty.get() ) );
const clampedOpacity = Utils.clamp( opacity, 0, 1 );
this.children[ 0 ].setImageOpacity( clampedOpacity );
this.setOpacity( clampedOpacity );
}
else {

Expand Down

0 comments on commit 62d1650

Please sign in to comment.