Skip to content

Commit 9cf970d

Browse files
author
Yan Kochkin
committed
formated code
1 parent 100adfd commit 9cf970d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

lib/src/calculators/calculate_on_crop_params.dart

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,14 @@ OnCropParams caclulateOnCropParams({
6969
if (screenHeight > screenWidth) {
7070
uiSize = screenHeight;
7171
cropSize = imageHeight.toDouble();
72-
translateScale = cropSize / uiSize / cropPercentage * heightToWidthRatio;
72+
translateScale =
73+
cropSize / uiSize / cropPercentage * heightToWidthRatio;
7374
scale = dataScale / cropPercentage * heightToWidthRatio;
7475
} else {
7576
uiSize = screenWidth;
7677
cropSize = imageWidth.toDouble();
77-
translateScale = cropSize / uiSize / cropPercentage / heightToWidthRatio;
78+
translateScale =
79+
cropSize / uiSize / cropPercentage / heightToWidthRatio;
7880
scale = dataScale / cropPercentage / heightToWidthRatio;
7981
}
8082

@@ -89,7 +91,8 @@ OnCropParams caclulateOnCropParams({
8991
translateScale = cropSize / uiSize / cropPercentage;
9092
scale = dataScale / cropPercentage;
9193
} else {
92-
translateScale = cropSize / uiSize / cropPercentage * heightToWidthRatio;
94+
translateScale =
95+
cropSize / uiSize / cropPercentage * heightToWidthRatio;
9396
scale = dataScale / cropPercentage * heightToWidthRatio;
9497
}
9598
return OnCropParams(cropSize, translateScale, scale);
@@ -100,7 +103,8 @@ OnCropParams caclulateOnCropParams({
100103
late final double translateScale;
101104
late final double scale;
102105
if (screenWidth > screenHeight) {
103-
translateScale = cropSize / uiSize / cropPercentage / heightToWidthRatio;
106+
translateScale =
107+
cropSize / uiSize / cropPercentage / heightToWidthRatio;
104108
scale = dataScale / cropPercentage / heightToWidthRatio;
105109
} else {
106110
translateScale = cropSize / uiSize / cropPercentage;

0 commit comments

Comments
 (0)