-
Notifications
You must be signed in to change notification settings - Fork 88
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
canvas result clear automatically #84
Comments
I have a similar issue. I would like to draw a rectangle to select a region in an image to zoom. Hence, I would like for the user to be able to draw a rectangle, then, when the mouse is up, get the rectangle coordinates and clear the rectangle. For this, I would need:
I am not sure what the optimal API would be. Is there a way to do this? |
Hello, Adding a programmatic way of clearing from Python is...not really possible sadly because of the way Streamlit Components are structured :( you can't send signals to a component from Python or something like a callback (streamlit/streamlit#3977) |
Hello, Many thanks for this useful component. I'm also trying something similar but have been unsuccessful, so far. |
Hi, thanks for your work.
Streamlit is my first web-tool for visualize and I am using canvas module for interaction.
I am using
st_canvas
infreedraw
andcircle
mode to get mouse click as stroke or circleWhile, getting interactions I want to clear the past strokes and leave only latest strokes (e.g. 3)
I know that clear function can be done online by clicking the trash bin button, but is it possible to handle it automatically on python code?
The text was updated successfully, but these errors were encountered: