From 559bbeaef1bd5a2f7d462e2d26f3ec575dec8aa5 Mon Sep 17 00:00:00 2001 From: CodeExplode <79982924+CodeExplode@users.noreply.github.com> Date: Mon, 7 Nov 2022 18:55:45 +1100 Subject: [PATCH] Enlarged embedding weight markers --- javascript/embedding_editor.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/javascript/embedding_editor.js b/javascript/embedding_editor.js index e754d65..fdf3328 100644 --- a/javascript/embedding_editor.js +++ b/javascript/embedding_editor.js @@ -23,14 +23,15 @@ function embedding_editor_update_guidance(col_weights) { let variant = variants[j], color = variant.color, weight = variant.weight * 100, // currently in decimal format - start = Math.max(previous, weight-1), - end = Math.max(previous, weight+1); + start = Math.max(previous, weight-2), + end = Math.max(previous, weight+2); - bg += ', ' + transparent + ' ' + previous + '%'; - bg += ', ' + transparent + ' ' + start + '%'; - //bg += ', ' + color + ' ' + start + '%'; - //bg += ', ' + color + ' ' + end + '%'; - bg += ', ' + color + ' ' + weight + '%'; + if (previous < start) + bg += ', ' + transparent + ' ' + previous + '%'; + bg += ', ' + transparent + ' ' + start + '%'; + + bg += ', ' + color + ' ' + Math.max(previous, weight-1) + '%'; + bg += ', ' + color + ' ' + Math.max(previous, weight+1) + '%'; previous = end; }