Skip to content
This repository was archived by the owner on Mar 1, 2025. It is now read-only.

rect drawing mode not working on mobile phone #105

Open
HrsPythonix opened this issue Feb 2, 2023 · 4 comments
Open

rect drawing mode not working on mobile phone #105

HrsPythonix opened this issue Feb 2, 2023 · 4 comments

Comments

@HrsPythonix
Copy link

I tried the streamlit-drawable-canvas in https://drawable-canvas.streamlit.app/ on my mobile, but it only respond when under freedraw mode, the others were not working, any idea how to fix it?

@andfanilo
Copy link
Owner

Hey @HrsPythonix
Ah, I don't think the code works with mobile events, the underlying code uses a non-responsive library :/ lemme see

@HrsPythonix
Copy link
Author

Hey @HrsPythonix Ah, I don't think the code works with mobile events, the underlying code uses a non-responsive library :/ lemme see

@andfanilo I had aglance at your code, I find that you implement the rect drawing using mouse event (like mouse:down, mouse:move), I test my phone on http://fabricjs.com/events and it can trigger these event.

@HrsPythonix
Copy link
Author

@andfanilo #106 I add this line to fix this problem in rect mode, I think this can also apply to other event-based drawing mode, but I haven't modify them. Maybe you can check and see if there are potential bugs

@andfanilo
Copy link
Owner

Hello!
Sorry I have seen the PR but had not have time to test it with all the components. I'll give you a sign when I do, or if you do it let me know!
Thanks for the PR :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants