Skip to content

Commit

Permalink
introduce fix to svg display on IOS when height = 0 for svg rect
Browse files Browse the repository at this point in the history
  • Loading branch information
henrychen0220 committed Mar 21, 2019
1 parent 97f50a4 commit e21f156
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion new-gui/src/components/UserInformationPanel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
Expand Down

0 comments on commit e21f156

Please sign in to comment.