This commit is contained in:
Dragon Fire
2020-07-14 09:50:46 -04:00
parent 75d696c57e
commit 576f2b5565
+3 -3
View File
@@ -71,9 +71,9 @@ module.exports = class IllegalCommand extends Command {
ctx.textBaseline = 'top';
ctx.font = '20px Impact';
ctx.textAlign = 'center';
const widthMid = frame.corners[2][0] - frame.corners[0][0];
const heightMid = frame.corners[2][1] - frame.corners[0][1];
const maxLen = frame.corners[0][0] - frame.corners[2][0];
const widthMid = frame.corners[0][0] - frame.corners[2][0];
const heightMid = frame.corners[0][1] - frame.corners[2][1];
const maxLen = frame.corners[2][0] - frame.corners[0][0];
console.log(widthMid, 'x', heightMid, 'x', maxLen);
ctx.fillText(`${text}\n${verb} NOW\nILLEGAL`, widthMid, heightMid, maxLen);
encoder.addFrame(ctx);