mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-24 10:34:17 +00:00
fix
This commit is contained in:
parent
68eb1d1972
commit
8b27ddf5d2
@ -177,7 +177,7 @@ class ResultsList extends List {
|
||||
);
|
||||
}
|
||||
|
||||
HTMLTStroElement(htmlStr) {
|
||||
HTMLTStrToElement(htmlStr) {
|
||||
// https://stackoverflow.com/questions/494143/creating-a-new-dom-element-from-an-html-string-using-built-in-dom-methods-or-pro/35385518#35385518
|
||||
let template = document.createElement("template");
|
||||
htmlStr = htmlStr.trim();
|
||||
@ -229,7 +229,7 @@ class ResultsList extends List {
|
||||
`data-cpos="${cpos}">` +
|
||||
`${token.word}` +
|
||||
`</span>`;
|
||||
tokenHTMlElement = this.HTMLTStroElement(htmlTokenStr)
|
||||
tokenHTMlElement = this.HTMLTStrToElement(htmlTokenStr)
|
||||
tokenHTMLArray.push(tokenHTMlElement);
|
||||
}
|
||||
for (let cpos of c) {
|
||||
@ -241,7 +241,7 @@ class ResultsList extends List {
|
||||
`style="text-decoration-line: underline;">` +
|
||||
`${token.word}` +
|
||||
`</span>`;
|
||||
tokenHTMlElement = this.HTMLTStroElement(htmlTokenStr)
|
||||
tokenHTMlElement = this.HTMLTStrToElement(htmlTokenStr)
|
||||
tokenHTMLArray.push(tokenHTMlElement);
|
||||
}
|
||||
for (let cpos of rc) {
|
||||
@ -252,7 +252,7 @@ class ResultsList extends List {
|
||||
`data-cpos="${cpos}">` +
|
||||
`${token.word}` +
|
||||
`</span>`;
|
||||
tokenHTMlElement = this.HTMLTStroElement(htmlTokenStr)
|
||||
tokenHTMlElement = this.HTMLTStrToElement(htmlTokenStr)
|
||||
tokenHTMLArray.push(tokenHTMlElement);
|
||||
}
|
||||
console.log(tokenHTMLArray);
|
||||
@ -260,8 +260,8 @@ class ResultsList extends List {
|
||||
|
||||
partElement = document.createElement("p");
|
||||
for (let sId of uniqueS) {
|
||||
let htmlSentence = `<div class="sentence s12" data-sid="${sId}">`;
|
||||
let sentenceElement = this.HTMLTStroElement(htmlSentence);
|
||||
let htmlSentence = `<div class="sentence" data-sid="${sId}"></div>`;
|
||||
let sentenceElement = this.HTMLTStrToElement(htmlSentence);
|
||||
for (let tokenElement of tokenHTMLArray) {
|
||||
if (tokenElement.dataset.sid == sId) {
|
||||
sentenceElement.appendChild(tokenElement);
|
||||
|
Loading…
Reference in New Issue
Block a user