run setPen on start

This commit is contained in:
awesomeuser 2023-08-04 19:10:33 +00:00
parent 4100c21702
commit bf041eef75

View file

@ -153,6 +153,9 @@
const bits = document.getElementById("image-bits");
const ctx = canvas.getContext("2d");
// tools
var currentTool;
const pen = ctx.createImageData(2, 2);
for (let i = 0; i < pen.data.length; i += 4) {
pen.data[i+3] = 255;
@ -165,8 +168,6 @@
}
const eraserButton = document.getElementById("eraser-button");
var currentTool = pen;
var drawing = false;
canvas.onmousedown = function() { drawing = true; }
document.onmouseup = function() {
@ -215,6 +216,8 @@
function clearCanvas() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
}
setPen();
</script>
<!-- save most recent signature as a cookie and autoload on page load -->
@ -232,14 +235,14 @@
}
</script>
<!--<h1 class="feed-header">Farp highlights</h1>-->
<!--
<div class="post">
Furp social is currently under construction as we implement oekaki farping. Come back soon!
</div>
-->
<!--<h1 class="feed-header">Farp highlights</h1>-->
</div>
<div id="content-column">