diff --git a/src/node.js b/src/node.js index 4b8071db..8b03b850 100644 --- a/src/node.js +++ b/src/node.js @@ -137,12 +137,14 @@ * @param width Canvas width * @param height Canvas height * @param {Object} options to pass to FabricCanvas. + * @param {Object} options to pass to NodeCanvas. * @return {Object} wrapped canvas instance */ - fabric.createCanvasForNode = function(width, height, options) { + fabric.createCanvasForNode = function(width, height, options, nodeCanvasOptions) { + nodeCanvasOptions = nodeCanvasOptions || options; var canvasEl = fabric.document.createElement('canvas'), - nodeCanvas = new Canvas(width || 600, height || 600); + nodeCanvas = new Canvas(width || 600, height || 600, nodeCanvasOptions); // jsdom doesn't create style on canvas element, so here be temp. workaround canvasEl.style = { };