-
Notifications
You must be signed in to change notification settings - Fork 3
Adding second paint glomming algorithm and createDrawer flag to switch between SquareDrawer and CircleDrawer #64
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
| node.querySelectorAll("*").forEach((n) => n.remove()); | ||
| } | ||
| smallCornerSvg(top, grid, id, size, Corner.topLeft); | ||
| smallCornerSvg(top, grid, id, size, Corner.topRight); |
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 can't help but notice same values grid, id, and size. One possible further implementation we could do is define a helper function
smallCornerSvgHelper(color, position) {
return smallCornerSvg(color, grid, id, size, position)
}
Or something in that direction
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.
It'd have to be within this method though, which seems weird.
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.
Yes^^ this is a great point. I agree it's weird to have the repetition, but it feels better now that they're at least one liners. I can play around with it and see if there's a better way to handle the other variables.
molly-moen
left a comment
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.
This is awesome!
Uh oh!
There was an error while loading. Please reload this page.