Skip to content

Commit

Permalink
fix: added swipe points in meta for contant swipe values & fix yPoint… (
Browse files Browse the repository at this point in the history
#2213)

fix: added swipe points in meta for contant swipe values & fix yPoint when relative values
  • Loading branch information
proksh authored Dec 23, 2024
1 parent be8de3f commit 65d4ae1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions maestro-orchestra/src/main/java/maestro/orchestra/Orchestra.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1244,11 +1244,11 @@ class Orchestra(
action = Action.SwipePoint.WithEndPoint(
startPoint = Point(
startPoints[0] * deviceInfo.widthGrid / 100,
startPoints[1] * deviceInfo.widthGrid / 100
startPoints[1] * deviceInfo.heightGrid / 100
),
endPoint = Point(
endPoint[0] * deviceInfo.widthGrid / 100,
endPoint[1] * deviceInfo.widthGrid / 100
endPoint[1] * deviceInfo.heightGrid / 100
),
),
)
Expand Down Expand Up @@ -1277,6 +1277,13 @@ class Orchestra(
}

start != null && end != null -> {
val metadata = getMetadata(maestroCommand).copy(
action = Action.SwipePoint.WithEndPoint(
startPoint = Point(start.x, start.y),
endPoint = Point(end.x,end.y),
),
)
updateMetadata(maestroCommand, metadata);
maestro.swipe(
startPoint = start,
endPoint = end,
Expand Down

0 comments on commit 65d4ae1

Please sign in to comment.