Merge pull request #1272 from flamewow/fix/smoothStepEdge
fixed smoothStepEdge behaviour for sourceX > targetX case
This commit is contained in:
+2
-1
@@ -7,4 +7,5 @@ cypress/screenshots
|
|||||||
dist
|
dist
|
||||||
.env
|
.env
|
||||||
stats.html
|
stats.html
|
||||||
.eslintcache
|
.eslintcache
|
||||||
|
.idea
|
||||||
|
|||||||
@@ -73,6 +73,12 @@ export function getSmoothStepPath({
|
|||||||
sourceY <= targetY ? rightTopCorner(cX, sourceY, cornerSize) : rightBottomCorner(cX, sourceY, cornerSize);
|
sourceY <= targetY ? rightTopCorner(cX, sourceY, cornerSize) : rightBottomCorner(cX, sourceY, cornerSize);
|
||||||
secondCornerPath =
|
secondCornerPath =
|
||||||
sourceY <= targetY ? bottomLeftCorner(cX, targetY, cornerSize) : topLeftCorner(cX, targetY, cornerSize);
|
sourceY <= targetY ? bottomLeftCorner(cX, targetY, cornerSize) : topLeftCorner(cX, targetY, cornerSize);
|
||||||
|
} else if (sourcePosition === Position.Right && targetPosition === Position.Left){
|
||||||
|
// and sourceX > targetX
|
||||||
|
firstCornerPath =
|
||||||
|
sourceY <= targetY ? leftTopCorner(cX, sourceY, cornerSize) : leftBottomCorner(cX, sourceY, cornerSize);
|
||||||
|
secondCornerPath =
|
||||||
|
sourceY <= targetY ? bottomRightCorner(cX, targetY, cornerSize) : topRightCorner(cX, targetY, cornerSize);
|
||||||
}
|
}
|
||||||
} else if (leftAndRight.includes(sourcePosition) && !leftAndRight.includes(targetPosition)) {
|
} else if (leftAndRight.includes(sourcePosition) && !leftAndRight.includes(targetPosition)) {
|
||||||
if (sourceX <= targetX) {
|
if (sourceX <= targetX) {
|
||||||
|
|||||||
Reference in New Issue
Block a user