From c97e99b611c2b48b06aa59fd0dc604b08710eccb Mon Sep 17 00:00:00 2001 From: gc <30398469+gc@users.noreply.github.com> Date: Fri, 23 Aug 2024 21:00:51 +1000 Subject: [PATCH] Cleanup new bankimage code a bit --- src/lib/bankImage.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/bankImage.ts b/src/lib/bankImage.ts index 47ca2a27e9..95279e1eb4 100644 --- a/src/lib/bankImage.ts +++ b/src/lib/bankImage.ts @@ -428,7 +428,7 @@ export class BankImageTask { ctx: SKRSContext2D; x: number; y: number; - outline?: { outlineColor: string; outlineWidth: number; alpha: number }; + outline?: { outlineColor: string; alpha: number }; }) { const data = this.spriteSheetData[itemID]; const drawOptions = { @@ -456,8 +456,8 @@ export class BankImageTask { drawOptions.sourceHeight = height; } - drawOptions.destX = floor(x + (itemSize - drawOptions.sourceWidth) / 2) + 2; - drawOptions.destY = floor(y + (itemSize - drawOptions.sourceHeight) / 2); + drawOptions.destX = Math.floor(x + (itemSize - drawOptions.sourceWidth) / 2) + 2; + drawOptions.destY = Math.floor(y + (itemSize - drawOptions.sourceHeight) / 2); if (outline) { ctx.filter = `drop-shadow(0px 0px 2px ${outline.outlineColor})`; @@ -621,7 +621,7 @@ export class BankImageTask { ctx, x: xLoc, y: yLoc, - outline: isNewCLItem ? { outlineColor: '#ac7fff', outlineWidth: 1, alpha: 1 } : undefined + outline: isNewCLItem ? { outlineColor: '#ac7fff', alpha: 1 } : undefined }); // Do not draw the item qty if there is 0 of that item in the bank