react-native-rectangle-doc-scanner 3.248.0 → 3.249.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,6 +24,7 @@ import kotlinx.coroutines.*
24
24
  import kotlinx.coroutines.delay
25
25
  import java.io.File
26
26
  import kotlin.math.min
27
+ import kotlin.math.max
27
28
 
28
29
  class DocumentScannerView(context: ThemedReactContext) : FrameLayout(context), LifecycleOwner {
29
30
  private val themedContext = context
@@ -645,8 +646,8 @@ class DocumentScannerView(context: ThemedReactContext) : FrameLayout(context), L
645
646
  viewWidth.toDouble() / imageWidth.toDouble(),
646
647
  viewHeight.toDouble() / imageHeight.toDouble()
647
648
  )
648
- val scaledImageWidth = imageWidth * scale
649
- val scaledImageHeight = imageHeight * scale
649
+ val scaledImageWidth = imageWidth.toDouble() * scale
650
+ val scaledImageHeight = imageHeight.toDouble() * scale
650
651
  val offsetX = (scaledImageWidth - viewWidth) / 2.0
651
652
  val offsetY = (scaledImageHeight - viewHeight) / 2.0
652
653
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "3.248.0",
3
+ "version": "3.249.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",