We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://jsfiddle.net/6eqfwtpk/
I created the jsfiddle but it doesnt work as expected - probably due to the small dimensions in the lower right corner.. But running it locally works.
The proble is that the generated image is covered by black shadow?
mwe again
<html> <head> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script> <script> function h2c() { r = document.getElementById('box').getBoundingClientRect() rid = document.getElementById('imgdiv').getBoundingClientRect() y = r.top x = r.left w = r.width h = r.height html2canvas(document.getElementById('imgdiv'), { allowTaint: true, x: x, y: y, width: w, height: h }).then(function(canvas) { a = document.getElementById('outdiv') a.innerHTML = "" a.appendChild(canvas) }); } </script> </head> <body onload=h2c()> <div id=imgdiv style="position:relative;overflow:hidden;display:inline-block;width:300px;height:300x"> <div id=imgsize> <img src="https://picsum.photos/id/1/200/300" id=img style="object-fit:contain;width:100%" /> </div> <div id="box" style="position:absolute;box-shadow:0 0 0 1000px rgba(0,0,0,.8); width:100px;height:100px;top:100;left:100"></div> </div> <div id=outdiv></div> </body> </html>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
https://jsfiddle.net/6eqfwtpk/
I created the jsfiddle but it doesnt work as expected - probably due to the small dimensions in the lower right corner..
But running it locally works.
The proble is that the generated image is covered by black shadow?
mwe again
The text was updated successfully, but these errors were encountered: