Skip to content

Commit 65050d6

Browse files
authored
Merge pull request #20 from rynsf/fix-overlay-drag
fix: Improve crop overlay drag behavior by detecting on entire frameRect
2 parents cf83402 + d1238fb commit 65050d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cropify/src/main/java/io/moyuru/cropify/Cropify.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ internal fun detectTouchRegion(tapPosition: Offset, frameRect: Rect, tolerance:
200200
Rect(frameRect.topRight, tolerance).contains(tapPosition) -> TouchRegion.Vertex.TOP_RIGHT
201201
Rect(frameRect.bottomLeft, tolerance).contains(tapPosition) -> TouchRegion.Vertex.BOTTOM_LEFT
202202
Rect(frameRect.bottomRight, tolerance).contains(tapPosition) -> TouchRegion.Vertex.BOTTOM_RIGHT
203-
Rect(frameRect.center, frameRect.width / 2 - tolerance).contains(tapPosition) -> TouchRegion.Inside
203+
frameRect.contains(tapPosition) -> TouchRegion.Inside
204204
else -> null
205205
}
206-
}
206+
}

0 commit comments

Comments
 (0)