mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
added flashcanvas integration and some legacy IE bug fixes
This commit is contained in:
@ -8,13 +8,17 @@
|
||||
<script type="text/javascript" src="test.js"></script>
|
||||
<script type="text/javascript">
|
||||
function setUp() {
|
||||
var ctx = $('#testcanvas')[0].getContext('2d');
|
||||
if ($('#testcanvas')[0].getContext) {
|
||||
var ctx = $('#testcanvas')[0].getContext('2d');
|
||||
|
||||
ctx.fillStyle = "rgb(200,0,0)";
|
||||
ctx.fillRect (10, 10, 55, 50);
|
||||
ctx.fillStyle = "rgb(200,0,0)";
|
||||
ctx.fillRect (10, 10, 55, 50);
|
||||
|
||||
ctx.fillStyle = "rgba(0, 0, 200, 0.5)";
|
||||
ctx.fillRect (30, 30, 55, 50);
|
||||
ctx.fillStyle = "rgba(0, 0, 200, 0.5)";
|
||||
ctx.fillRect (30, 30, 55, 50);
|
||||
} else {
|
||||
$('#testcanvas').remove();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -58,8 +62,8 @@
|
||||
<img src="image.jpg" style="width:0px;height:0px;" />
|
||||
|
||||
<canvas id="testcanvas" style="width:100px;height:100px;"></canvas>
|
||||
<br />
|
||||
Image without src attribute, should not crash:
|
||||
<br />
|
||||
Image without src attribute, should not crash:
|
||||
<img style="width:50px;height:50px;border:1px solid red;display:block;" />
|
||||
|
||||
</body>
|
||||
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
(function(document, window) {
|
||||
var scrStart = '<script type="text/javascript" src="', scrEnd = '"></script>';
|
||||
document.write(scrStart + '../external/jquery-1.6.2.min.js' + scrEnd);
|
||||
document.write(scrStart + '../external/jquery-1.6.2.js' + scrEnd);
|
||||
var html2canvas = ['Core', 'Generate', 'Parse', 'Preload', 'Queue', 'Renderer', 'plugins/jquery.plugin.html2canvas'], i;
|
||||
for (i = 0; i < html2canvas.length; ++i) {
|
||||
document.write(scrStart + '../src/' + html2canvas[i] + '.js' + scrEnd);
|
||||
|
Reference in New Issue
Block a user