diff --git a/src/ui/render2Delements.js b/src/ui/render2Delements.js index dd9ca9b0..dbcf3b6b 100644 --- a/src/ui/render2Delements.js +++ b/src/ui/render2Delements.js @@ -140,14 +140,18 @@ export function renderOverlay( context.scale(offscreenScale, offscreenScale); context.globalAlpha = state.templates.oOpacity / 100; for (const template of templates) { - const tempWidth = template.x - x + width / 2 / offscreenScale; - const tempHeight = template.y - y + height / 2 / offscreenScale; - if (tempWidth < 1 || tempHeight < 1) continue; + if (template.width * offscreenScale < 1 + || template.height * offscreenScale < 1 + ) continue; const image = templateLoader.getTemplateSync(template.imageId); if (!image) continue; - context.drawImage(image, tempWidth, tempHeight); + context.drawImage( + image, + template.x - x + width / 2 / offscreenScale, + template.y - y + height / 2 / offscreenScale, + ); } context.restore(); }