Merge pull request #161 from IBCornelsen/Jens

CAD
This commit is contained in:
Jens Cornelsen
2024-12-09 15:17:52 +01:00
committed by GitHub

View File

@@ -29,7 +29,7 @@ import Widget2 from "#components/Widget.svelte";
const ctx = canvas.getContext('2d');
const lineLog = document.getElementById('line-log');
const pixelToMeter = 0.01; // Conversion factor: 1 pixel = 0.01 meter
const gridSize = 5; // Size of each grid cell in pixels
const gridSize = 10; // Size of each grid cell in pixels (set to 10 for coarser grid)
let startX = null;
let startY = null;
let capturedLines = [];
@@ -110,6 +110,8 @@ import Widget2 from "#components/Widget.svelte";
// Drawing functions
function drawLine(x1, y1, x2, y2) {
ctx.beginPath();
ctx.strokeStyle = "#000000"; // Black color for lines
ctx.lineWidth = 2; // Thicker lines
ctx.moveTo(x1, y1);
ctx.lineTo(x2, y2);
ctx.stroke();