From 2b7975ab895e07b058cd444fe60bf35f88935be7 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 6 Sep 2022 22:31:25 +0200 Subject: [PATCH] compute clipId before clamping in/out --- app/static/js/ascroll.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/static/js/ascroll.js b/app/static/js/ascroll.js index ae90fff..2ad9d50 100755 --- a/app/static/js/ascroll.js +++ b/app/static/js/ascroll.js @@ -201,7 +201,7 @@ async function loadClips(annotations) { var previous annotations.forEach(annotation => { - var clipId = annotation.id.split('/')[0] + '/' + annotation.in.toFixed(3) + '-'+ annotation.out.toFixed(3) + var clipId = annotation.clipId if (!colors[clipId]) { return } @@ -261,6 +261,7 @@ async function loadAnnotations(config) { console.log("ERROR", config.item, layer, "missing", config.root) } response.data.layers[layer] && response.data.layers[layer].forEach(annotation => { + annotation.clipId = annotation.id.split('/')[0] + '/' + annotation.in.toFixed(3) + '-'+ annotation.out.toFixed(3) if (!(config.user && annotation.user != config.user) && isInside(config, annotation)) { annotations.push(annotation) }