WT1.1.17 +4 pointer fix
This commit is contained in:
@@ -211,53 +211,21 @@ class ExerciseNewBloc extends Bloc<ExerciseNewEvent, ExerciseNewState> with Logg
|
||||
if (this.bmi == 0) {
|
||||
getBMI();
|
||||
}
|
||||
final double distortionWidth = customerRepository.mediaWidth / baseWidth;
|
||||
final double distortionHeight = distortionWidth - 0.02; //mediaHeight / baseHeight;
|
||||
/* log("Width: " +
|
||||
mediaWidth.toStringAsFixed(0) +
|
||||
" Height: " +
|
||||
mediaHeight.toStringAsFixed(0) +
|
||||
" BaseW: " +
|
||||
baseWidth.toStringAsFixed(0) +
|
||||
" BaseH: " +
|
||||
baseHeight.toStringAsFixed(0) +
|
||||
" DistW: " +
|
||||
distortionWidth.toStringAsFixed(2) +
|
||||
" DistH: " +
|
||||
distortionHeight.toStringAsFixed(2)); */
|
||||
|
||||
this.bmiAngle = (bmi * 90 / 25) - 90;
|
||||
if (bmi < 18.5) {
|
||||
goalMilestoneBMI = 19;
|
||||
goalBMI = 21.75;
|
||||
this.bmiTop = 99 * distortionHeight;
|
||||
this.bmiLeft = 77 * distortionWidth;
|
||||
bmiAngle = -62;
|
||||
} else if (bmi > 18.5 && bmi < 25) {
|
||||
goalBMI = 21.75;
|
||||
goalMilestoneBMI = 21.75;
|
||||
this.bmiTop = 48 * distortionHeight;
|
||||
this.bmiLeft = 130 * distortionWidth;
|
||||
bmiAngle = -23;
|
||||
} else if (bmi < 30 && bmi > 24.9) {
|
||||
goalMilestoneBMI = 24;
|
||||
goalBMI = 21.75;
|
||||
this.bmiTop = 40.0 * distortionHeight;
|
||||
this.bmiLeft = 184.0 * distortionWidth;
|
||||
|
||||
bmiAngle = 7.2;
|
||||
} else if (bmi < 34.9 && 29.9 < bmi) {
|
||||
goalMilestoneBMI = 29;
|
||||
goalBMI = 24;
|
||||
bmiTop = 48 * distortionHeight;
|
||||
bmiLeft = 211 * distortionWidth;
|
||||
} else if (bmi > 35) {
|
||||
goalMilestoneBMI = 34;
|
||||
goalBMI = 24;
|
||||
bmiTop = 94 * distortionHeight;
|
||||
bmiLeft = 260 * distortionWidth;
|
||||
bmiAngle = 59;
|
||||
}
|
||||
|
||||
goalBMI = 24;
|
||||
this.goalWeight = goalBMI * (height * height / 10000);
|
||||
this.goalMilestoneWeight = goalMilestoneBMI * (height * height / 10000);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user