Skip to content

Commit e8cbcd3

Browse files
Fix issue #610: keep layout params (#665)
Co-authored-by: Isidro <[email protected]>
1 parent acf284b commit e8cbcd3

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

cropper/src/main/kotlin/com/canhub/cropper/CropImageView.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,11 +1241,6 @@ class CropImageView @JvmOverloads constructor(
12411241
override fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int) {
12421242
super.onLayout(changed, l, t, r, b)
12431243
if (mLayoutWidth > 0 && mLayoutHeight > 0) {
1244-
// Gets original parameters, and creates the new parameters
1245-
val origParams = this.layoutParams
1246-
origParams.width = mLayoutWidth
1247-
origParams.height = mLayoutHeight
1248-
layoutParams = origParams
12491244
if (originalBitmap != null) {
12501245
applyImageMatrix(
12511246
(r - l).toFloat(),

0 commit comments

Comments
 (0)