fix annotation filter
This commit is contained in:
parent
4a66433478
commit
b9d956d072
1 changed files with 4 additions and 6 deletions
|
@ -205,8 +205,9 @@ async function loadClips(annotations) {
|
||||||
}
|
}
|
||||||
previous = annotation
|
previous = annotation
|
||||||
})
|
})
|
||||||
|
if (annotations.length) {
|
||||||
annotations[annotations.length - 1].color2 = annotations[0].color1
|
annotations[annotations.length - 1].color2 = annotations[0].color1
|
||||||
console.log(annotations)
|
}
|
||||||
return annotations
|
return annotations
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -236,11 +237,8 @@ function loadItem(config) {
|
||||||
var first
|
var first
|
||||||
var info = formatInfo(config, ascroll)
|
var info = formatInfo(config, ascroll)
|
||||||
var annotations = response.data.layers[config.layer].filter(annotation => {
|
var annotations = response.data.layers[config.layer].filter(annotation => {
|
||||||
if (config.user && annotation.user != config.user) {
|
return !(config.user && annotation.user != config.user)
|
||||||
return true
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
loadClips(annotations).then(annotations => {
|
loadClips(annotations).then(annotations => {
|
||||||
annotations.forEach(annotation => {
|
annotations.forEach(annotation => {
|
||||||
var div = document.createElement('div')
|
var div = document.createElement('div')
|
||||||
|
|
Loading…
Reference in a new issue