extend subtitles for edits too
This commit is contained in:
parent
030f7087f4
commit
092f3c1cd1
2 changed files with 15 additions and 2 deletions
|
@ -197,6 +197,15 @@ async function loadEdit(id, args) {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
if (data.layers[pandora.subtitleLayer]) {
|
||||||
|
var previous;
|
||||||
|
data.layers[pandora.subtitleLayer].forEach(annotation => {
|
||||||
|
if (previous) {
|
||||||
|
previous.out = annotation['in']
|
||||||
|
}
|
||||||
|
previous = annotation
|
||||||
|
})
|
||||||
|
}
|
||||||
var value = []
|
var value = []
|
||||||
pandora.layerKeys.forEach(layer => {
|
pandora.layerKeys.forEach(layer => {
|
||||||
if (!data.layers[layer]) {
|
if (!data.layers[layer]) {
|
||||||
|
@ -215,7 +224,11 @@ async function loadEdit(id, args) {
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
})
|
})
|
||||||
value.push('<div class="layer">' + html.join('\n') + '</div>')
|
var layerClass = ""
|
||||||
|
if (layerData.isSubtitles) {
|
||||||
|
layerClass = " is-subtitles"
|
||||||
|
}
|
||||||
|
value.push('<div class="layer'+layerClass+'">' + html.join('\n') + '</div>')
|
||||||
})
|
})
|
||||||
data.value = value.join('\n')
|
data.value = value.join('\n')
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,6 @@ async function loadData(id, args) {
|
||||||
duration: duration
|
duration: duration
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
var value = []
|
|
||||||
if (data.layers[pandora.subtitleLayer]) {
|
if (data.layers[pandora.subtitleLayer]) {
|
||||||
var previous;
|
var previous;
|
||||||
data.layers[pandora.subtitleLayer].forEach(annotation => {
|
data.layers[pandora.subtitleLayer].forEach(annotation => {
|
||||||
|
@ -122,6 +121,7 @@ async function loadData(id, args) {
|
||||||
previous = annotation
|
previous = annotation
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
var value = []
|
||||||
Object.keys(data.layers).forEach(layer => {
|
Object.keys(data.layers).forEach(layer => {
|
||||||
var html = []
|
var html = []
|
||||||
var layerData = getObjectById(pandora.site.layers, layer)
|
var layerData = getObjectById(pandora.site.layers, layer)
|
||||||
|
|
Loading…
Reference in a new issue