nf-photo-collage
Advanced tools
Comparing version 1.1.5 to 1.1.6
13
index.js
@@ -67,2 +67,3 @@ "use strict"; | ||
{field: "backgroundColor", default: "#eeeeee"}, | ||
{field: "backgroundImage", default: ""}, | ||
{field: "lines", default: []}, | ||
@@ -95,2 +96,14 @@ {field: "textStyle", default: {}}, | ||
ctx.fillRect(0, 0, canvasWidth, canvasHeight); | ||
if(options.backgroundImage != "") { | ||
try { | ||
const bckgBuffer = getPhoto(options.backgroundImage); | ||
const image = new Image(); | ||
image.src = bckgBuffer; | ||
ctx.drawImage(image, 0, 0, canvasWidth, canvasHeight) | ||
} catch (e) { | ||
throw new Error(`Unable to load background image`); | ||
} | ||
} | ||
const sources = options.sources; | ||
@@ -97,0 +110,0 @@ let maxImages = options.width * options.height; |
{ | ||
"name": "nf-photo-collage", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12488
193