make layer config option

This commit is contained in:
j 2021-10-21 14:39:38 +01:00
parent 84368d5dee
commit 99ec58bdb0

View file

@ -203,7 +203,7 @@ function loadItem(config) {
var first var first
formatInfo(config, ascroll) formatInfo(config, ascroll)
response.data.layers[layer].forEach(annotation => { response.data.layers[config.layer].forEach(annotation => {
if (config.user && annotation.user != config.user) { if (config.user && annotation.user != config.user) {
return return
} }
@ -248,7 +248,7 @@ function loadEdit(config) {
formatInfo(config, ascroll) formatInfo(config, ascroll)
response.data.clips.forEach(clip => { response.data.clips.forEach(clip => {
clip.layers[layer].forEach(annotation => { clip.layers[config.layer].forEach(annotation => {
if (config.user && annotation.user != config.user) { if (config.user && annotation.user != config.user) {
return return
} }
@ -288,6 +288,8 @@ function loadEdit(config) {
}) })
} }
config.layer = config.layer || layer
if (config.item) { if (config.item) {
loadItem(config) loadItem(config)
} else if (config.edit) { } else if (config.edit) {