This commit is contained in:
Jens Cornelsen
2024-12-09 22:27:02 +01:00
parent e595b5d4c4
commit 625ed56b50
3 changed files with 87 additions and 33 deletions

View File

@@ -1,33 +1,4 @@
<style>
body {
font-family: Arial, sans-serif;
display: flex;
flex-direction: column;
align-items: center;
margin: 0;
padding: 0;
}
canvas {
border: 1px solid #ccc;
cursor: crosshair;
}
.controls {
margin: 10px;
}
.controls button {
margin-right: 5px;
}
.log {
margin: 10px;
width: 800px;
max-height: 150px;
overflow-y: auto;
border: 1px solid #ccc;
padding: 10px;
background: #f9f9f9;
}
</style>
<div class="controls">
<button onclick="clearCanvas()">Clear</button>
</div>
@@ -38,7 +9,7 @@
</div>
<script type="ts">
const canvas = document.getElementById('cadCanvas') as HTMLCanvasElement;
const ctx = canvas.getContext('2d') as CanvasRenderingContext2D;
const lineLog = document.getElementById('line-log') as HTMLUListElement;