Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NormanTUD committed Sep 26, 2024
1 parent 3073114 commit 512670e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions gui.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 512670e

Please sign in to comment.