U <comment> v XML lze mít více <text>

fix #3 @1h
This commit is contained in:
2021-01-30 20:26:04 +01:00
parent b9c668841d
commit b3836d47a6
5 changed files with 49 additions and 27 deletions

View File

@@ -26,7 +26,7 @@ class Controller {
init(videoToLoad) {
this.loadXml(videoToLoad).then(
function (v) {
this.view.drawCommentsText(v);
this.view.drawCommentTittles(v);
this.addEventListeners();
this.view.drawCommentsToVideo(v);
}.bind(this)
@@ -145,9 +145,17 @@ class Controller {
if (this.activeComment !== null) {
this.view.activateComment(this.activeComment);
this.view.activateCommentText(
this.model.comments[this.activeComment].fulltext
);
console.log(this.model.comments[this.activeComment].text.length);
for (
let i = 0;
i < this.model.comments[this.activeComment].text.length;
i++
) {
this.view.activateCommentText(
this.model.comments[this.activeComment].text[i]
);
}
}
}
this.lastActiveComment = this.activeComment;