Skip to content

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