Skip to content

Commit

Permalink
Support scrolled window when taking snapshot (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
anders-kiaer authored Oct 7, 2020
1 parent eb678d3 commit eb5b569
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/components/WebvizPluginPlaceholder.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ export default class WebvizPluginPlaceholder extends Component {
tooltip="Take screenshot"
onClick={() =>
html2canvas(
document.getElementById(this.props.id)
document.getElementById(this.props.id),
{
scrollX: -window.scrollX,
scrollY: -window.scrollY,
}
).then(canvas =>
canvas.toBlob(blob =>
download_file({
Expand Down

0 comments on commit eb5b569

Please sign in to comment.