nf-photo-collage
Advanced tools
Comparing version 1.2.1 to 1.2.2
14
index.js
@@ -82,6 +82,2 @@ "use strict"; | ||
let maxImages = options.width * options.height; | ||
if ((options.header || {}).image) { | ||
maxImages += 1; | ||
sources.unshift(options.header.image); | ||
} | ||
@@ -96,13 +92,5 @@ return Promise | ||
if ((options.header || {}).image) { // only for header | ||
if (!i) { // first time | ||
ctx.drawImage(img, 0, 0, canvasWidth, options.header.height); | ||
return; | ||
} | ||
i -= 1; | ||
} | ||
const x = (i % options.width) * (options.imageWidth + options.spacing); | ||
const y = Math.floor(i / options.width) * (options.imageHeight + options.spacing); | ||
ctx.drawImage(img, x, y + headerHeight, options.imageWidth, options.imageHeight); | ||
ctx.drawImage(img, x, y, options.imageWidth, options.imageHeight); | ||
}) | ||
@@ -109,0 +97,0 @@ .then(() => {}) |
{ | ||
"name": "nf-photo-collage", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"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
10007
144