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
Added support for Checkboxes and radio boxes #159
Conversation
Thanks ! ;-) |
thanks a lot |
Thanks! |
I recommend an update: if (el.type === "checkbox" || el.type === "radio"){
valueWrap.style.fontSize = "10px";
valueWrap.style.lineHeight = "10px";
renderRect(stack.ctx, bounds.left-2, bounds.top-1, 13, 13, "#888888");
renderRect(stack.ctx, bounds.left-1, bounds.top, 11, 11, "#dddddd");
if(el.type === "checkbox"){
textValue = el.checked ? "\u2714" : "";
} else if (el.type === "radio"){
textValue = el.checked ? "\u25cf" : "";
}
} So no need to be in UTF. @niklasvh please add the main code (if possible), think you should add from line 908 in file |
-Cleanup up some '==' statements to '===' to obey by jsLint rules -Updated the Gruntfile to work with the latest grunt version
@brcontainer Thanks, I've updated the code to reflect those changes |
This is awesome! Thanks @Finalfantasykid. Excited to see this get merged |
Awesome 👍 !!! |
I don't know if this is the "correct" way to do it (I don't see a way in GitHub to "amend" a pull request), but I've created a new pull request at #406. It would be great if this nice addition could finally be merged; it works fine for me. |
How do you implement the checkbox fix. I added the code but to no avail... they still don't show up. |
You might have better luck with sjamaan's version since his also contains the latest changes as well as mine. He also built his version so you can use this one https://raw.githubusercontent.com/CodeYellowBV/html2canvas/master/build/html2canvas.js |
@Finalfantasykid, @niklasvh Can this be closed since it's superseded by #406? |
Added this for 0.5 milestone |
Implemented in 0.5 893ce74 |
It isn't the prettiest thing, but it is working well enough for my needs, and I thought I'd share.