From 4a891598fd1d869334a17aa573dd533b80957ddf Mon Sep 17 00:00:00 2001 From: zadit frontend Date: Wed, 31 Jul 2024 17:33:09 +0000 Subject: [PATCH] mantab chatgot --- src/components/TableMaps.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/TableMaps.js b/src/components/TableMaps.js index b997f4a..5b1dfff 100644 --- a/src/components/TableMaps.js +++ b/src/components/TableMaps.js @@ -7,7 +7,6 @@ const getTables = async (cafeId) => { { tableId: 2, xposition: 30, yposition: 1, cafeId: 5, tableNo: 2 }, { tableId: 3, xposition: 50, yposition: 70, cafeId: 5, tableNo: 3 }, { tableId: 4, xposition: 200, yposition: 70, cafeId: 5, tableNo: 4 }, - { tableId: 5, xposition: -200, yposition: 70, cafeId: 5, tableNo: 4 }, ]; }; @@ -86,14 +85,17 @@ const TableCanvas = () => { yposition: (table.yposition - minY) * scale + padding, })); - // Draw the tables as rectangles and print table numbers + // Draw the tables as rectangles first scaledTables.forEach((table) => { context.beginPath(); context.rect(table.xposition, table.yposition, rectWidth, rectHeight); context.fillStyle = "blue"; context.fill(); context.stroke(); + }); + // Then draw the table numbers on top + scaledTables.forEach((table) => { context.font = "12px Arial"; context.fillStyle = "white"; context.textAlign = "center";