-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
feat(): DrawShape, DrawOval, DrawPoly #8430
base: master
Are you sure you want to change the base?
Conversation
UT fail in deepEquals F it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated from master
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated from master
Motivation
We discussed adding a poly brush to core.
I need it for a project so why not. Here it is.
closes #6319
Description
Interaction managers that are in charge of drawing a shape.
I have sticked to brush impl though I don't agree with the event naming and adding the shape to canvas by default. Thought that was best until we refactor all brushes (#8476 ).
Changes
_onDoubleClick
calls brush methodFurture PR should make all pointer events funnel through the active brush.
Gist
First merge #8417closes #8428
DrawShapeBase
base class to shape creation interaction
DrawShape
Simple and good pointer interaction creating a shape
DrawOval
same, extends
DrawShape
DrawPoly
What do you think about naming?
vpt isn't there yet, see videos below, I think this is a bug in canvas vpt when skewing, unrelated to the PR
In Action
fabric.js.sandbox.-.Google.Chrome.2022-11-07.21-18-40.mp4
centered + shiftKey
fabric.js.sandbox.-.Google.Chrome.2022-11-07.21-16-07.mp4
Unrelated and unexpected caching effect at the end
fabric.js.sandbox.-.Google.Chrome.2022-11-07.17-35-34.mp4
fabric.js.sandbox.-.Google.Chrome.2022-11-07.17-37-21.mp4
vpt
fabric.js.sandbox.-.Google.Chrome.2022-11-07.21-21-36.mp4
With vpt + objectCaching
BBox is off!
fabric.js.sandbox.-.Google.Chrome.2022-11-07.17-38-14.mp4