-
-
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
chore(TS) Remove small mixins that are too small to be worthy of existance #8542
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.
IMO canvas straightening belongs to animation
But actually we can dump it
all canvas animations are possibly dumped, are 4 premade animations that who needs them need probably more than 4 and can just make them |
Build Stats
|
removed objet.method() => method(object) not worth anyone time |
I think all the canvas animation can become functions that you can import to which you give a canvas and an object and you obtain an animaton. |
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 am for removing the animation mixin for good
src/canvas/static_canvas.class.ts
Outdated
@@ -1296,9 +1298,9 @@ export class StaticCanvas< | |||
createSVGRefElementsMarkup(): string { | |||
return ['background', 'overlay'] |
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.
return ['background', 'overlay'] | |
return (['background', 'overlay'] as const) |
will type the array and remove the need for the extra as 'overlayColor' | backgroundColor
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.
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.
see my comments
el.width = this.width; | ||
el.height = this.height; | ||
// this seems wrong. either Canvas or StaticCanvas | ||
return new StaticCanvas(el); |
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.
you can do
new this.constructor(el)
Then it takes the instance class
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.
tried already , is not happy about it. Neither with new this(el) nor with new this.contrsuctor(el).
Co-authored-by: ShaMan123 <shacharnen@gmail.com>
Co-authored-by: ShaMan123 <shacharnen@gmail.com>
Motivation
Continue migration of TS
Description
Changes
Gist
In Action