From 38805ad900a3945e02b8c009002fb36c6e3cfb54 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Fri, 14 Sep 2018 01:41:37 +0000 Subject: [PATCH] Fix --- commands/image-edit/demotivational-poster.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/image-edit/demotivational-poster.js b/commands/image-edit/demotivational-poster.js index 35d59744..d96ed754 100644 --- a/commands/image-edit/demotivational-poster.js +++ b/commands/image-edit/demotivational-poster.js @@ -52,10 +52,10 @@ module.exports = class DemotivationalPosterCommand extends Command { ctx.fillRect(0, 0, canvas.width, canvas.height); const ratio = data.width / data.height; const widthHigher = data.width >= data.height; - const width = widthHigher ? 602 : Math.min(Math.round(402 / ratio), 602); - const height = widthHigher ? Math.min(Math.round(602 * ratio), 402) : 402; + const width = widthHigher ? Math.min(Math.round(402 / ratio), 602) : 602; + const height = widthHigher ? 402 : Math.min(Math.round(602 * ratio), 402); const x = (canvas.width / 2) - (width / 2); - const y = (402 / 2) - (height / 2); + const y = 44 + ((402 / 2) - (height / 2)); ctx.fillStyle = 'white'; ctx.fillRect(x - 4, y - 4, width + 8, height + 8); ctx.fillStyle = 'black';