File tree Expand file tree Collapse file tree
cropper/src/main/java/com/smarttoolfactory/cropper Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,9 +44,12 @@ fun Modifier.crop(
4444 vararg keys : Any? ,
4545 cropState : CropState ,
4646 zoomOnDoubleTap : (ZoomLevel ) -> Float = cropState.DefaultOnDoubleTap ,
47+ onDown : ((CropData ) -> Unit )? = null,
48+ onMove : ((CropData ) -> Unit )? = null,
49+ onUp : ((CropData ) -> Unit )? = null,
4750 onGestureStart : ((CropData ) -> Unit )? = null,
4851 onGesture : ((CropData ) -> Unit )? = null,
49- onGestureEnd : ((CropData ) -> Unit )? = null,
52+ onGestureEnd : ((CropData ) -> Unit )? = null
5053) = composed(
5154
5255 factory = {
@@ -113,19 +116,19 @@ fun Modifier.crop(
113116 onDown = {
114117 coroutineScope.launch {
115118 cropState.onDown(it)
116- onGestureStart ?.invoke(cropState.cropData)
119+ onDown ?.invoke(cropState.cropData)
117120 }
118121 },
119122 onMove = {
120123 coroutineScope.launch {
121124 cropState.onMove(it)
122- onGesture ?.invoke(cropState.cropData)
125+ onMove ?.invoke(cropState.cropData)
123126 }
124127 },
125128 onUp = {
126129 coroutineScope.launch {
127130 cropState.onUp(it)
128- onGestureEnd ?.invoke(cropState.cropData)
131+ onUp ?.invoke(cropState.cropData)
129132 }
130133 }
131134 )
You can’t perform that action at this time.
0 commit comments