-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #283 from cy6erskunk/add-another-manual-test
Add test case from #75
- Loading branch information
Showing
2 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<!DOCTYPE html> | ||
<head> | ||
<meta charset='utf-8'> | ||
<title>manual tests</title> | ||
<style> | ||
iframe { | ||
width: 610px; | ||
height: 200px; | ||
} | ||
.wrapper { | ||
border: 1px solid #3c3c3c; | ||
width: 300px; height: 300px; | ||
} | ||
.wrapper.wrapper-tall { | ||
height: 600px; | ||
} | ||
.wrapper.wrapper-large { | ||
width: 600px; | ||
height: 600px; | ||
} | ||
|
||
|
||
svg { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="wrapper"> | ||
<svg width="500" height="500" viewBox="0 0 500 500"> | ||
<rect width="500" height="500" fill="#c1a5a9"></rect> | ||
<g transform="translate(250, 250)"> | ||
<circle fill="#f08cae" r="240"></circle> | ||
<circle fill="#9a4c95" r="180"></circle> | ||
<circle fill="#4d2d52" r="120"></circle> | ||
<circle fill="#1d1a31" r="60"></circle> | ||
</g> | ||
</svg> | ||
</div> | ||
<button> | ||
save PNG | ||
</button> | ||
<div class="wrapper wrapper-large"> | ||
<svg width="500" height="500" viewBox="0 0 500 500"> | ||
<rect width="500" height="500" fill="#c1a5a9"></rect> | ||
<g transform="translate(250, 250)"> | ||
<circle fill="#f08cae" r="240"></circle> | ||
<circle fill="#9a4c95" r="180"></circle> | ||
<circle fill="#4d2d52" r="120"></circle> | ||
<circle fill="#1d1a31" r="60"></circle> | ||
</g> | ||
</svg> | ||
</div> | ||
<button> | ||
save PNG | ||
</button> | ||
<div class="wrapper wrapper-tall"> | ||
<svg width="500" height="500" viewBox="0 0 500 500"> | ||
<rect width="500" height="500" fill="#c1a5a9"></rect> | ||
<g transform="translate(250, 250)"> | ||
<circle fill="#f08cae" r="240"></circle> | ||
<circle fill="#9a4c95" r="180"></circle> | ||
<circle fill="#4d2d52" r="120"></circle> | ||
<circle fill="#1d1a31" r="60"></circle> | ||
</g> | ||
</svg> | ||
</div> | ||
<button> | ||
save PNG | ||
</button> | ||
<script src="main.js"></script> | ||
<script> | ||
function savePNG1() { | ||
downloadPng(document.querySelector("#test1 svg"), "my_svg", { | ||
css: "internal" | ||
}); | ||
} | ||
|
||
function savePNG2() { | ||
downloadPng(document.querySelector("#test2 svg"), "my_svg", { | ||
css: "internal" | ||
}); | ||
} | ||
|
||
function savePNG3() { | ||
downloadPng(document.querySelector("#test3 svg"), "my_svg", { | ||
css: "internal" | ||
}); | ||
} | ||
|
||
document.querySelector("#test1 button").addEventListener("click", savePNG1); | ||
document.querySelector("#test2 button").addEventListener("click", savePNG2); | ||
document.querySelector("#test3 button").addEventListener("click", savePNG3); | ||
|
||
</script> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c112c6c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: