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

Add 0x0 size check to canvas #3467

Merged
merged 4 commits into from
May 4, 2018
Merged

Add 0x0 size check to canvas #3467

merged 4 commits into from
May 4, 2018

Conversation

themadcreator
Copy link
Contributor

Prevents error from being thrown when we try to
invoke context.drawImage with an argument
that is a 0x0 canvas.

Instead we just skip the drawImage.

Prevents error from being thrown when we try to
invoke context.drawImage with an argument
that is a 0x0 canvas.

Instead we just skip the drawImage.
@blueprint-bot
Copy link

Add 0x0 size check to canvas

Demo: quicktests | fiddle

@blueprint-bot
Copy link

Test dimensions on all canvases

Demo: quicktests | fiddle

@blueprint-bot
Copy link

Reuse variable

Demo: quicktests | fiddle

Copy link

@cmslewis cmslewis left a comment

Choose a reason for hiding this comment

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

Worth a warning of some kind?

@themadcreator
Copy link
Contributor Author

Yeah, i was considering. Might as well

@blueprint-bot
Copy link

Add warning for condition that previously threw exception

Demo: quicktests | fiddle

@themadcreator themadcreator merged commit aad550a into develop May 4, 2018
@themadcreator themadcreator deleted the bd/size-check-canvas branch May 4, 2018 19:48
btx.drawImage(originalCanvas, 0, 0);
}
} else {
console.warn("Failed to fill buffer canvas with with 0x0 canvas");
Copy link

Choose a reason for hiding this comment

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

@themadcreator FYI there's a duplicate word here: with with

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.

None yet

3 participants