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

Time out for double clicks is handled incorrectly. #67

Open
JohnDeptuch opened this issue Feb 2, 2024 · 1 comment
Open

Time out for double clicks is handled incorrectly. #67

JohnDeptuch opened this issue Feb 2, 2024 · 1 comment

Comments

@JohnDeptuch
Copy link

I found that the handler set using onMouseDoubleClick is always called when a GShape object is clicked on twice using a mouse even if the time between clicks is several seconds. The cause is due to the value of MouseInputData.time being in seconds while the value of MouseInputData.doubleClickTime is in milliseconds. The comparison at line 949 in display_object.dart ends up using an interval of 250 seconds as a result and always succeeds.

Changing line 9 in pointer_data.dart so that the value of doubleClickTime is in seconds fixed the issue for me:

static double doubleClickTime = 0.250;
@roipeker
Copy link
Owner

roipeker commented Feb 3, 2024

Thank you so much for finding the bug and providing a solution @JohnDeptuch. Will try to merge the change soon.

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

No branches or pull requests

2 participants