mirror of
https://github.com/niklasvh/html2canvas.git
synced 2023-08-10 21:13:10 +03:00
Fix backgroundColor option documentation (Fix #1164)
This commit is contained in:
parent
77d258f1d8
commit
3965a0fd40
@ -13,7 +13,7 @@ These are all of the available configuration options.
|
||||
| ------------- | :------: | ----------- |
|
||||
| async | `true` | Whether to parse and render the element asynchronously
|
||||
| allowTaint | `false` | Whether to allow cross-origin images to taint the canvas
|
||||
| backgroundColor | `#ffffff` | Canvas background color, if none is specified in DOM. Set undefined for transparent
|
||||
| backgroundColor | `#ffffff` | Canvas background color, if none is specified in DOM. Set `null` for transparent
|
||||
| canvas | `null` | Existing `canvas` element to use as a base for drawing on
|
||||
| foreignObjectRendering | `false` | Whether to use ForeignObject rendering if the browser supports it
|
||||
| imageTimeout | `15000` | Timeout for loading an image (in milliseconds). Set to `0` to disable timeout.
|
||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "html2canvas",
|
||||
"version": "1.0.0-alpha.1",
|
||||
"version": "1.0.0-alpha.4",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -353,8 +353,8 @@ export default class Renderer {
|
||||
render(stack: StackingContext): Promise<*> {
|
||||
if (this.options.backgroundColor) {
|
||||
this.target.rectangle(
|
||||
0,
|
||||
0,
|
||||
this.options.x,
|
||||
this.options.y,
|
||||
this.options.width,
|
||||
this.options.height,
|
||||
this.options.backgroundColor
|
||||
|
@ -64,6 +64,7 @@ const html2canvas = (element: HTMLElement, conf: ?Options): Promise<*> => {
|
||||
const defaultOptions = {
|
||||
async: true,
|
||||
allowTaint: false,
|
||||
backgroundColor: '#ffffff',
|
||||
imageTimeout: 15000,
|
||||
logging: true,
|
||||
proxy: null,
|
||||
|
Loading…
Reference in New Issue
Block a user