From e21f156dd1226a5e5cbd76931bb70300956c63ae Mon Sep 17 00:00:00 2001 From: Henry Date: Wed, 20 Mar 2019 21:26:26 -0700 Subject: [PATCH] introduce fix to svg display on IOS when height = 0 for svg rect --- new-gui/src/components/UserInformationPanel/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/new-gui/src/components/UserInformationPanel/index.js b/new-gui/src/components/UserInformationPanel/index.js index ba430aa..d4c5285 100755 --- a/new-gui/src/components/UserInformationPanel/index.js +++ b/new-gui/src/components/UserInformationPanel/index.js @@ -272,7 +272,9 @@ class UserInformationComponent extends Component { x={0} y={(this.state.userInfo.caloriesNeeded-this.state.userInfo.caloriesTakenCurrently)/this.state.userInfo.caloriesNeeded*486} width={300} - height={this.state.userInfo.caloriesTakenCurrently/this.state.userInfo.caloriesNeeded*486} + height={this.state.userInfo.caloriesTakenCurrently > 0 ? + this.state.userInfo.caloriesTakenCurrently/this.state.userInfo.caloriesNeeded*486 : + 1 /this.state.userInfo.caloriesNeeded*486} strokeWidth={0} fill="#3CB371" />