refactor(smoothstepedge): simplify conditions
This commit is contained in:
@@ -75,7 +75,7 @@ export function getSmoothStepPath({
|
|||||||
sourceY <= targetY
|
sourceY <= targetY
|
||||||
? rightTopCorner(targetX, centerY, cornerSize)
|
? rightTopCorner(targetX, centerY, cornerSize)
|
||||||
: rightBottomCorner(targetX, centerY, cornerSize);
|
: rightBottomCorner(targetX, centerY, cornerSize);
|
||||||
} else if (sourceX > targetX) {
|
} else {
|
||||||
firstCornerPath =
|
firstCornerPath =
|
||||||
sourceY < targetY
|
sourceY < targetY
|
||||||
? bottomRightCorner(sourceX, centerY, cornerSize)
|
? bottomRightCorner(sourceX, centerY, cornerSize)
|
||||||
@@ -101,7 +101,7 @@ export function getSmoothStepPath({
|
|||||||
sourceY <= targetY
|
sourceY <= targetY
|
||||||
? rightTopCorner(targetX, sourceY, cornerSize)
|
? rightTopCorner(targetX, sourceY, cornerSize)
|
||||||
: rightBottomCorner(targetX, sourceY, cornerSize);
|
: rightBottomCorner(targetX, sourceY, cornerSize);
|
||||||
} else if (sourceX > targetX) {
|
} else {
|
||||||
firstCornerPath =
|
firstCornerPath =
|
||||||
sourceY <= targetY
|
sourceY <= targetY
|
||||||
? bottomRightCorner(sourceX, targetY, cornerSize)
|
? bottomRightCorner(sourceX, targetY, cornerSize)
|
||||||
@@ -114,7 +114,7 @@ export function getSmoothStepPath({
|
|||||||
sourceY <= targetY
|
sourceY <= targetY
|
||||||
? bottomLeftCorner(sourceX, targetY, cornerSize)
|
? bottomLeftCorner(sourceX, targetY, cornerSize)
|
||||||
: topLeftCorner(sourceX, targetY, cornerSize);
|
: topLeftCorner(sourceX, targetY, cornerSize);
|
||||||
} else if (sourceX > targetX) {
|
} else {
|
||||||
firstCornerPath =
|
firstCornerPath =
|
||||||
sourceY <= targetY
|
sourceY <= targetY
|
||||||
? bottomRightCorner(sourceX, targetY, cornerSize)
|
? bottomRightCorner(sourceX, targetY, cornerSize)
|
||||||
|
|||||||
Reference in New Issue
Block a user