mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
commit
946bdef0d4
@ -1196,7 +1196,7 @@ _html2canvas.Parse = function ( images, options ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
stack.backgroundColor = getCSS( body, "backgroundColor" );
|
stack.backgroundColor = getCSS( document.documentElement, "backgroundColor" );
|
||||||
|
|
||||||
return stack;
|
return stack;
|
||||||
|
|
||||||
|
@ -10,7 +10,12 @@
|
|||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
<script type="text/javascript" src="test.js"></script>
|
<script type="text/javascript" src="test.js"></script>
|
||||||
<style>
|
<style>
|
||||||
|
html {
|
||||||
|
background-color: red;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
background-color: lime;
|
||||||
|
}
|
||||||
.small div{
|
.small div{
|
||||||
width:100px;
|
width:100px;
|
||||||
height:100px;
|
height:100px;
|
||||||
|
@ -1,16 +1,9 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
<script type="text/javascript" src="test.js"></script>
|
||||||
<script type="text/javascript" src="../external/jquery-1.6.2.min.js"></script>
|
|
||||||
<script type="text/javascript" src="../build/html2canvas.js"></script>
|
|
||||||
<script type="text/javascript" src="../build/jquery.plugin.html2canvas.js"></script>
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
h2cSelector = '#bar';
|
||||||
$('#bar').html2canvas();
|
|
||||||
// var ss = $('ul').offset();
|
|
||||||
// alert(ss.left);
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
<title>
|
<title>
|
||||||
display/box/float/clear test
|
display/box/float/clear test
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
Released under MIT License
|
Released under MIT License
|
||||||
*/
|
*/
|
||||||
|
var h2cSelector = document.body, h2cOptions;
|
||||||
(function(document, window) {
|
(function(document, window) {
|
||||||
var scrStart = '<script type="text/javascript" src="', scrEnd = '"></script>';
|
var scrStart = '<script type="text/javascript" src="', scrEnd = '"></script>';
|
||||||
document.write(scrStart + '../external/jquery-1.6.2.js' + scrEnd);
|
document.write(scrStart + '../external/jquery-1.6.2.js' + scrEnd);
|
||||||
@ -17,12 +18,12 @@
|
|||||||
window.setUp();
|
window.setUp();
|
||||||
}
|
}
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$(document.body).html2canvas((typeof h2cOptions !== "undefined") ? h2cOptions : {
|
$(h2cSelector).html2canvas($.extend({
|
||||||
flashcanvas: "../external/flashcanvas.min.js",
|
flashcanvas: "../external/flashcanvas.min.js",
|
||||||
logging: true,
|
logging: true,
|
||||||
profile: true,
|
profile: true,
|
||||||
useCORS: true
|
useCORS: true
|
||||||
});
|
}, h2cOptions));
|
||||||
}, 100);
|
}, 100);
|
||||||
};
|
};
|
||||||
}(document, window));
|
}(document, window));
|
||||||
|
Loading…
Reference in New Issue
Block a user