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

lineWidth = 0 actually does nothing. #220

Closed
rgbjoy opened this issue Mar 3, 2016 · 3 comments
Closed

lineWidth = 0 actually does nothing. #220

rgbjoy opened this issue Mar 3, 2016 · 3 comments

Comments

@rgbjoy
Copy link

rgbjoy commented Mar 3, 2016

Since context.lineWidth doesn't take 0

https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineWidth

@liabru
Copy link
Owner

liabru commented Mar 4, 2016

Can you explain more about where and why this is a problem? Do you mean you can't disable body outlines because of this?

@codeclown
Copy link
Contributor

Yes, that is the issue. Can't disable body outline. This goes against the documentation.

Could be easily fixed by simply checking for 0 here.

if(constraint.render.lineWidth) {
    c.lineWidth = constraint.render.lineWidth;
    c.strokeStyle = constraint.render.strokeStyle;
    c.stroke();
}

I'm happy to provide a pull request if you'd like.

@rgbjoy
Copy link
Author

rgbjoy commented Nov 12, 2016

@liabru

A value of 0 means no outline will be rendered.

This isn't currently possible to do. @codeclown that would do the trick.

@liabru liabru added the bug label Nov 12, 2016
@liabru liabru closed this as completed in 74de894 Jan 15, 2017
liabru added a commit that referenced this issue Jan 15, 2017
fix issue when render.lineWidth = 0, closes #220
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants