From 59d63bbb77b1b22ccc8fe67df326a96abc6bcc7f Mon Sep 17 00:00:00 2001 From: BroodjeAap Date: Sun, 2 Oct 2022 15:23:12 +0000 Subject: [PATCH] dead code cleanup --- static/diagram.js | 34 ---------------------------------- static/diagram.ts | 24 ------------------------ 2 files changed, 58 deletions(-) diff --git a/static/diagram.js b/static/diagram.js index 80c1177..6e7fdba 100644 --- a/static/diagram.js +++ b/static/diagram.js @@ -22,22 +22,6 @@ var __values = (this && this.__values) || function(o) { }; throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); }; -var __read = (this && this.__read) || function (o, n) { - var m = typeof Symbol === "function" && o[Symbol.iterator]; - if (!m) return o; - var i = m.call(o), r, ar = [], e; - try { - while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); - } - catch (error) { e = { error: error }; } - finally { - try { - if (r && !r.done && (m = i["return"])) m.call(i); - } - finally { if (e) throw e.error; } - } - return ar; -}; var CanvasObject = /** @class */ (function () { function CanvasObject(x, y, width, height) { this.x = x; @@ -413,22 +397,6 @@ var DiagramNode = /** @class */ (function (_super) { } return true; }; - DiagramNode.prototype.getInputCircleXY = function () { - return [this.x, this.y + this.height / 2]; - }; - DiagramNode.prototype.getOutputCircleXY = function () { - return [this.x + this.width, this.y + this.height / 2]; - }; - DiagramNode.prototype.pointInInputCircle = function (x, y) { - var _a = __read(this.getInputCircleXY(), 2), circleX = _a[0], circleY = _a[1]; - var radiusSqrd = Math.pow(this.height / 3, 2); - return Math.pow(x - circleX, 2) + Math.pow(y - circleY, 2) <= radiusSqrd; - }; - DiagramNode.prototype.pointInOutputCircle = function (x, y) { - var _a = __read(this.getOutputCircleXY(), 2), circleX = _a[0], circleY = _a[1]; - var radiusSqrd = Math.pow(this.height / 3, 2); - return Math.pow(x - circleX, 2) + Math.pow(y - circleY, 2) <= radiusSqrd; - }; return DiagramNode; }(CanvasObject)); var _diagram; @@ -637,8 +605,6 @@ var Diagrams = /** @class */ (function () { this.ctx.lineWidth = 5; this.ctx.strokeRect(0, 0, this.canvas.width, this.canvas.height); }; - Diagrams.prototype.draw = function () { - }; Diagrams.prototype.addNode = function (id, x, y, label, meta, results, logs) { if (meta === void 0) { meta = {}; } if (results === void 0) { results = new Array(); } diff --git a/static/diagram.ts b/static/diagram.ts index 77f697a..84b95b7 100644 --- a/static/diagram.ts +++ b/static/diagram.ts @@ -475,26 +475,6 @@ class DiagramNode extends CanvasObject { } return true; } - - getInputCircleXY(){ - return [this.x, this.y + this.height / 2] - } - - getOutputCircleXY(){ - return [this.x + this.width, this.y + this.height / 2] - } - - pointInInputCircle(x: number, y: number){ - let [circleX, circleY] = this.getInputCircleXY() - let radiusSqrd = Math.pow(this.height / 3, 2); - return Math.pow(x - circleX, 2) + Math.pow(y - circleY, 2) <= radiusSqrd; - } - - pointInOutputCircle(x: number, y: number){ - let [circleX, circleY] = this.getOutputCircleXY() - let radiusSqrd = Math.pow(this.height / 3, 2); - return Math.pow(x - circleX, 2) + Math.pow(y - circleY, 2) <= radiusSqrd; - } } let _diagram: Diagrams; @@ -671,10 +651,6 @@ class Diagrams { this.ctx.strokeRect(0, 0, this.canvas.width, this.canvas.height); } - draw(){ - - } - addNode( id: number, x: number,