Merge pull request #25 from kilokeith/width_fix

Fixed a width/height issue that caused smaller elements to render full bo
This commit is contained in:
Niklas von Hertzen 2011-10-15 02:14:20 -07:00
commit 962d5b8e8d

View File

@ -2,8 +2,8 @@ html2canvas.Renderer = function(parseQueue, opts){
var options = {
"width": 0,
"height": 0,
"width": null,
"height": null,
"renderer": "canvas"
},
queue = [],
@ -73,8 +73,8 @@ html2canvas.Renderer = function(parseQueue, opts){
storageLen,
renderItem;
canvas.width = Math.max(zStack.ctx.width, options.width);
canvas.height = Math.max(zStack.ctx.height, options.height);
canvas.width = options.width || zStack.ctx.width;
canvas.height = options.height || zStack.ctx.height;
for (i = 0, queueLen = queue.length; i < queueLen; i+=1){