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

fix: free draw flip not scaling correctly #5752

Merged
merged 6 commits into from
Oct 18, 2022

Conversation

adarkforce
Copy link
Contributor

@adarkforce adarkforce commented Oct 10, 2022

Fixed #5750 freedraw flip by correctly calculating transform handle final point, to avoid scaling issues

Fixed freedraw flip by correctly calculating transform handle final point, to avoid scaling issues
@vercel
Copy link

vercel bot commented Oct 10, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
excalidraw ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Oct 16, 2022 at 2:42PM (UTC)
excalidraw-package-example ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Oct 16, 2022 at 2:42PM (UTC)
1 Ignored Deployment
Name Status Preview Comments Updated
docs ⬜️ Ignored (Inspect) Oct 16, 2022 at 2:42PM (UTC)

@adarkforce adarkforce changed the title Bug fix: free draw flip not scaling correctly fix: free draw flip not scaling correctly Oct 10, 2022
Fixed lines elements by taking into account beizer curve bounds + fixed 2 point lines to appear flipped in place
@adarkforce
Copy link
Contributor Author

Hi, @dwelle, I found out that there was also a problem with multi point line elements, in particular when the curve exceeded the min/max points, the element had an offset which was the difference between the last point and the end of the curve, as it can be seen in the video below:

Registrazione.schermo.2022-10-16.alle.16.47.32.mov

After I managed to solve this issue, another minor issue arised: when roughness is > 1 the flipping is not pixel perfect but there is a slight imprecision due to the roughness expanding the line. As it can be seen in the video:

Registrazione.schermo.2022-10-16.alle.16.44.04.mov

@adarkforce adarkforce marked this pull request as ready for review October 16, 2022 15:04
Copy link
Member

@dwelle dwelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes @adarkforce, and sorry for the delay in review! Looking good 👍.

After I managed to solve this issue, another minor issue arised: when roughness is > 1 the flipping is not pixel perfect but there is a slight imprecision due to the roughness expanding the line. As it can be seen in the video:

You're right. Be it not for the bounding box, one wouldn't really notice it. I think we can live with that! :)

Alright, let's ship! 🚀

@dwelle dwelle merged commit 55110bf into excalidraw:master Oct 18, 2022
@adarkforce adarkforce deleted the fix-freedraw-flip branch October 20, 2022 16:50
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.

flipping freedraw elements upscales it
2 participants