Skip to content

Fix ReferenceError: random is not defined when the rotate accessor function is not specified#194

Merged
jasondavies merged 2 commits into
jasondavies:masterfrom
pearmini:master
Dec 2, 2025
Merged

Fix ReferenceError: random is not defined when the rotate accessor function is not specified#194
jasondavies merged 2 commits into
jasondavies:masterfrom
pearmini:master

Conversation

@pearmini

@pearmini pearmini commented Dec 2, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@jasondavies

Copy link
Copy Markdown
Owner

Thanks. I might prefer to define a default anonymous rotate function that references the random function: rotate = () => (~~(random() * 6) - 3) * 30. What do you think?

@pearmini

pearmini commented Dec 2, 2025

Copy link
Copy Markdown
Contributor Author

Sounds great. I like this concise solution!

@jasondavies jasondavies merged commit 19bdec4 into jasondavies:master Dec 2, 2025
@jasondavies

Copy link
Copy Markdown
Owner

Thanks!

@pearmini

pearmini commented Dec 2, 2025

Copy link
Copy Markdown
Contributor Author

I ran into this issue while developing Jiggly Wordle. If you're interested, feel free to check it out: https://wordle.bairui.dev/. Thanks for the fantastic work on d3-cloud!

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.

2 participants