nf-photo-collage
Advanced tools
Comparing version 1.1.11 to 1.1.12
26
index.js
@@ -133,17 +133,17 @@ "use strict"; | ||
.then(() => { | ||
if (options.text) { | ||
ctx.font = (options.textStyle.fontSize || "20") + "px " + (options.textStyle.font || "Helvetica"); | ||
wrapText(ctx, options.text, 10, canvasHeight - (options.textStyle.height || 200) + 50, canvasWidth - 10, (options.textStyle.fontSize || 20) * 1.2); | ||
} | ||
else { | ||
let curHeight = 150; | ||
options.lines.map((line) => { | ||
ctx.font = line.font || "20px Helvetica"; | ||
ctx.fillStyle = line.color || "#333333"; | ||
const heightUsed = wrapText(ctx, line.text, 10, canvasHeight - curHeight, canvasWidth - 10, (parseInt(line.font) || 20) * 1.2); | ||
curHeight -= heightUsed; | ||
}); | ||
} | ||
// if (options.text) { | ||
// ctx.font = (options.textStyle.fontSize || "20") + "px " + (options.textStyle.font || "Helvetica"); | ||
// wrapText(ctx, options.text, 10, canvasHeight - (options.textStyle.height || 200) + 50, canvasWidth - 10, (options.textStyle.fontSize || 20) * 1.2); | ||
// } | ||
// else { | ||
// let curHeight = 150; | ||
// options.lines.map((line) => { | ||
// ctx.font = line.font || "20px Helvetica"; | ||
// ctx.fillStyle = line.color || "#333333"; | ||
// const heightUsed = wrapText(ctx, line.text, 10, canvasHeight - curHeight, canvasWidth - 10, (parseInt(line.font) || 20) * 1.2); | ||
// curHeight -= heightUsed; | ||
// }); | ||
// } | ||
}) | ||
.return(canvas); | ||
}; |
{ | ||
"name": "nf-photo-collage", | ||
"version": "1.1.11", | ||
"version": "1.1.12", | ||
"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
12496