Skip to content

Conversation

@gunggmee
Copy link
Contributor

@gunggmee gunggmee commented Sep 2, 2021

To calculate y coordinate of imageData, we should divide the index with
canvas.width not with canvas.height. The current code works because the
shape of canvas is square.

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • Prefix your PR title with [feat], [fix], [chore], or [docs].
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with npm test and lint the project with npm run lint

To calculate y coordinate of `imageData`, we should divide the index with
`canvas.width` not with `canvas.height`. The current code works because the
shape of canvas is square.
@dummdidumm dummdidumm merged commit dc11e44 into sveltejs:master Sep 2, 2021
@dummdidumm
Copy link
Member

Good catch, thank you!

@gunggmee gunggmee deleted the fix-bindings-tutorial branch September 3, 2021 01:05
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