Question class tostring, removed some todos

This commit is contained in:
MrFry 2020-01-13 14:56:10 +01:00
parent 339d67d5cc
commit ba9f812041

View file

@ -260,11 +260,11 @@
}
toString () {
var r = '?' + this.Q + '\n!' + this.A
if (this.data.type === 'image') {
r += '\n>' + this.data.images.join(', ')
if (this.data.type !== 'simple') {
return '?' + this.Q + '\n!' + this.A + '\n>' + JSON.stringify(this.data)
} else {
return '?' + this.Q + '\n!' + this.A
}
return r
}
HasQuestion () {
@ -798,7 +798,6 @@
// "húzza oda ..." skip
fun.push((i) => {
let temp = RPM.GetAnswersFromGrabBox(i)
console.log('GRABBOX TEST', temp) // TODO: remove
return temp.map((x) => {
return x.text
}).join(', ')
@ -1264,7 +1263,6 @@
var answers = []
questions.forEach((x, j) => {
let question = SUtils.EmptyOrWhiteSpace(x) ? '' : SUtils.RemoveUnnecesarySpaces(x) // simplifying question
// TODO: getdatafromquestion, implement grabboxes answering
var result = data.Search(question, GetImageDataFromImgNodes(imgNodes))
var r = PrepareAnswers(result, j)
if (r !== undefined) { answers.push(r) }
@ -1387,11 +1385,6 @@
}
}
// TODO
// function GetGrabBoxPositionsFromQuestion (i) {
// return asd
// }
function GetDataFormResult (i) {
let data = { type: 'simple' }