-
-
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
fix(Object): Fixes centeredScaling prop type #9401
Conversation
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.
thanks, could it be that it is optional as well?
@@ -28,7 +28,7 @@ export interface FabricObjectProps | |||
* @type Boolean | |||
* @default | |||
*/ | |||
centeredScaling: false; | |||
centeredScaling: boolean; |
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.
centeredScaling: boolean; | |
centeredScaling?: boolean; |
??
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.
Is it necessary? I mean I think Partial<FabricObjectProps>
is being used everywhere so every option is optional...
But if it is necessary, then what about other props which are still not optional in FabricObjectProps ? (such as centeredRotation, selectionBackgroundColor, selectable and ...)
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.
I will give a look and follow up if needed
Can you add a log to the changlog? |
27b8000
to
d19eb8a
Compare
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.
@HesamSoleymani please also change this here:
https://github.com/fabricjs/fabric.js/blob/master/src/shapes/Object/InteractiveObject.ts#L58
to a declare boolean
Everything is ok now about this pr? |
i think so. |
Motivation
centeredScaling type is set to "false" instead of "boolean" in v6
As @ShaMan123 mentioned in this discussion, it looks like a mistake...
Description
Changes
I've just changed centeredScaling type in FabricObjectProps.ts