Merge pull request #334 from wbkd/develop

refactor(smoothstepedge): simplify conditions
This commit is contained in:
Moritz
2020-07-14 15:01:06 +02:00
committed by GitHub
+3 -3
View File
@@ -75,7 +75,7 @@ export function getSmoothStepPath({
sourceY <= targetY
? rightTopCorner(targetX, centerY, cornerSize)
: rightBottomCorner(targetX, centerY, cornerSize);
} else if (sourceX > targetX) {
} else {
firstCornerPath =
sourceY < targetY
? bottomRightCorner(sourceX, centerY, cornerSize)
@@ -101,7 +101,7 @@ export function getSmoothStepPath({
sourceY <= targetY
? rightTopCorner(targetX, sourceY, cornerSize)
: rightBottomCorner(targetX, sourceY, cornerSize);
} else if (sourceX > targetX) {
} else {
firstCornerPath =
sourceY <= targetY
? bottomRightCorner(sourceX, targetY, cornerSize)
@@ -114,7 +114,7 @@ export function getSmoothStepPath({
sourceY <= targetY
? bottomLeftCorner(sourceX, targetY, cornerSize)
: topLeftCorner(sourceX, targetY, cornerSize);
} else if (sourceX > targetX) {
} else {
firstCornerPath =
sourceY <= targetY
? bottomRightCorner(sourceX, targetY, cornerSize)