1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-26 17:54:52 +02:00

static property fix

This commit is contained in:
Pomax
2020-09-25 21:27:29 -07:00
parent d1caf2f8dc
commit 04268b86ec
8 changed files with 12 additions and 10 deletions

View File

@@ -37,8 +37,6 @@ CustomElement.register(class ProgramCode extends HTMLElement {});
* Our custom element
*/
class GraphicsElement extends CustomElement {
static DEBUG = false;
/**
* Create an instance of this element
*/
@@ -347,8 +345,12 @@ class GraphicsElement extends CustomElement {
}
}
// Register our custom element
CustomElement.register(GraphicsElement);
// static property to regular debugging
GraphicsElement.DEBUG = false;
// debugging should be behind a flag
function debugLog(...data) {
if (GraphicsElement.DEBUG) {

View File

@@ -86,9 +86,9 @@ class Bezier {
this.update();
}
static SVGtoBeziers = function (d) {
static SVGtoBeziers(d) {
return convertPath(Bezier, d);
};
}
static quadraticFromPoints(p1, p2, p3, t) {
if (typeof t === "undefined") {