Skip to content
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

Feature Request : Don't generate new data on double Click #78

Open
djouallah opened this issue Jul 13, 2022 · 6 comments
Open

Feature Request : Don't generate new data on double Click #78

djouallah opened this issue Jul 13, 2022 · 6 comments
Labels
enhancement New feature or request

Comments

@djouallah
Copy link

is there a way to disable generating new variable when a user Double click for Zooming ?

@randyzwitch
Copy link
Owner

No there isn't...feels like this would be too specific of a behavior. When you double-click to zoom, the boundary box changes; why wouldn't you want to reflect that?

@djouallah
Copy link
Author

here is the link to my app, basically, I generate a new query when the user click on the map, double clicking generate a lot of extra queries which are not needed
https://github.com/djouallah/streamlit_gis/blob/main/app.py

@randyzwitch
Copy link
Owner

I would solve this using st.button with a "Refresh data" or "Fetch data" label, so that you're only retrieving data when the person clicks the button. But as a general pattern, I'm not sure how logical it would be to have the bounding box shown on the screen not reflect what Python thinks the bounding box is

@djouallah
Copy link
Author

thanks :)

@djouallah djouallah reopened this Jul 19, 2022
@djouallah
Copy link
Author

sorry, maybe I misspoke, what I meant, it will be really nice to update the location only on 1 click, not double click, when a user zoom, the box should change but not the default location, unless a user has clicked once , I hope it make more sense now

@blackary
Copy link
Collaborator

@djouallah Can you try passing folium.Map(double_click_zoom=False) and see if that gives you the behavior you were looking for?

@randyzwitch randyzwitch added the enhancement New feature or request label Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants