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

better click handler #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

mankowitz
Copy link

@mankowitz mankowitz commented Jan 2, 2022

When creating rectangles, it is counterintuitive that if the rectangle tool is selected and I try to resize or move another object, it will draw another rectangle. This only triggers the handler if it is a plain click.

@RavishaHesh
Copy link
Owner

@mankowitz thanks for the PR. I think with one small change we can do a bit of cleanup to the code. Instead of Math functions, we can use Fabric's http://fabricjs.com/docs/fabric.Point.html#distanceFrom function to calculate the distance between points. I'll test this a little bit and merge it with the change. Thanks again.

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

Successfully merging this pull request may close these issues.

2 participants