fix annotation filter

This commit is contained in:
j 2021-10-21 16:39:49 +01:00
parent 4a66433478
commit b9d956d072

View file

@ -205,8 +205,9 @@ async function loadClips(annotations) {
}
previous = annotation
})
if (annotations.length) {
annotations[annotations.length - 1].color2 = annotations[0].color1
console.log(annotations)
}
return annotations
})
}
@ -236,11 +237,8 @@ function loadItem(config) {
var first
var info = formatInfo(config, ascroll)
var annotations = response.data.layers[config.layer].filter(annotation => {
if (config.user && annotation.user != config.user) {
return true
}
return !(config.user && annotation.user != config.user)
})
loadClips(annotations).then(annotations => {
annotations.forEach(annotation => {
var div = document.createElement('div')