New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement - Remove clip path on drag end #1
Conversation
Hey @mvk059 |
detectDragGestures { change, _ -> | ||
detectDragGestures( | ||
onDragStart = { offset -> | ||
scannedOffset = offset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed it and found that line 50 is unnecessary
as we are updating the scanned offset in the lambda function
also
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@V9vek I've updated to code to remove the unnecessary assignment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay thanks for the changes
circleRadius = 300f | ||
}, | ||
onDragEnd = { | ||
scannedOffset = Offset.Zero |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same for line 54
as you are making the circle radius = 0
inside onDragEnd
, then we should not change the offset of the scanned circle as it will disappear automatically, you getting me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@V9vek I've updated to code to remove the unnecessary assignment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you look at these changes I mentioned and let me know
Please check now. I've updated the code. |
Okay thanks, now things are fine |
✍️ Existing behaviour
Whenever the user drags on the screen, the internal body part is shown. But when the user stops the drag, the clipped circle path stays on the screen.
💡 Suggested Feature
When the user stops dragging on the screen, the clipped path is removed and the original body image is shown.
📝 Changes
In the
detectDragGestures
method, thescannedOffset
andcircleRadius
properties have been set accordingly.