From 14728386edad8a7758175b4952eff930f5418185 Mon Sep 17 00:00:00 2001 From: nikolas Date: Wed, 6 Feb 2019 14:33:23 -0500 Subject: [PATCH] Fix phase display bug in Chrome This fixes a bug where the moon displayed as full when First or Third quarter was selected from the dropdown in Chrome. --- lib/MoonPhaseView.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/MoonPhaseView.jsx b/lib/MoonPhaseView.jsx index 92e16b6..ee2ff30 100644 --- a/lib/MoonPhaseView.jsx +++ b/lib/MoonPhaseView.jsx @@ -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 { @@ -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;