From b4967ca9b00aa0161fa7c5479d2e1b9963517c1a Mon Sep 17 00:00:00 2001 From: BroodjeAap Date: Mon, 3 Oct 2022 20:32:13 +0000 Subject: [PATCH] fixed relative pos of warning sign --- static/diagram.js | 8 ++++---- static/diagram.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/static/diagram.js b/static/diagram.js index 6e7fdba..fdcf1a3 100644 --- a/static/diagram.js +++ b/static/diagram.js @@ -346,12 +346,12 @@ var DiagramNode = /** @class */ (function (_super) { this.input.draw(ctx, ms); this.output.draw(ctx, ms); if (this.logs.length > 0) { - ctx.moveTo(this.x + 21, this.y + 6); + ctx.moveTo(ms.offset.x + this.x + 21, ms.offset.y + this.y + 6); ctx.fillStyle = "orange"; ctx.beginPath(); - ctx.lineTo(this.x + 23, this.y + 21); - ctx.lineTo(this.x + 6, this.y + 21); - ctx.lineTo(this.x + 14, this.y + 6); + ctx.lineTo(ms.offset.x + this.x + 23, ms.offset.y + this.y + 21); + ctx.lineTo(ms.offset.x + this.x + 6, ms.offset.y + this.y + 21); + ctx.lineTo(ms.offset.x + this.x + 14, ms.offset.y + this.y + 6); ctx.fill(); } ctx.strokeStyle = "#8E8E8E"; diff --git a/static/diagram.ts b/static/diagram.ts index 84b95b7..d831e39 100644 --- a/static/diagram.ts +++ b/static/diagram.ts @@ -416,12 +416,12 @@ class DiagramNode extends CanvasObject { this.output.draw(ctx, ms); if(this.logs.length > 0){ - ctx.moveTo(this.x + 21, this.y + 6); + ctx.moveTo(ms.offset.x + this.x + 21, ms.offset.y + this.y + 6); ctx.fillStyle = "orange"; ctx.beginPath(); - ctx.lineTo(this.x + 23, this.y + 21); - ctx.lineTo(this.x + 6, this.y + 21); - ctx.lineTo(this.x + 14, this.y + 6); + ctx.lineTo(ms.offset.x + this.x + 23, ms.offset.y + this.y + 21); + ctx.lineTo(ms.offset.x + this.x + 6, ms.offset.y + this.y + 21); + ctx.lineTo(ms.offset.x + this.x + 14, ms.offset.y + this.y + 6); ctx.fill(); }