name="viewport" content="width=device-width, initial-scale=1.0">
Tableau Blanc Interif
canvas id="whiteboard width="800" height="600">
>
const canvas = document.getElementByIdwhiteboard');
const context = canvas.getContext('2d');
isDrawing = false;
canvas.addEventListener('mousedown', startDrawing);
canvas.addEventListener('', draw);
canvas.addEventListener('mouseup', stopDrawing);
function startDrawing(e) {
isDrawing = true;
(e }
function draw(e) {
if (!isDrawing) return;
context.lineWidth = ;
context.lineCap = 'round';
context.strokeStyle = '#000';
context.lineTo(e.clientX - canvas.offsetLeft, e.clientY - canvas);
context.stroke();
context.beginPath();
context(e.clientX - canvas.offsetLeft, e.clientY - canvas.offsetTop);
}
function stop() {
isDrawing = false;
context.beginPath }