Skip to content

Commit 1c31323

Browse files
Remove redundant local variables originalRadiusX and originalRadiusY and use centerX and centerY for calculations in ellipseLow
1 parent f420ba5 commit 1c31323

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/common/utils/shapes/shape-adjusted-dimensions.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,8 @@ export const calculateShapeAdjustedDimensionsBasedOnStrokeHeight = (
4141
}
4242

4343
case 'ellipseLow': {
44-
const originalRadiusX = restrictedWidth / 2;
45-
const originalRadiusY = restrictedHeight / 2;
46-
47-
const adjustedRadiusX = Math.max(originalRadiusX - halfStroke, 0);
48-
const adjustedRadiusY = Math.max(originalRadiusY - halfStroke, 0);
44+
const adjustedRadiusX = Math.max(centerX - halfStroke, 0);
45+
const adjustedRadiusY = Math.max(centerY - halfStroke, 0);
4946

5047
return {
5148
type: 'ellipseLow',

0 commit comments

Comments
 (0)