mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
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:
commit
962d5b8e8d
@ -2,8 +2,8 @@ html2canvas.Renderer = function(parseQueue, opts){
|
|||||||
|
|
||||||
|
|
||||||
var options = {
|
var options = {
|
||||||
"width": 0,
|
"width": null,
|
||||||
"height": 0,
|
"height": null,
|
||||||
"renderer": "canvas"
|
"renderer": "canvas"
|
||||||
},
|
},
|
||||||
queue = [],
|
queue = [],
|
||||||
@ -73,8 +73,8 @@ html2canvas.Renderer = function(parseQueue, opts){
|
|||||||
storageLen,
|
storageLen,
|
||||||
renderItem;
|
renderItem;
|
||||||
|
|
||||||
canvas.width = Math.max(zStack.ctx.width, options.width);
|
canvas.width = options.width || zStack.ctx.width;
|
||||||
canvas.height = Math.max(zStack.ctx.height, options.height);
|
canvas.height = options.height || zStack.ctx.height;
|
||||||
|
|
||||||
|
|
||||||
for (i = 0, queueLen = queue.length; i < queueLen; i+=1){
|
for (i = 0, queueLen = queue.length; i < queueLen; i+=1){
|
||||||
|
Loading…
Reference in New Issue
Block a user