Skip to content

Commit 8a1c391

Browse files
add function to check if handles are touched
1 parent 0c221a5 commit 8a1c391

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

cropper/src/main/java/com/smarttoolfactory/cropper/TouchRegion.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ package com.smarttoolfactory.cropper
66
enum class TouchRegion {
77
TopLeft, TopRight, BottomLeft, BottomRight, Inside, None
88
}
9+
10+
fun handlesTouched(touchRegion: TouchRegion) = touchRegion == TouchRegion.TopLeft ||
11+
touchRegion == TouchRegion.TopRight ||
12+
touchRegion == TouchRegion.BottomLeft ||
13+
touchRegion == TouchRegion.BottomRight

0 commit comments

Comments
 (0)