Merge pull request #67 from cobexer/some-fixes

Some fixes
This commit is contained in:
Niklas von Hertzen 2012-03-03 06:42:46 -08:00
commit 946bdef0d4
4 changed files with 15 additions and 16 deletions

View File

@ -1196,7 +1196,7 @@ _html2canvas.Parse = function ( images, options ) {
}
stack.backgroundColor = getCSS( body, "backgroundColor" );
stack.backgroundColor = getCSS( document.documentElement, "backgroundColor" );
return stack;

View File

@ -10,7 +10,12 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="test.js"></script>
<style>
html {
background-color: red;
}
body {
background-color: lime;
}
.small div{
width:100px;
height:100px;
@ -106,4 +111,4 @@
</div>
</body>
</html>
</html>

View File

@ -1,22 +1,15 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html>
<head>
<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" src="test.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#bar').html2canvas();
// var ss = $('ul').offset();
// alert(ss.left);
});
h2cSelector = '#bar';
</script>
<title>
display/box/float/clear test
display/box/float/clear test
</title>
<style type="text/css">
/* last modified: 1 Dec 98 */
/* last modified: 1 Dec 98 */
html {
font: 10px/1 Verdana, sans-serif;

View File

@ -5,6 +5,7 @@
Released under MIT License
*/
var h2cSelector = document.body, h2cOptions;
(function(document, window) {
var scrStart = '<script type="text/javascript" src="', scrEnd = '"></script>';
document.write(scrStart + '../external/jquery-1.6.2.js' + scrEnd);
@ -17,12 +18,12 @@
window.setUp();
}
setTimeout(function() {
$(document.body).html2canvas((typeof h2cOptions !== "undefined") ? h2cOptions : {
$(h2cSelector).html2canvas($.extend({
flashcanvas: "../external/flashcanvas.min.js",
logging: true,
profile: true,
useCORS: true
});
}, h2cOptions));
}, 100);
};
}(document, window));