We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
I found a couple errors in the documentation for Extending, specifically in the "Subclassing" section.
The first codeblock (reproduced below) has two errors:
Reproduced codeblock:
SVG.Rounded = class extends SVG.Rect{ // Create method to proportionally scale the rounded corners size: function(width, height) { return this.attr({ width: width , height: height , rx: height / 5 , ry: height / 5 }) } }) // Add a method to create a rounded rect SVG.extend(SVG.Container, { // Create a rounded element rounded: function(width, height) { return this.put(new SVG.Rounded).size(width, height) } }
And the edited code block with corrections:
SVG.Rounded = class extends SVG.Rect{ // Create method to proportionally scale the rounded corners size = function(width, height) { return this.attr({ width: width , height: height , rx: height / 5 , ry: height / 5 }) } } // Add a method to create a rounded rect SVG.extend(SVG.Container, { // Create a rounded element rounded: function(width, height) { return this.put(new SVG.Rounded).size(width, height) } })
The example code stumped me when it didn't work the first time I tried it, so I thought I'd flag the errors. Hope others find it helpful!
The text was updated successfully, but these errors were encountered:
Thanks for reporting! The first error you found should actually read size(width, height) {...} instead.
size(width, height) {...}
Can you open a pr to fix this? :)
Sorry, something went wrong.
No branches or pull requests
Hello,
I found a couple errors in the documentation for Extending, specifically in the "Subclassing" section.
The first codeblock (reproduced below) has two errors:
Reproduced codeblock:
And the edited code block with corrections:
The example code stumped me when it didn't work the first time I tried it, so I thought I'd flag the errors. Hope others find it helpful!
The text was updated successfully, but these errors were encountered: