From 6499d4c146c04ddddf0b598da9800f6baec741eb Mon Sep 17 00:00:00 2001 From: miguel <31931809+miguelvaca@users.noreply.github.com> Date: Tue, 6 Jun 2023 00:58:44 +1000 Subject: [PATCH] Update transformer.html --- transformer.html | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/transformer.html b/transformer.html index 5894b99..e7e36e0 100644 --- a/transformer.html +++ b/transformer.html @@ -2121,23 +2121,34 @@ // Draw the load resistor: fctx.lineWidth = 1; - fctx.strokeRect(x_res -8, originY - 20, 16, 40); + fctx.strokeRect(x_res -8, originY - 30, 16, 60); fctx.beginPath(); fctx.moveTo(x_res, y2); - fctx.lineTo(x_res, originY+20); + fctx.lineTo(x_res, originY+30); fctx.moveTo(x_res, y1); - fctx.lineTo(x_res, originY-20); + fctx.lineTo(x_res, originY-30); fctx.stroke(); + fctx.save(); + fctx.translate(x_res, originY); + fctx.rotate(-Math.PI * 0.5); + fctx.font = "12px arial"; + fctx.textAlign = "center"; + var num = getMetricPrefix(controller.toroid.Zl); + fctx.fillText(num.val.toPrecision(3).toString() + ' ' + num.pfx + "\u03A9", 0, 3); + fctx.restore(); + //fctx.textAlign = "right"; + /* fctx.font = "12px arial"; fctx.textAlign = "center"; fctx.fillText("Z\u2097", x_res, originY); fctx.textAlign = "left"; var num = getMetricPrefix(controller.toroid.Zl); fctx.fillText(num.val.toPrecision(3).toString() + ' ' + num.pfx + "\u03A9", x_res + 15, originY); - + */ + // Draw the Dimensions: fctx.strokeStyle = "black"; fctx.lineWidth = 1;