Skip to content

Conversation

@hannahbergam
Copy link
Contributor

@hannahbergam hannahbergam commented Jun 17, 2021

image

image

image

@hannahbergam hannahbergam changed the title initial mostly raw copy of drafted algo Adding second paint glomming algorithm and createDrawer flag to switch between SquareDrawer and CircleDrawer Jun 24, 2021
@hannahbergam hannahbergam marked this pull request as ready for review June 24, 2021 17:24
node.querySelectorAll("*").forEach((n) => n.remove());
}
smallCornerSvg(top, grid, id, size, Corner.topLeft);
smallCornerSvg(top, grid, id, size, Corner.topRight);

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

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@molly-moen molly-moen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome!

@hannahbergam hannahbergam merged commit 968cf23 into main Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants