Добавил реакцию на PageUp-PageDown, поправки багов

This commit is contained in:
Book Pauk
2019-01-16 04:30:51 +07:00
parent 2a354b1c08
commit 2faa584a01
2 changed files with 45 additions and 8 deletions

View File

@@ -13,8 +13,6 @@ export default class BookParser {
this.measureText = (text, style) => {// eslint-disable-line no-unused-vars
return text.length*10;
};
// stuff
}
async parse(data, callback) {
@@ -349,9 +347,9 @@ export default class BookParser {
result.push(parsed.lines[i]);
i--;
if (i > 0) {
if (i < 0) {
paraIndex--;
if (paraIndex >= this.para.length)
if (paraIndex >= 0)
parsed = this.parsePara(paraIndex);
else
return result;