mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Fix background rendering regression #496
This commit is contained in:
@ -114,6 +114,8 @@ Color.prototype.namedColor = function(value) {
|
||||
return !!color;
|
||||
};
|
||||
|
||||
Color.prototype.isColor = true;
|
||||
|
||||
// JSON.stringify([].slice.call($$('.named-color-table tr'), 1).map(function(row) { return [row.childNodes[3].textContent, row.childNodes[5].textContent.trim().split(",").map(Number)] }).reduce(function(data, row) {data[row[0]] = row[1]; return data}, {}))
|
||||
var colors = {
|
||||
"aliceblue": [240, 248, 255],
|
||||
|
@ -15,7 +15,7 @@ function CanvasRenderer(width, height) {
|
||||
CanvasRenderer.prototype = Object.create(Renderer.prototype);
|
||||
|
||||
CanvasRenderer.prototype.setFillStyle = function(fillStyle) {
|
||||
this.ctx.fillStyle = typeof(fillStyle) === "object" ? fillStyle.toString() : fillStyle;
|
||||
this.ctx.fillStyle = typeof(fillStyle) === "object" && !!fillStyle.isColor ? fillStyle.toString() : fillStyle;
|
||||
return this.ctx;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user