Skip to content

Commit

Permalink
Photopea direct export
Browse files Browse the repository at this point in the history
  • Loading branch information
yikuansun committed Jul 9, 2024
1 parent 007a5e9 commit 54c97c4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,12 @@
<span style="display: inline-block; vertical-align: middle;">
<button on:click={() => {
exportButtonReal.href = outputCanvas.toDataURL();
exportButtonReal.click();
if (portal == "photopea") {
Photopea.runScript(window.parent, `
app.open("${exportButtonReal.href}", null, true);
`);
}
else exportButtonReal.click();
}}>
Export
</button>
Expand Down

0 comments on commit 54c97c4

Please sign in to comment.