Skip to content

Commit

Permalink
Fix phase display bug in Chrome
Browse files Browse the repository at this point in the history
This fixes a bug where the moon displayed as full when First or Third
quarter was selected from the dropdown in Chrome.
  • Loading branch information
nikolas authored Feb 6, 2019
1 parent bec61a0 commit 1472838
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/MoonPhaseView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export default class MoonPhaseView extends React.Component {
rightShade.scale.x = scale;
rightShade.position.x = this.center.x - (scale * this.center.x);

if (phase >= 0.25) {
if (phase > 0.25) {
this.hiddenMoon.mask = this.rightShade;
this.hiddenMoon.visible = true;
} else {
Expand All @@ -127,7 +127,7 @@ export default class MoonPhaseView extends React.Component {
rightShade.scale.x = 1;
rightShade.position.x = 0;

if (phase <= 0.75) {
if (phase < 0.75) {
this.hiddenMoon.mask = this.leftShade;
this.hiddenMoon.visible = true;
leftShade.scale.x = -scale;
Expand Down

0 comments on commit 1472838

Please sign in to comment.