Skip to content
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

Fix Two.Polygon #631

Merged
merged 1 commit into from
May 11, 2022
Merged

Fix Two.Polygon #631

merged 1 commit into from
May 11, 2022

Conversation

mmz-001
Copy link

@mmz-001 mmz-001 commented May 11, 2022

Creating a polygon with Two.makePolygon does not set the x and y coordinates of the shape. This fix addresses this issue.

Steps to reproduce.

const params = {
  width: 300,
  height: 300,
}

const two = new Two(params).appendTo(document.getElementById('container'))

const polygon = two.makePolygon(150, 150, 100, 12)
two.update()

Actual Result

image

Expected Result

image

P.S. first time contributing.

@jonobr1
Copy link
Owner

jonobr1 commented May 11, 2022

Thanks for this! This slipped through the cracks when converting the latest functions and documentation to TypeScript types.

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