Skip to content

Commit

Permalink
Behavior Change: By default always show the guidelines. (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
vanniktech authored Oct 24, 2022
1 parent f6706fe commit 1ed4535
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ private val COLOR_PURPLE = Color.rgb(153, 51, 153)
@JvmField
var touchRadius: Float = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 24f, Resources.getSystem().displayMetrics),

/** Whether the guidelines should be on, off, or only showing when resizing. */
@JvmField
var guidelines: Guidelines = Guidelines.ON_TOUCH,
@JvmField var guidelines: Guidelines = Guidelines.ON,

/** The initial scale type of the image in the crop image view. */
@JvmField
Expand Down
7 changes: 3 additions & 4 deletions cropper/src/main/kotlin/com/canhub/cropper/CropImageView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1567,15 +1567,14 @@ class CropImageView @JvmOverloads constructor(
CENTER_INSIDE,
}

/** The possible guidelines showing types. */
enum class Guidelines {
/** Never show */
/** Never shown. */
OFF,

/** Show when crop move action is live */
/** Shown when user is moving the crop window. */
ON_TOUCH,

/** Always show */
/** Always shown. */
ON,
}

Expand Down

0 comments on commit 1ed4535

Please sign in to comment.