add error squiggles to brush editor

gosh I hate this code. CSS custom highlight API when, pleeeeeease Firefooooox
This commit is contained in:
りき萌 2024-09-06 22:50:25 +02:00
parent c59a651ea3
commit ec773b7fe1
5 changed files with 259 additions and 45 deletions

View file

@ -431,14 +431,16 @@ class CanvasRenderer extends HTMLElement {
}
async #zoomingBehaviour() {
while (true) {
let event = await listen([this, "wheel"]);
// TODO: Touchpad zoom
this.viewport.zoomIn(event.deltaY > 0 ? -1 : 1);
this.sendViewportUpdate();
this.dispatchEvent(new Event(".viewportUpdateEnd"));
}
this.addEventListener(
"wheel",
(event) => {
// TODO: Touchpad zoom
this.viewport.zoomIn(event.deltaY > 0 ? -1 : 1);
this.sendViewportUpdate();
this.dispatchEvent(new Event(".viewportUpdateEnd"));
},
{ bubbling: false },
);
}
async #paintingBehaviour() {