-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
chore(TS) convert more utils #8180
Conversation
@@ -33,7 +33,7 @@ type TComposeMatrixArgs = TTranslateMatrixArgs & TRotateMatrixArgs & TScaleMatri | |||
* @param {Boolean} [ignoreOffset] Indicates that the offset should not be applied | |||
* @return {Point} The transformed point | |||
*/ | |||
export const transformPoint = (p: Point | IPoint, t: TMat2D, ignoreOffset: boolean): Point => new Point(p).transform(t, ignoreOffset); | |||
export const transformPoint = (p: Point | IPoint, t: TMat2D, ignoreOffset?: boolean): Point => new Point(p).transform(t, ignoreOffset); |
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.
aren't we moving this to point? same as rotatePoint?
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 already on point, this is the old util that uses the point method
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.
sorry I didn't notice
import { invertTransform, multiplyTransformMatrices, qrDecompose } from "./matrix"; | ||
import type { TComposeMatrixArgs } from './matrix'; | ||
|
||
type FabricObject = any; |
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.
Maybe we should put this in typedefs so it will be easy to replace...
I didn't put too much thought into it when I did 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.
me neither. is just to remember we need a generic type that accept any fabricObject interface.
Code Coverage Summary
|
Co-authored-by: ShaMan123 <shacharnen@gmail.com>
Plain conversion of add/remove transforms to object and make bounding box from points