-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Make setTransform() and addPath() accept DOMMatrixInit #965
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
Conversation
source
Outdated
| interface <dfn>CanvasPattern</dfn> { | ||
| // opaque object | ||
| void <span data-x="dom-canvaspattern-setTransform">setTransform</span>(<span>DOMMatrix</span> transform); | ||
| void <span data-x="dom-canvaspattern-setTransform">setTransform</span>(<span>DOMMatrixInit</span> transform); |
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.
optional
|
Also paging @junov for additional review. |
|
Comments addressed. |
source
Outdated
| @@ -62627,7 +62630,8 @@ try { | |||
|
|
|||
| <p>The <dfn><code data-x="">setTransform(<var>matrix</var>)</code></dfn> method must | |||
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.
Not new in this commit, but how come the argument is called "matrix" here, and "transform" elsewhere?
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.
And why is data-x=""?
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'm not sure why the argument name is different. Happy to make them consistent. What would you prefer?
I think data-x="" is used since the method is defined twice. It would probably be better to define it once and branch on the number of arguments or some such.
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.
In general type names should be indicative of the form of the data, and variable names should be indicative of the meaning of the data. By that reasoning, "transform" is the better name.
|
Done, apart from defining setTransform() as a single method. There's not really a good way to do that with overloading. |
|
Looks good to me. |
|
LGTM2 |
Fixes #35.