CAD
This commit is contained in:
@@ -113,15 +113,25 @@ import Layout from "#layouts/layoutCAD.astro";
|
||||
ctx.stroke();
|
||||
}
|
||||
|
||||
// Clear the canvas and reset logs
|
||||
function clearCanvas() {
|
||||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||
capturedLines = [];
|
||||
startX = null;
|
||||
startY = null;
|
||||
drawGrid(); // Redraw the grid after clearing
|
||||
updateLineLog();
|
||||
}
|
||||
// Löscht den gesamten Canvas
|
||||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||
|
||||
// Setzt die Liste der gezeichneten Linien und Punkte zurück
|
||||
capturedLines = [];
|
||||
firstStartPoint = null;
|
||||
lastEndPoint = null;
|
||||
|
||||
// Zeichnet das Raster neu
|
||||
drawGrid();
|
||||
|
||||
// Aktualisiert das Log, um es zu leeren
|
||||
updateLineLog();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Update the captured lines log
|
||||
function updateLineLog() {
|
||||
|
||||
Reference in New Issue
Block a user