test bits

This commit is contained in:
awesomeuser 2023-08-04 15:46:55 +00:00
parent 875feccc63
commit 31b7aa72ed

View file

@ -119,6 +119,7 @@
<script>
const canvas = document.getElementById("canvas-input");
const bits = document.getElementById("image-bits");
const ctx = canvas.getContext("2d");
const pen = ctx.createImageData(2, 2);
@ -131,7 +132,11 @@
var drawing = false;
canvas.onmousedown = function() { drawing = true; }
document.onmouseup = function() { drawing = false; }
document.onmouseup = function() {
drawing = false;
// write image-bits for posting
bits.value = "101";
}
canvas.onmousemove = function() {
if (drawing) {