Fixed size adjustment
This commit is contained in:
parent
868109fe65
commit
7d18a2e60d
1 changed files with 4 additions and 4 deletions
8
index.js
8
index.js
|
@ -69,11 +69,11 @@ function render(template, img, size) {
|
||||||
imageOffsetY = -templateOffsetY;
|
imageOffsetY = -templateOffsetY;
|
||||||
templateOffsetY = 0;
|
templateOffsetY = 0;
|
||||||
}
|
}
|
||||||
if(template.image.width * templateScale > resultingWidth) {
|
if(templateOffsetX + template.image.width * templateScale > resultingWidth) {
|
||||||
resultingWidth = template.image.width * templateScale;
|
resultingWidth = templateOffsetX + template.image.width * templateScale;
|
||||||
}
|
}
|
||||||
if(template.image.height * templateScale > resultingHeight) {
|
if(templateOffsetY + template.image.height * templateScale > resultingHeight) {
|
||||||
resultingHeight = template.image.height * templateScale;
|
resultingHeight = templateOffsetY + template.image.height * templateScale;
|
||||||
}
|
}
|
||||||
|
|
||||||
const toDraw = [{
|
const toDraw = [{
|
||||||
|
|
Reference in a new issue