From 99ec58bdb00955846fc9f6c8c55d111e2948f757 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 21 Oct 2021 14:39:38 +0100 Subject: [PATCH] make layer config option --- app/static/js/ascroll.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/static/js/ascroll.js b/app/static/js/ascroll.js index 8944d57..68953eb 100644 --- a/app/static/js/ascroll.js +++ b/app/static/js/ascroll.js @@ -203,7 +203,7 @@ function loadItem(config) { var first formatInfo(config, ascroll) - response.data.layers[layer].forEach(annotation => { + response.data.layers[config.layer].forEach(annotation => { if (config.user && annotation.user != config.user) { return } @@ -248,7 +248,7 @@ function loadEdit(config) { formatInfo(config, ascroll) response.data.clips.forEach(clip => { - clip.layers[layer].forEach(annotation => { + clip.layers[config.layer].forEach(annotation => { if (config.user && annotation.user != config.user) { return } @@ -288,6 +288,8 @@ function loadEdit(config) { }) } +config.layer = config.layer || layer + if (config.item) { loadItem(config) } else if (config.edit) {