mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-25 02:44:18 +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
|
// 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");
|
let template = document.createElement("template");
|
||||||
htmlStr = htmlStr.trim();
|
htmlStr = htmlStr.trim();
|
||||||
@ -229,7 +229,7 @@ class ResultsList extends List {
|
|||||||
`data-cpos="${cpos}">` +
|
`data-cpos="${cpos}">` +
|
||||||
`${token.word}` +
|
`${token.word}` +
|
||||||
`</span>`;
|
`</span>`;
|
||||||
tokenHTMlElement = this.HTMLTStroElement(htmlTokenStr)
|
tokenHTMlElement = this.HTMLTStrToElement(htmlTokenStr)
|
||||||
tokenHTMLArray.push(tokenHTMlElement);
|
tokenHTMLArray.push(tokenHTMlElement);
|
||||||
}
|
}
|
||||||
for (let cpos of c) {
|
for (let cpos of c) {
|
||||||
@ -241,7 +241,7 @@ class ResultsList extends List {
|
|||||||
`style="text-decoration-line: underline;">` +
|
`style="text-decoration-line: underline;">` +
|
||||||
`${token.word}` +
|
`${token.word}` +
|
||||||
`</span>`;
|
`</span>`;
|
||||||
tokenHTMlElement = this.HTMLTStroElement(htmlTokenStr)
|
tokenHTMlElement = this.HTMLTStrToElement(htmlTokenStr)
|
||||||
tokenHTMLArray.push(tokenHTMlElement);
|
tokenHTMLArray.push(tokenHTMlElement);
|
||||||
}
|
}
|
||||||
for (let cpos of rc) {
|
for (let cpos of rc) {
|
||||||
@ -252,7 +252,7 @@ class ResultsList extends List {
|
|||||||
`data-cpos="${cpos}">` +
|
`data-cpos="${cpos}">` +
|
||||||
`${token.word}` +
|
`${token.word}` +
|
||||||
`</span>`;
|
`</span>`;
|
||||||
tokenHTMlElement = this.HTMLTStroElement(htmlTokenStr)
|
tokenHTMlElement = this.HTMLTStrToElement(htmlTokenStr)
|
||||||
tokenHTMLArray.push(tokenHTMlElement);
|
tokenHTMLArray.push(tokenHTMlElement);
|
||||||
}
|
}
|
||||||
console.log(tokenHTMLArray);
|
console.log(tokenHTMLArray);
|
||||||
@ -260,8 +260,8 @@ class ResultsList extends List {
|
|||||||
|
|
||||||
partElement = document.createElement("p");
|
partElement = document.createElement("p");
|
||||||
for (let sId of uniqueS) {
|
for (let sId of uniqueS) {
|
||||||
let htmlSentence = `<div class="sentence s12" data-sid="${sId}">`;
|
let htmlSentence = `<div class="sentence" data-sid="${sId}"></div>`;
|
||||||
let sentenceElement = this.HTMLTStroElement(htmlSentence);
|
let sentenceElement = this.HTMLTStrToElement(htmlSentence);
|
||||||
for (let tokenElement of tokenHTMLArray) {
|
for (let tokenElement of tokenHTMLArray) {
|
||||||
if (tokenElement.dataset.sid == sId) {
|
if (tokenElement.dataset.sid == sId) {
|
||||||
sentenceElement.appendChild(tokenElement);
|
sentenceElement.appendChild(tokenElement);
|
||||||
|
Loading…
Reference in New Issue
Block a user