From 512670e3bc972df5fcd1f0f2ade09ab4b86ba0ed Mon Sep 17 00:00:00 2001 From: Norman Koch Date: Thu, 26 Sep 2024 21:58:10 +0200 Subject: [PATCH] fix --- gui.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gui.js b/gui.js index e44b37dba2..e2caef7db7 100644 --- a/gui.js +++ b/gui.js @@ -8252,14 +8252,13 @@ function _draw_flatten (layerId, ctx, meta_info, maxShapeSize, canvasHeight, lay var normalizedValues = normalizeArray(this_layer_output); - // Zeichnen der horizontalen Linien basierend auf den normalisierten Werten var numValues = normalizedValues.length; - var lineHeight = _height / numValues; // Höhe einer einzelnen Linie + var lineHeight = _height / numValues; for (var i = 0; i < numValues; i++) { var colorValue = Math.abs(255 - Math.round(normalizedValues[i])); var _rgb = `rgb(${colorValue}, ${colorValue}, ${colorValue})`; - ctx.fillStyle = _rgb; // RGB-Wert + ctx.fillStyle = _rgb; ctx.fillRect(_x, _y + i * lineHeight, _width, lineHeight); }