1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-10-04 03:52:39 +02:00

flattening

This commit is contained in:
Pomax
2020-08-11 18:21:07 -07:00
parent b064c931a5
commit 4e1c844c1d
15 changed files with 190 additions and 104 deletions

View File

@@ -180,8 +180,8 @@ class GraphicsElement extends CustomElement {
// browser landscape, so this is the best I can give you right now. I am more
// disappointed about this than you will ever be.
this.canvas.setAttribute(`tabindex`, `0`);
this.canvas.addEventListener(`touchstart`, evt => this.canvas.focus());
this.canvas.addEventListener(`mousedown`, evt => this.canvas.focus());
this.canvas.addEventListener(`touchstart`, (evt) => this.canvas.focus());
this.canvas.addEventListener(`mousedown`, (evt) => this.canvas.focus());
// If we get here, there were no source code errors: undo the scheduled error print.
clearTimeout(this.errorPrintTimeout);
this.render();
@@ -242,9 +242,8 @@ CustomElement.register(GraphicsElement);
// custom elements have focussabable, slotted elements is to just
// force-scroll the document, so that it knows where it actually is.
if (typeof window !== undefined) {
window.addEventListener(`DOMContentReady`, evt => window.scrollBy(0,1));
setTimeout(() => window.scrollBy(0,1),200);
window.addEventListener(`DOMContentReady`, (evt) => window.scrollBy(0, 1));
setTimeout(() => window.scrollBy(0, 1), 200);
}
export { GraphicsElement };