mirror of
https://github.com/gradio-app/gradio.git
synced 2025-03-01 11:45:36 +08:00
fix scrolling screenshot issue
This commit is contained in:
parent
bb8e1a1aaf
commit
b72423e7cf
@ -130,7 +130,10 @@ function gradio(config, fn, target) {
|
||||
target.find(".screenshot").click(function() {
|
||||
$(".screenshot").hide();
|
||||
$(".screenshot_logo").show();
|
||||
html2canvas(target[0]).then(function(canvas) {
|
||||
html2canvas(target[0], {
|
||||
scrollX: 0,
|
||||
scrollY: -window.scrollY
|
||||
}).then(function(canvas) {
|
||||
saveAs(canvas.toDataURL(), 'screenshot.png');
|
||||
$(".screenshot").show();
|
||||
$(".screenshot_logo").hide();
|
||||
|
@ -130,7 +130,10 @@ function gradio(config, fn, target) {
|
||||
target.find(".screenshot").click(function() {
|
||||
$(".screenshot").hide();
|
||||
$(".screenshot_logo").show();
|
||||
html2canvas(target[0]).then(function(canvas) {
|
||||
html2canvas(target[0], {
|
||||
scrollX: 0,
|
||||
scrollY: -window.scrollY
|
||||
}).then(function(canvas) {
|
||||
saveAs(canvas.toDataURL(), 'screenshot.png');
|
||||
$(".screenshot").show();
|
||||
$(".screenshot_logo").hide();
|
||||
|
Loading…
Reference in New Issue
Block a user