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) {